- EGADS!: Horrible typo in Table 1 of
the Lab 3 handout has been fixed. See the new version on the
programming assignments page
- If you are looking for source to the lecture notes or other
Morgan-Kaufmann/Elsevier sales representative or see their
companion site for the book.
Comp 412 provides the student with an overview of the issues that
arise in the design and construction of translators for programming
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.
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.
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
We will use the book
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
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
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.
- Instructor: Keith Cooper, DH 2065
Office Hours: Monday afternoon, 2 to 3PM, and by appointment.
Note: I am a terrible email correspondent.
If you have trouble reaching me, call me at x6013.
- Teaching Assistants:
To be named.