Single-Course English 5 ECTS

Compiler Construction

Overall Course Objectives

Compilers contribute to the reliability of software systems by analyzing and optimizing the system’s code, and by guaranteeing properties of the generated executables. Many IT companies (including e.g. Google, Facebook, and Microsoft) create and maintain compilers for new and existing programming languages.

This course teaches techniques to efficiently implement modern programming languages, and to guarantee reliability of the generated executables. We cover essential techniques in modern compilers, from implementation of high-level concepts over optimizations to run-time support for new hardware architectures. During the course, students will work in groups on a compiler for a realistic programming language.

Learning Objectives

  • explain the contribution of compilers to the reliability of software systems;
  • explain the structure of optimising compilers and the functionality of the different phases;
  • explain the relation between high-level language, intermediate representation, analyses, and optimisations;
  • explain the process of code generation for modern computer architectures, including virtual machines
  • extend a compiler to add new functionalities to a programming language
  • use modern tools to implement parts of compilers, and explain their functionality;
  • implement a compiler for a realistic programming language, or extend an existing one;
  • achieve the above results in a group project while at the same time maintaining individual accountability; and
  • communicate the obtained results in a clear and precise manner using a standard form for technical reports.

Course Content

The course covers three main topics:
(1) The compilation process: from high-level programming language to hardware architectures and virtual machines;
(2) Intermediate representations and their role in compilers; and
(3) Lexing, parsing, code analysis, code generation, and optimizations.
The course project requires to extend an existing compiler framework to support more advanced programming language features.

Recommended prerequisites

02141, The students are expected to be familiar with finite automata and context-free grammars. This background can be obtained in the course 02141. The students must be fluent in at least one programming language.

Teaching Method

Lectures, theoretical exercises, and practical exercises.

Faculty

See course in the course database.

Registration

Language

English

Duration

13 weeks

Institute

Compute

Place

DTU Lyngby Campus

Course code 02247
Course type Candidate
Semester start Week 5
Semester end Week 19
Days Thurs 8-12
Price

7.500,00 DKK

Registration