Course Description
An introduction to the specification and implementation of modern compilers. Topics covered include lexical scanning, parsing, type checking, code generation and translation, dataflow analysis and optimizations, and run-time support for modern programming languages. As part of the course, students will build a working compiler for an object-oriented language which is a simplified version of Java.Prerequisites
Computer Science 312, 314. The practicum (CS 413) is a required co-requisite. You may not take CS 412 without taking CS 413 too. The reason for this is that the group project is part of the grade for both 412 and 413. Familiarity with programming in Java is also expected.Course Staff
Instructor Teaching Assistant Admin. Assistant Radu Rugina
Upson 4141Maksim Orlovich
Upson 4139Noa Zaslavski
Upson 4147Textbooks
There is no required book for this class. The following are optional textbooks:Copies of these books will be on reserve in the Engineering library.
- Compilers -- Principles, Techniques and Tools (Dragon Book), by Alfred Aho, Ravi Sethi and Jeffrey Ullman. Addison-Wesley, 1988. ISBN 0-201-10088-6.
- Engineering a Compiler, by Keith Cooper and Linda Torczon. Morgan Kaufmann, 2003. ISBN 1-558-60698-X;
- Modern Compiler Implementation in Java (Second Edition), by Andrew Appel. Cambridge University Press, 2002. ISBN 0-521-82060-X.
Assignments and Grading
There are four written homework assignments. They must be done on an individual basis. The compiler project is divided up into six programming assignments that are due at various points throughout the term. Compiler projects will be performed by groups of three or four students. Groups will be created by the course staff, but taking into account student preferences. The same groups will be maintained throughout the semester if possible.
Homework assignments are due at the beginning of class on the due date. The files associated with programming assignments must be turned in electronically on the due date; the write-ups for the programming assignments are due in class the following day. Late homework and programming assignment submission will get a grade penalty of 10% per day (rounding up the number of days).
Except in unusual circumstances, you will receive the same grade in CS 412 and CS 413 and all members of a group will receive the same grade on programming assignments. Exceptions to these rules are dealt with on a case-by-case basis.
The breakdown of points per assignment is shown below. This is a tentative point breakdown and may change slightly during the semester.
Exams: 30% Prelim 1 15 Prelim 2 15 Homeworks: 20% Homework 1 5 Homework 2 5 Homework 3 5 Homework 4 5 Project: 45% Programming assignment 1 5 Programming assignment 2 9 Programming assignment 3 9 Programming assignment 4 9 Programming assignment 5 9 Project Demo 4 Other: 5% Quizzes, in-class participation, etc. 5 Total 100 Exams
The preliminary exams will cover material from the lectures. The prelims will be evening exams, scheduled on March 9 and April 27. Both will be closed-book exams. Please check out the exam dates in advance and let the course staff know if you have conflicts with these dates. There will be no final exam.