Compilers, spring 2024 (5 cr)
This course will show you hands-on how to build a simple compiler from start to finish.
You then have the opportunity to take your compiler in a direction of your choosing.
Enjoy!
Course structure
The course is graded entirely on a project where you create a complete compiler for a simple programming language.
Chapters 0-7 will guide you in completing the mandatory part of the project. If you do all the tasks in chapters 2-7 properly, you’ll have passed the course. There are also some optional exercises to reinforce your understanding.
For a high grade, you should complete some optional parts of the project too. The project page has the details.
Chapter 8 is a bonus chapter that helps with some optional parts of the project.
This course is light on theory and heavy on practical programming.
It’s a good idea to start the project without delay!
The project’s deadline is March 18, 23:59:59.
To submit your project, send it by e-mail
as a .tar.gz
or .zip
attachment to
martin.partel@helsinki.fi.
Please also mention your student number in the e-mail.
Schedule
Teaching sessions will be on Tuesdays 12-14 and Fridays 12-14 in Exactum B121.
Tuesdays will at least initially have lectures that present the course material’s topics with some live coding.
Fridays, and possibly some later Tuesdays, have in-person workshops where you can work on your course project, ask for help and advice, or just chat about compilers and languages.
Tuesday lecture topics
Tue 16.1. | Intro, Overview, Tokenizer (ch. 0-2) | Tasks |
Tue 23.1. | Parser (ch. 3) Interpreter (ch. 4) Type checker (ch. 5) |
Tasks for parser Tasks for interpreter Tasks for typechecker |
Tue 30.1. | IR generator (ch. 6) Assembly generator (ch. 7) |
Tasks for IR generator Tasks for Assembly generator |
Tue 6.2. | Analysis and optimization (ch. 8) Type inference Miscellaneous topics |
Tasks for program analysis (optional) |
Tue 13.2. | Extra workshop session | |
Tue 20.2. | Extra workshop session | |
Tue 27.2. | Extra workshop session |
Screen and voice recordings will be uploaded to the studies.helsinki.fi course page (for registered participants only).
Contact
- Discord
- If you’re unfamiliar with Discord, see these detailed instructions
- Otherwise, here’s the invite link and then
/join CSM14202
- Please use the course-specific channel instead of the general chat channel.
- Private messages are OK, but prefer asking technical questions on the channel: you might get an answer faster, and others students might benefit from seeing the question.
- Instructor e-mail: martin.partel@helsinki.fi (English and Finnish equally OK)