Essentials of Programming Languages


LectureWe 14-16:00Room 106 SR 00-007 Prof. Dr. Peter Thiemann thiemann@info...
TutorialsFr 14-16:00Room 106 SR 00-007Hannes Saffrichsaffrich@info...


2023-10-19The Ilias Course is now available.

Lecture Materials

2023-10-25PLFA - Part 1 - Naturals & Induction Lecture2.agda Recording
2023-11-01PLFA - Part 1 - Relations Relations.agda Part1, Part2 (from SS2020)
2023-11-08PLFA - Part 1 - Equality Recording
2023-11-15PLFA - Part 1 - Isomorphism & Connectives (product, unit, sum, empty) Recording
2023-11-22PLFA - Part 1 - Negation Recording
2023-11-29PLFA - Part 1 - Quantifiers & Decidable Recording
2023-12-06PLFA - Part 2 - Lambda Recording
2023-12-13PLFA - Part 2 - Properties Recording
2023-12-20Intermezzo - Semantics of While Imperative.agda Recording
2023-01-10PLFA - Part 2 - DeBruijn Recording
2023-01-17PLFA - Part 2 - More (finished) Recording
2023-01-24PLFA - Part 2 - Bisimulation Recording
2023-01-31PLFA - Part 2 - Inference Recording
2023-02-07PLFA - Part 2 - Untyped Recording

Tutorial Materials

2023-10-20Propositions as Types, Programming Language Theory, Agda Mode Recording
2023-10-27PLFA - Part 1 - Naturals & Induction chap01_naturals.agda, chap02_induction.agda Recording
2023-11-03PLFA - Part 1 - Relations chap03_relations.agda Recording
2023-11-10PLFA - Part 1 - Equality chap04_equality.agda Recording
2023-11-17PLFA - Part 1 - Isomorphism & Connectives chap05_isomorphism.agda, chap06_connectives.agda Recording
2023-11-24PLFA - Part 1 - Negation & Lists chap07_negation.agda, chap10_lists.agda Recording corrupted :(
2023-12-01PLFA - Part 1 - Quantifiers & Decidable chap08_quantifiers.agda, chap09_decidable.agda Recording
2023-12-08PLFA - Part 2 - Lambda Calculus chap11_lambda.lagda.md Recording
2023-12-15PLFA - Part 2 - Properties chap12_properties.lagda.md Recording
2023-12-15Intermezzo - Hoare Logic Imperative-Hoare.agda Recording
2024-01-12PLFA - Part 2 - DeBruijn chap13_debruijn.lagda.md Recording
2024-01-19PLFA - Part 2 - More chap14_more.agda Recording
2024-01-26PLFA - Part 2 - Bisimulation chap15_bisimulation.agda Recording
2024-02-02Pointers, Exceptions, Subtyping, Algebraic Data Types, Polymorphism Recording
2024-02-09PLFA - Part 2 - Untyped & Confluence, Extrinsic Typing, Local Module Imports Recording


This course conveys the mathematical and logical concepts underlying programming languages using the language Agda. It mainly follows the online book Programming Language Foundations in Agda (PLFA) by Philipp Wadler, Wen Kokke, and Jeremy Siek. Agda is a functional language with an advanced type system that enables the encoding of many program properties in its types. Agda's type checker verifies proofs of these properties, so that one could also say this course is about verified programming.

The first part of the course covers the logical background needed to study the theory of programming languages to the extent that we can give formal guarantees about the execution of a program. The content of this part should be familiar from an introductory logic class, but it is presented in an entirely different way. The central idea conveyed is that every program (in a language with a reasonable type system) is really a proof about the meaning of the program. Conversely, it means that every proof can be viewed as a program, so that proving becomes programming a function with a certain type. For example, inductive proofs are expressed by terminating recursive functions. This correspondence is called the Curry-Howard correspondence. It is one of the most powerful discoveries in logics and programming and it is one of the core ideas behind Agda.

The second part of the course puts this toolbox to work. We use Agda's features to model the syntax and the semantics of (simple) programming languages. We model type systems and connect them to the semantics through type soundness theorems. We learn about different ways of modeling syntax and semantics and their pros and cons. We study type inference as a means to find a best possible (principal) typing for a given program, if such a typing exists.


The lecture is closely aligned with the contents of the PLFA book:

  • On Wednesdays we discuss (part of) a chapter from the PLFA book. We ask you to prepare for this by reading the chapter in advance. We will try to cover questions interactively.
  • On Fridays we discuss the exercises of the corresponding chapters (contained in the book), and answer general questions related to Agda, Theorem Proving and Programming Language Theory. Occasionally we may also show you cool stuff not covered in the book.

Recordings of the lecture will be available so that asychronous participation is possible. The exercise sessions will not be recorded. The PLFA book is freely available in source code, so that everything can be tried hands on. It is amenable to self study, but the pragmatics of using Agda are much easier to deal with in an interactive supportive environment such as we are trying to provide.


The final grade will be based entirely on a graded homework, which builds on the material covered in the second part of the course. That is, you will be using Agda to build a formal model of a language and prove some properties about it. The exam will be handed out on March 3 and results need to be submitted until March 31, 23:59.

Both the exercises and the exercise sessions are voluntary, but we highly recommend doing the exercises and participating in the discussions. There is no submission of exercises, since the Agda type checker will tell you, when your proofs are correct.


Announcement will be posted on this page under the rubric News as well as through Ilias. If you do not want to miss these announcements, make sure you have a valid email registered with Ilias!

We also provide a Discord-like chat for questions about the lecture, exercises, and related topics. You can log in there via your RZ-Account, i.e. with the same credentials as for Ilias.


For this course you need the following software setup:

If you don't want to go through the setup process yourself, then you can use our VirtualBox image that has the required software preinstalled. If you haven't worked with VirtualBox before, you can watch our video tutorial on how to use the image.

If you do want to install the software yourself, make sure to install Agda and its standard library in exactly the specified versions. We recommend to follow the installation process as described in the Getting Started chapter of the PLFA book.

Note that editor support is absolutely crucial when working with dependently typed programming languages, and so far is only provided in sufficient capacity for emacs and vscode. emacs is used in the lecture, exercise sessions, and the book.