Execution Models
There are three models of execution for modern high-level languages:
- Interpreted
- Interpreted languages are read and then executed directly, with no compilation stage. A program called an interpreter reads each program line following the program flow, converts it to machine code, and executes it; the machine code is then discarded, to be interpreted anew if the line is executed again.
- Compiled
- Compiled languages are transformed into an executable form before running. There are two types of compilation:
- Machine code generation
- Some compilers compile source code directly into machine code. This is the original mode of compilation, and languages that are directly and completely transformed to machine-native code in this way may be called "truly compiled" languages.
- Intermediate representations
- When a language is compiled to an intermediate representation, that representation can be optimized or saved for later execution without the need to re-read the source file. When the intermediate representation is saved, it is often represented as byte code. The intermediate representation must then be interpreted or further compiled to execute it. Virtual machines that execute byte code directly or transform it further into machine code have blurred the once clear distinction between intermediate representations and truly compiled languages.
- Translated
- A language may be translated into a lower-level programming language for which native code compilers are already widely available. The C programming language and Python are a common target for such translators.
Read more about this topic: High-level Programming Language
Famous quotes containing the words execution and/or models:
“Those who govern, having much business on their hands, do not generally like to take the trouble of considering and carrying into execution new projects. The best public measures are therefore seldom adopted from previous wisdom, but forced by the occasion.”
—Benjamin Franklin (17061790)
“Friends broaden our horizons. They serve as new models with whom we can identify. They allow us to be ourselvesand accept us that way. They enhance our self-esteem because they think were okay, because we matter to them. And because they matter to usfor various reasons, at various levels of intensitythey enrich the quality of our emotional life.”
—Judith Viorst (20th century)