Course syllabus

This is a static page where content will remain mostly constant during the course.

See the News and Course Material page for information that is added as the course progresses.

Teaching Team

Lecturers:

Teaching assistants (TAs):

  • Édua Boróka Kun
  • Evan Cavallo
  • Jeremy Pope
  • Jonas Höfer
  • Sofia Brookie 

Description

The aim of the course is to give understanding of how programming languages are designed, documented, and implemented. The course covers the basic techniques and tools needed to write interpreters, and gives a summary introduction to compilation as well.

Those who have passed the course should be able to

  1. define the lexical structure of programming languages by using regular expressions, explain the functioning of finite automata, and implement lexical analysers by using standard tools;

  2. define the syntax of programming languages by using context-free grammars, explain the principles of LL and LR parsing, and implement parsers by using standard tools;

  3. define and implement abstract syntax;

  4. master the technique of syntax-directed translation and its efficient implementation in their chosen programming language;

  5. formulate typing rules and implement type checkers;

  6. formulate operational semantic rules and implement interpreters;

  7. write simple code generators;

  8. be familiar with the basic implementation issues of both imperative and functional languages;

  9. master the principles of polymorphic type checking by unification;

  10. implement an interpreter for a functional language.

Literature

  1. The main book will be one that developed from earlier editions of this course:

    Aarne Ranta,
    Implementing Programming Languages. An Introduction to Compilers and Interpreters,
    College Publications, London, 2012.
    Web page (with extra material and links to selling sites)

    Please also check the errata page (welcome to submit errata not covered there yet).

  2. If you are really interested in the topic, for instance, if you want to continue with the Compiler Construction course, you should also consider the Dragon book,

    Aho, Lam, Sethi & Ullman,
    Compilers Principles, Techniques & Tools, Second edition,
    Pearson/Addison Wesley 2007.

Both books are available at web bookshops. The main book will also be sold at Cremona.

A good (yet slightly dated) introduction to monads in Haskell, useful for implementing interpreters, type checkers, and compilers, is this article:

Philip Wadler,
Monads for functional programming.
In Advanced Functional Programming,
First International Spring School on Advanced Functional Programming Techniques,
Båstad, Sweden, May 24-30, 1995.

It also contains an introduction to parser combinators.