language-icon Old Web
English
Sign In

Execution model

A programming language consists of a grammar/syntax plus an execution model. The execution model specifies the behavior of elements of the language. By applying it, one can derive the behavior of a program that was written in terms of that programming language. For example, Operational Semantics is one method of specifying a language's execution model. The observed behavior of a running program must match the behavior derived from the execution model. An execution model covers things such as what is an indivisible unit of work, and what are the constraints on the order in which those units of work take place. For example, the addition operation is an indivisible unit of work in many languages, and in sequential languages such units of work are constrained to take place one after the other. A programming language consists of a grammar/syntax plus an execution model. The execution model specifies the behavior of elements of the language. By applying it, one can derive the behavior of a program that was written in terms of that programming language. For example, Operational Semantics is one method of specifying a language's execution model. The observed behavior of a running program must match the behavior derived from the execution model. An execution model covers things such as what is an indivisible unit of work, and what are the constraints on the order in which those units of work take place. For example, the addition operation is an indivisible unit of work in many languages, and in sequential languages such units of work are constrained to take place one after the other. In particular, the C programming language, has a concept called a statement. The spec says that a statement is a chunk of syntax that is terminated by a ';'. The language spec then says that execution of the program proceeds statement by statement, which tells us something about the execution model of the language. It tells us that statements are indivisible units of work and that they proceed in the same order as their syntactic appearance in the code (except when a control statement such as IF or WHILE modifies the order). By stating the order in which statements are executed, the language spec has stated constraints on the order of performing units of work. The C language actually has an additional level to its execution model, which is the order of precedence. It states the rules for the order of operations within a single statement. The order of precedence can be viewed as stating the constraints on performing the units of work that are within a single statement. So, ';' and 'IF' and 'WHILE' cover constraints on the order of statements, while order of precedence covers constraints on work within a statement. Hence, these parts of the C language specification are stating the execution model of the C language. Execution models can also exist independently from programming languages, examples of which would be the POSIX Threads library, and Hadoop's Map-Reduce programming model. The implementation of an execution model can be via compiler, or interpreter, and often includes a runtime system.

[ "Real-time computing", "Operating system", "Distributed computing", "Parallel computing", "Programming language", "Explicit Data Graph Execution" ]
Parent Topic
Child Topic
    No Parent Topic