Documente Academic
Documente Profesional
Documente Cultură
1. Interpreter
Example
Interpreter translates
message from German
to English.
GERMAN ENGLISH
Advantages
• Errors are quickly identified because each line is executed.
• Checks for both syntax and run-time errors.
Disadvantages
• Not a very efficient method which is time consuming especially when
errors are encountered.
• Each time execution takes place it must be recompiled.
• Code can be stolen and used by others.
The Translation Process
2. Compilation
Example
TRANSLATOR ENGLISH
Advantages
• A very quick method as machine code is stored.
• Storage is minimal because of machine code.
Disadvantages
• Only produces machine code if no syntax errors are present.
• Testing is a complex procedure.
• Code is hard to modify unless you have lots of experience.
• Errors only appear when the program has been compiled.
• Changes require the program to be recompiled.
The Translation Process
3. Incremental Compilation
Example
1st Edition
Advantages
• Commonly used modules are compiled and stored.
• Execution involves running the main line as interpreted code and modules
from the stored compiled code.
Disadvantages
• Portability is reduced.
• The programming environment must be able to keep track of any changes
to source code.