COMP 412: Topics in Compiler Construction
Keith Cooper
Department of Computer Science
Rice University
Houston, Texas, USA
Fall 2012: Room TBA, Duncan Hall, Monday, Wednesday, Friday, 11:00am

Notes


Summary

Comp 412 provides the student with an overview of the issues that arise in the design and construction of translators for programming languages. The course emphasizes techniques that have direct application to the construction of compilers. However, many of the same concepts find application in the implementation of interpreters.

The course consists of lectures, programming assignments, and exams. A tentative schedule for the programming assignments is given on the programming assignments page. The exams will fall (roughly) at the end of the fourth week, the ninth week, and during the final examination period. The lectures correspond, with a few detours, to a front-to-back tour of a compiler. The programming assignments attempt to illuminate particular problems in compiler construction.

Lecture Notes

I will post PDF-format copies of the slides used in class as they become available. Typically, they will be available several hours before lecture. In previous years, students have found it effective to print the small form of the slides and use them to take notes. You are responsible for the contents of the lecture notes.


Programming Assignments

The class will have four programming assignments, often referred to as "labs". The first lab will be available on the day of the second class and will be due seven days later.

All materials related to the programming exercises will be available exclusively online.

We have established a discussion page for the course on Piazza. Questions about the programming assignments (and about the course, in general) should be directed to the Piazza page. Enrolled students should receive an email inviting them to join the course. If you have not received the invitation, contact the professor after class.

The philosophy for programming exercises in Comp 412 is simple. Each lab is intended to have a high ratio of thought to programming. Thus, you will build components that might fit into a compiler, rather than building a complete compiler. We have abstracted away much of the routine work and focused the labs on tasks that should give you deeper insight into a specific problem---compiling, register allocation, parsing, and instruction scheduling.


Textbook

We will use the book Engineering a Compiler, Second Edition, by Cooper and Torczon, published by the Morgan-Kaufmann imprint of Elsevier. We have started an Errata site; it will, undoubtedly, grow over time. Copies can be purchased at the Rice Campus bookstore, direct from the publisher, or at your favorite online retailer. If you find errors, please let the authors know. The authors donate an amount equal to the royalties that would be generated by the enrollment in Comp 412 to the Torczon fellowship fund at Rice, which provides financial support to a Rice undergraduate (almost always a declared Computer Science major).

You may be tempted to download a pirated copy from the Internet. The only pirated digital copies that we have seen are extremely early manuscripts of the first edition; they lack much of the material that will be covered in the course. Copies of the text are on reserve in Fondren Library.

One problem with using a text written by the professor is that the lectures and the book take, largely, the same approach to the material. You are encouraged to consult other texts and other sources. Fondren Library has an excellent collection of texts on compiler construction that can provide additional enlightenment and alternative viewpoints.

Practice Exams


Syllabus

Rice policy requires a published syllabus for the course. The syllabus details specific information that may be useful to students in Comp 412. See the notes for Lecture 1 for more details on the basis for grading in the course.


Personnel


Comp 412 Home Last modified Tuesday, 13-Nov-2012 16:52:00 CST.