Professional Documents
Culture Documents
Transition function defines how states transits to the next, if there is one. If there is no such
next state, the machine either completed its evaluation successfully or faced a runtime
error and got stuck. The program halts in both cases.
Every term in computer program has some meaning, and its form finalizes when the state
transitions are complete. State transitions may be single or multi-step.
There are two major ways to write operational semantics which are small-step or big-step
Big-step semantics composes multiple small-step rules that evaluate into finalized form into
a single rule. Such a rule is equivalent with its multi-step counterpart.
Since operational semantics is styled after abstract machine behaviour, they’re useful as a
reference for implementation.
2. Denotational semantics: Denotational semantics uses the idea that languages are
mathematical objects. Unlike operational semantics evaluation and Implementation details
are abstracted away.
Laws can be derived from semantic domains and are used for language specifications to
verify correctness of an implementation.
3. Axiomatic semantics: Intuitively related to Hoare Logic. Instead of deriving laws from
operational or denotational behaviour definitions, the laws themselves define the semantics
of the language.
This reversal simplifies reasoning about a program, leading to developments in software
verification. Two different program implementations with the same set of initial and final
assertions (laws) are considered to have the same semantics.
Assertions define relationship between variables and other moving parts in a program, and
some of these assertions remain invariant throughout execution. This is the important
invariance concept that underlines axiomatic semantics.