Formal Semantics of Programming Languages

RISC-Linz logo

Wolfgang Schreiner
326.514 (SS 2001)
Thu 16:30-18:00, Hagenberg

While the syntax of a programming language is always formally specified, the equally important aspect of definining its meaning is often left to natural language which is ambiguous and leaves questions open. In order to understand the inherent properties of a language (e.g. for constructing a compiler), we should have a deeper understanding. The goal of formal semantics is to reveal the essence of a language beneath its syntactic surface.

This course presents some major methods for defining the meaning of languages and programs and discusses their relationship:

Operational Semantics
A programming language is defined by reduction rules that describe how the initial state of a program is transformed step by step into the terminal state. This view is most useful for understanding the dynamical behavior of a language, e.g., for constructing an interpreter.
Denotational Semantics
A programming language is defined by a valuation function that maps a program into a mathematical object which is considered as its meaning. This view is most useful for understanding the internal logic of a language, e.g., for reasoning about its properties.
Axiomatic Semantics
A programming language is defined by correctness assertions that describe how to draw conclusions about the input/output interface of a program. This view is most useful for understanding the external effects of a language, e.g., for verifying a program.

Students are expected to elaborate small exercises and to present them in class. This includes the development of executable semantics specifications in the CafeOBJ system.

Contents

Denotational Semantics I
(Based on Schmidt)
Operational Semantics
(Hardcopies of Winskel)
Denotational Semantics II
(Based on Schmidt)
Languages with Contexts
(Based on Schmidt)
Axiomatic Semantics
An assertion langauge, semantics of assertions, verification rules, soundness.
Language Design Principles
Languages with types, abstraction, parameterization, correspondence, qualification.
Miscellaneous Topics
Continuations, exceptions, backtracking, coroutines, unrestricted branching.

Literature

Glynn Winskel
  The Formal Semantics of Programming Languages -- An Introduction, Foundations of Computing Series, MIT Press, Cambridge, MA, 1994.
David A. Schmidt
  Denotational Semantics -- A Methodology for Language Development, Allyn and Bacon, Boston, MA, 1986.
David A. Schmidt
The Structure of Typed Programming Languages, Foundations of Computing Series, MIT Press, Cambridge, MA, 1994.

Maintained by: Wolfgang Schreiner
Last Modification: March 12, 2001

[Up] [RISC-Linz] [University] [Search]