Skip to main content
PURE INTERPRETATION - IMPLEMENTATION METHODS
- Pure interpretation lies at the opposite end of implementation methods.
- The interpreter program acts as a software simulation of a machine whose fetch-execute cycle deals with high-level language program statements rather than machine instructions.
- This software simulation obviously provides a virtual machine for the language.
- Advantage: implementation of many source-level debugging operations, because all run-time error messages can refer to source-level units.
- For example, array index is found to be out of range, the error message can easily indicate the source line and the name of the array.
- Disadvantage: execution is 10 to 100 times slower than in compiled systems. The primary source of this slowness is the decoding of the high-level language statements, which are far more complex than machine language instructions.
- How many times a statement is executed, it must be decoded every time.
- Therefore, statement decoding, rather than the connection between the processor and memory, is the bottleneck of a pure interpreter.
- Another disadvantage: pure interpretation is that it often requires more space. In addition to the source program, the symbol table must be present during interpretation.
- Furthermore, the source program may be stored in a form designed for easy access and modification rather than one that provides for minimal size.
- Early languages of the 1960s (APL, SNOBOL, and LISP) were purely interpreted, by the 1980s, the approach was rarely used on high-level languages.
- pure interpretation has made a significant comeback with some Web scripting languages, such as JavaScript and PHP, which are now widely used.
- The process of pure interpretation is shown in below Figure.
Fig: Pure Interpretation
Comments
Post a Comment