11 Jan: The final exam on 23 Jan will cover the entire semester, Some practice questions are here and here.
21 Dec: The semester is over! Have a good holiday. The exam is on Wednesday, 23 January, at 13:30, in SI-008.

Objective

In this course you will learn how programs written in high-level languages are executed on modern hardware. Understanding how languages are implemented is useful for reasoning about program behavior and performance. A secondary goal of the course is to expose students to the principles, techniques, and tools used to construct compilers and interpreters.

Content

The course will cover both the theory and practice of programming language implementation. Topics include compiler structure, lexical and syntactic analysis (parsing), types, semantic analysis, program representations, data-flow analysis, register allocation, optimization, and compiler construction tools.

Teaching mode

The course is heavily project-based. Students will implement a compiler for a high-level programming language on modern hardware. Students will also do written assignments to understand programming language and compiler principles Students are expected to read the assigned readings before class. During class sessions we will discuss remaining questions and problems.

Logistics When, where, what and how

Lectures Mon, Wed, Fri 13:30–15:15 in SI-003
Prerequisites Software Atélier IV, Computer Architecture, Algorithms and Data Structures, Automata and Formal Languages
Lecture Notes
Compiler References
  • [Dragon] Compilers: Principles, Techniques, and Tools, 2nd edition, Alfred Aho, Monica Lam, Ravi Sethi, and Jeffrey Ullman, 2006. (amazon.de) — The first edition is also (mostly) acceptable, and cheaper, but chapter references will be to the second edition.
  • [Appel] Modern Compiler Implementation in Java, 2nd edition, Andrew W. Appel and Jens Palsberg, 2002. (amazon.de)
Python References
x86 References
Class Q&A Website Compilers on Moodle - for all questions related to the material
Staff Mailing List for administrative questions
Grade Distribution Assignments and exercises: 20%, Project: 50%, Midterm: 15%, Final: 15%
Syllabus PDF

Where do I ask questions?

All questions related to the material should go to Q&A Forum.


Administrative questions should all go to the . Please do not email individual staff members.

Staff Professor and TA details

IMPORTANT Contact us using the staff mailing list for administrative questions. Post questions about assignments to the Moodle forum.

Nate Nystrom, Instructor

Office SI-203
Office Hours Whenever the door is open, or send an email, or try the mensa
Contact Details

Andrea Mattavelli, TA

Office 2nd floor, Informatics building
Office Hours TBA
Contact Details

Francesco Alberti, TA

Office 2nd floor, Informatics building
Office Hours Friday 10–12
Contact Details

Schedule Subject to change

Date Topic Lecture notes Additional reading Assignment out Assignment due

Assignment Policy

Group Work

Homework will consist of programming assignments. You are encouraged to work on the programming assignments with your classmates.

Late Policy

In general, no late assignments are accepted. However, you have two grace days for the entire semester. That means you can be late by one day for two assignments, or use the two days up for one assignment.

Submission

Homework should be submitted through the Moodle web site.

Programming assignments will have specific submission instructions included with the handouts. We will use a certain amount of automatic grading to help us deal with the massive amounts of code everyone submits, so please follow the submission instructions exactly as written!

Where are the assignments?

All assignments are posted on the schedule

Honor Code Cheating and Plagiarism is unacceptable

You are free to discuss assignments and solutions with others. However, you must write your own assignments, and must not represent any portion of others' work as your own. Assignments found to have plagiarized will be given a grade of -100\%.