1 / 18

Computing System Fundamentals

3.1 Language Translators. Computing System Fundamentals. 'There wasn't no man nowhere so virtuous.” Geoffrey Chaucer, The Canterbury Tales Half a loaf is better than nothing. Nothing is better than a Rolls Royce. Therefore half a loaf is better than a Rolls Royce.

verdad
Télécharger la présentation

Computing System Fundamentals

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 3.1 Language Translators Computing System Fundamentals

  2. 'There wasn't no man nowhere so virtuous.”Geoffrey Chaucer, The Canterbury Tales Half a loaf is better than nothing. Nothing is better than a Rolls Royce. Therefore half a loaf is better than a Rolls Royce. The gorilla eats shoots and leaves.The gorilla eats, shoots and leaves. 3.1.1 Syntax and Semantics

  3. Syntax (grammar): each statement must be constructed correctly Semantics: each instruction must have a clear meaning 'I ain’t got no problems'- fairly clear semantics (meaning)- incorrect syntax (grammar)‏ 3.1.1 Syntax and Semantics

  4. Computers only run in machine code e.g. 0001010011100110 0001001100001111 1010001110101100 1001010000111011 Difficult for human programmers and prone to errors. A low level language. 3.1.2 High Level Languages

  5. An improvement was assembly language: LDA 2905 ADD 1750 ...Load the number in memory location 2905... add it to the number in 1750... More understandable to humans, but needs another program to convert it to machine code. 3.1.2 High Level Languages

  6. True high level code is more understandable: FOR X = 1 to 99 DO Y = X * X PRINT (X, Y) NEXT 3.1.2 High Level Languages

  7. True high level languages are: portable (can be run on different machines)‏ English-like (easier to understand)‏ different, depending on their specific purpose. Examples are: BASIC, FORTRAN, Java. 3.1.2 High Level Languages

  8. HL languages need a translator program to convert the programmer's source code into the computer's object code (machine code). Translators can be of two trypes: Interpreters Compilers 3.1.2 High Level Languages

  9. Interpreters: Translate and execute line by line without saving object code Stop at the first error Need less memory Must be in memory while the program itself is running. 3.1.2 High Level Languages

  10. Compilers: Produce a complete machine code program which can be stored on disc, loaded and run Need a complete source code program Give an error listing after compilation The object code product can be run on any machine (compiler no longer needed)‏. 3.1.2 High Level Languages

  11. Note that the syntax of an HL language source code must be correct or the translator (compiler or interpreter) will be unable to convert it into binary machine code. Semantic errors, however, will get through translation and must be corrected by the programmer. 3.1.2 High Level Languages

  12. Tools that aid developer (not regarded as languages in their own right): Visual IDE's HTML Scripting languages DBMS's CASE Macros 3.1.3 Software Development Tools

  13. Visual Integrated Development Environments (IDE's) are programs that allow software to be written, compiled, run and debugged in a user friendly way Usually have a text editor which highlights syntax errors, compiler, library of common routines, debugging help, GUI Examples: BlueJ, NetBeans. 3.1.3 Software Development Tools

  14. Hypertext Markup Language (HTML) uses tags e.g. <H4>, </P> to control the display behaviour of other programs called browsers e.g. Firefox, IE. Not truly programming languages as authors do not have full control over the way their product is displayed. HTML editors e.g. Dreamweaver allow easier WYSIWYG (what you see is what you get) editing. 3.1.3 Software Development Tools

  15. Scripting languages allow the insertion of short routines into other programs on a particular operating system e.g. VBScript for Office on Windows or AppleScript for Mac OS. JavaScript (not the same as Java!) supports HTML and makes web pages more dynamic. 3.1.3 Software Development Tools

  16. Database Management Systems (DBMS's) provide interfaces which make database access simpler for users and developers. Hide internal structure of the database, manages the data dictionary (database structure, access rights, relationships between data items, etc.) and safety and security (schedules backups, controls access rights and sharing violations). 3.1.3 Software Development Tools

  17. Computer Aided Software Engineering (CASE) involves techniques and software that help in the design cycle of a software product. Typical components help with: data flow diagrams, costing, scheduling tasks, documentation preparation, version control. 3.1.3 Software Development Tools

  18. Macros allow common sets of tasks in general purpose packages e.g. Office to be recorded and re-used later. In fact they automatically write the code required in an appropriate HL language e.g. Visual Basic for Applications (VBA)‏ in the case of Word or Excel. No knowledge of programming needed. 3.1.3 Software Development Tools

More Related