Uni-Logo

Essentials of Programming Languages

News

2022-04-25Software image available: Agda VM 2022 SS.ova

Schedule

LectureMo 16:15-18Room 101 SR 01-016, Zoom Link Prof. Dr. Peter Thiemann thiemann@info...
ExerciseWe 14:15-16Room 078 SR 00 014Hannes Saffrichsaffrich@info...

Lecture Materials

DateContentCodeSolutionsRecording
2022-04-25PLFA - Part 1 - Naturals chap01_naturals.agda pt.1, pt.2 (from SS2020)
2022-04-27PLFA - Part 1 - Induction chap02_induction.agda pt.2, pt.3 (from SS2020)
2022-05-09PLFA - Part 1 - Relations chap03_relations.agda pt.4, pt.5 (from SS2020)
2022-05-16PLFA - Part 1 - Equality SimpleLang.agda chap04_equality.agda pt.6 (from SS2020)
2022-05-23PLFA - Part 1 - Isomorphism & Connectives (product, unit, sum, empty) chap05_isomorphism.agda, chap06_connectives.agda pt.7 (iso) pt.8 (iso) pt.9 (conn) (from SS2020)
2022-05-30PLFA - Part 1 - Connectives (implication) & Negation chap07_negation.agda pt.10 (conn) pt.11 (neg) (SS2020)
2022-06-13PLFA - Part 1 - Quantifiers chap08_quantifiers.agda pt.12 (quant) pt.13 (quant)
2022-06-20PLFA - Part 1 - Decidable chap09_decidable.agda pt.14 (dec) (SS2020)
2022-06-27PLFA - Part 2 - Lambda modified Lambda chapter pt.15 (lambda) (live recording)
2022-06-29PLFA - Part 2 - Lambda modified Lambda chapter pt.16 (lambda) (live recording)
2022-07-04PLFA - Part 2 - Properties modified Lambda chapter, modified Properties chapter pt.17 (properties) (live recording)
2022-07-11PLFA - Part 2 - Properties (type soundness!) updated Lambda chapter, updated Properties chapter pt.18 (properties) (live recording)
2022-07-18PLFA - Part 2 - DeBruijn updated DeBruijn chapter, pt.19 (deBruijn) (live recording)
2022-07-20PLFA - Part 2 - DeBruijn (finishedf) updated DeBruijn chapter, pt.20 (deBruijn) (live recording)
2022-07-25PLFA - Part 2 - More (finishedf) updated More chapter, pt.21 (more) (live recording)

Content

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.

Approach

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

  • On Mondays 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 Wednesdays 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.

Exam

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.

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.

Communication

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!