Course (MSc): Compiler Construction

Page content

Programs that run on a computer are written in a computer language, and the languages used for writing computer programs have significantly evolved over time. By abstracting from the details of the underlying computer architecture, higher-level languages aim at making the process of developing a program simpler and more understandable than when using a lower-level language. Modern languages offer us a variety of different concepts for expressing (executable) programs. Domain-specific (modeling) languages are even created specifically to solve problems in a particular domain of interest. However, programs written in a higher-level language must be translated into a lower-level, executable representation, which requires various forms of compilers doing this job for us.

This course will provide students with an introduction to modern compiler construction. The first two-thirds of the course will cover classical topics ranging from scanning and parsing over semantic analysis and interpretation to code generation and optimization. In the exercises, we will develop a fully functional interpreter for our own programming language. The remaining third of the course is dedicated to study the transition form classical compiler techniques into principles of model-driven software development. In the exercises, we will develop a fully functional, domain-specific modeling environment.


Why should I take this course?

The magic of computer languages:

  • Ever wanted to make your own programming language or wondered how they are designed and built?
  • If so, this is already enough. But there are also very practical reasons:

Little languages are everywhere:

  • Even if you will most likely not be faced with the task of implementing a fully-fledged compiler in your professional life, there is a good chance you will find yourself in need of writing a parser in order to process various documents written in tiny little languages.

Domain-specific Languages and Model-driven Development

  • There has been a hype on DSLs and Model-driven development in the past, and larger software development projects in various domains successfully adopted these paradigms.
  • Building sophisticated model-driven software engineering environments is the backbone of running these projects.

Overview (Spring Semester 2025)

  • Lecturer: Timo Kehrer
  • Assistants: Jan-Andrea Bard
  • Lectures: Tuesdays 14:15 - 16:00 (Hörraum 002, Engehalde, E8)
  • Exercise hour: Tuesdays 16:15 - 17:00 (Hörraum 002, Engehalde, E8)
  • Stream/Podcast: Available through ILIAS course
  • Language: English
  • Start: Tuesday, 18th February 2025
  • Exam: TBA
  • Course Repetition: Spring Semester 2026

Schedule (Spring Semester 2025)

Part I: Classical Compiler Construction

  • 18-Feb-25: Introduction
  • 25-Feb-25: Lexical Analysis: Handwritten Scanners
  • 04-Mar-25: Q&A: Lexical Analysis: Scanner Generators
  • 11-Mar-25: Syntax Analysis: Grammars and Syntax Trees
  • 18-Mar-25: Syntax Analysis: Top-Down Parsing
  • 25-Mar-25: Syntax Analysis: Parser Generators
  • 01-Apr-25: Excursus: LR Parsing
  • 08-Apr-25: Semantic Analysis and Interpretation (I)
  • 15-Apr-25: Semantic Analysis and Interpretation (II)
  • 22-Apr-25: (No class)
  • 29-Apr-25: PEGs, Packrats and Parser Combinators (Guest Lecture by Oscar Nierstrasz)
  • 06-May-25: Code Generation and Optimization

Part II: Modeling Language Engineering

  • 13-May-25: Defining/Implementing Modeling Languages
  • 20-May-25: Modeling Technologies
  • 27-May-25: Q&A