02247 Compiler Construction — Spring 2024
02247 Compiler Construction — Spring 2024#
These are the lecture notes of the course 02247 Compiler Construction at DTU Compute.
Important
The home page for this course (with course plan, calendar, discussion forum, lecture recordings…) is on DTU Learn: https://learn.inside.dtu.dk/d2l/home/187668
These lecture notes will be updated throughout the course, and you will be notified in case of changes. The latest updates are listed in the ChangeLog.

Fig. 1 The main dependencies between the modules of this course. NOTE: some references and minor dependencies between modules are not shown in this diagram; they may be more or less important depending on the project ideas you will choose to work on.#
Contents
- Module 0: Overview of the Course and Assessment
- Module 1: Introduction to RISC-V
- Module 2: The Hygge0 Language Specification
- Module 3: Hands-On with
hyggec
- Module 4: Lab Day
- Module 5: Mutability and Loops
- Module 6: Functions and the RISC-V Calling Convention
- Module 7: Structured Data Types and the Heap
- Module 8: Lab Day
- Module 9: Closures
- Module 10: Discriminated Unions and Recursive Types
- Module 11: Intermediate Representations and Register Allocation
- Module 12: Optimisation
- Module 13: Exam Q&A and Lab Day
- ChangeLog