Formal semantics of programming languages
From Free net encyclopedia
In theoretical computer science, formal semantics is the field concerned with the rigorous mathematical study of the meaning of programming languages and models of computation.
The formal semantics of a language is given by a mathematical model to represent the possible computations described by the language.
There are many approaches to providing a formal semantics for programming languages. The three main classes of approach are:
- Denotational semantics, including domain theory;
- Operational semantics, such as abstract machine models, most famously the SECD machine.
- Axiomatic semantics, for example predicate transformer semantics and algebraic semantics;
Other approaches include, for instance:
- Action semantics, which is a kind of hybrid of denotational and operational semantics;
- Attribute grammars, used also for augmenting regular or context-free grammars with context-sensitive conditions, and for code generation;
- Categorical semantics (also called Functorial semantics), which is most easily understood as an algebraic semantics (and so is an axiomatic semantics), but which can also be understood as a kind of denotational semantics, and indeed familiarity with category theory is today a requirement for understanding most work in denotational semantics;
- Concurrency semantics, for example based on the Actor model and process calculi;
- Game semantics was proposed as a kind of denotational semantics, but it has a dynamical aspect that allows it to be understood as a kind of operational semantics.
Different formal semantics may be linked through abstractions within the theory of abstract interpretation.
The field of formal semantics also studies the relations between different models, the relations between different approaches to meaning, and the relation between computation and the underlying mathematical structures, from fields such as logic, set theory, model theory, category theory, etc.
It has close links with other areas of computer science such as Programming language design, Type theory, Compilers and Interpreters, Program verification and Model checking.
External links
fr:Sémantique des langages de programmation pt:Semântica formal ru:Семантика в программировании