Operational Semantics
Operational semantics define the semantics of a programming language by specifying how an arbitrary program is to be executed on a machine whose operation is completely known.
Its formal definition is as follows:
The operational semantics for a programming language describes how a valid program is interpreted as sequences of computational steps.
These sequences then are the meaning of the program.
Operational semantics define a language by describing its actions in terms of the operations of an actual or hypothetical machine.
Of course, this requires that the operations of the machine used in the description also be precisely defined, and for this reason a very simple hypothetical machine is often used that bears little resemblance to an actual computer.
The differences between translational and operational semantics include:
- Translational semantics perform a translation of a language into a low-level language.
Executing this target program on a computer or virtual machine captures the semantics of the program in the language.
- Operational semantics refer to an interpreter approach in which a source language program is simulated directly.