Formal Semantics of Programming Languages (SS 2019)
Section outline
-
326.0FS, Time: Friday, 8:30-10:00, Zoom, Start: March 12, 2021.
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 many questions open. In order to understand the inherent properties of a language (e.g. for constructing a compiler), we should have a deeper understanding.
This course presents some major methods for defining the formal semantics of programming languages (and thus programs) and discusses their relationship:
- 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.
- 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.
- Axiomatic Semantics
- A programming language is defined by correctness assertions that describe how to draw conclusions about the input/output interface of a program.
The participants are expected to elaborate a small project (the implementation of some semantics presented in class) which will be used for grading (there will be no final exam)
To take part in the course, you have to enrol in the KUSSS system. Since the exercises will be submitted via Moodle, you also have to login in Moodle and enrol as a course participant (press the corresponding button; you will then also receive per email all forum messages).
-
The lecture will be based on a not yet published manuscript "Thinking Programs" that covers in Chapters 1 and 7 the topic of the abstract syntax and the formal semantics of "Programming Languages"; in the course we will walk through parts of these chapters.
- Chapter 1: Syntax and Semantics1 (teaser excerpt only)
- Chapter 7: Programming Languages (teaser excerpt only)
- Thinking Programs (draft manuscript, password will be handed out in class)
Variously we will also use material from previous instances of this course (not aligned with above chapter):- Denotational Semantics (Part 1)
- Denotational Semantics -- A Methodology for Language Development: Chapters 1-5.1
- Operational Semantics
- Introduction to Operational Semantics (restricted)
- IMP: a Simple Imperative Language (restricted)
- Big Step Structural Operational Semantics (restricted)
- Small Step Structural Operational Semantics (restricted)
- Modular Structural Operational Semantics (restricted)
- Equivalence to Denotational Semantics (restricted)
- Denotational Semantics (Part 2)
- Denotational Semantics -- A Methodology for Language Development: Chapters 6 and 5.2--5.4
- Languages with Contexts
- Axiomatic Semantics
- The Axiomatic Semantics of IMP (restricted)
- Chapter 1: Syntax and Semantics1 (teaser excerpt only)
-
Grading will be based on a small project (the implementation of the semantics presented in class) consisting of two mandatory and an optional assignment.