Execution model: Difference between revisions

Content deleted Content added
Seanhalle (talk | contribs)
No edit summary
Seanhalle (talk | contribs)
No edit summary
Line 7:
An implementation of an execution model controls the order in which work takes place during execution. This order may be chosen ahead of time, in some situations, or it can be dynamically determined as the execution proceeds. Most execution models allow varying degrees of both. For example, the C language fixes the order of work within a statement and it fixes the order of all statements, except ones that involve an IF statement or a form of loop statement. Hence, most of the order of execution may be chosen statically, before execution begins, but a small portion must be chosen dynamically, as execution proceeds.
 
The static choices are most often implemented inside a [[compiler]], in which case the order of work is represented by the order in which instructions are placed into the executable binary. The dynamic choices would then be implemented inside the language's [[runtime system]]. The runtime system may be a library, which is called by codeinstructions inserted by the [[compiler]], or the runtime system may be directly embedded into anthe [[executable]] directly, such as by theinserting compilerbranch instructions, which make dynamic choices about which work to perform next.
 
However, an [[interpreter]] may also be constructed for the Cany language, in which case all decisions on order of execution are dynamic. An interpreter can be viewed as being part translator, and part execution model implementation.
 
Each and every programming language has an execution model, which determines the manner in which the units of work (that are indicated by program [[Syntax (programming languages)|syntax]]) are [[Scheduling (computing)|scheduled]] for [[Execution (computing)|execution]]. Detailed examples of the specification of execution models of a few popular languages include those of Python,