- For the first day of class, read Chapter 1 in
the textbook (EaC2e)
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 course syllabus provides more
details, including the basis for grades. It is also available on Piazza
and in Esther.
We 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
the slides and use them to take notes.
You are responsible for the contents of the lecture notes.
We will also post some material not presented in class that you
may find helpful. See the "Additional Materials" section at the
bottom of the Lectures page.
The class will have three programming assignments,
often referred to as "labs".
All materials related to the programming exercises
will be available exclusively online.
This year, we are changing up the set of programming assignments
to reflect our experience over the last three years.
We are dropping the LL(1) parser generator and breaking the
register allocator into two distinct pieces.
Every year, we ask students what advice they would give to students
in future editions of the course. Every year, the predominant piece
of advice is to start working on the programming assignments when they
are posted. The programming assignments in COMP 412 are designed to
take the alloted time. It appears, from experience, that the assignments
take roughly the time alloted for them by the instructors.
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---scanning and parsing, register allocation,
or instruction scheduling.
To adjust grades for early and late
submissions, each student has a fixed number of "grace" days
that we will apply, automatically, to late work. In addition, on each lab
there is a hard cutoff for when late work may be submitted.
See the discussion in the
lab 1 handout for a more detailed explanation.
Questions about the programming assignments (and about the course, in
general) should be directed to the Piazza site.
If you have not received an invitation to join the Piazza site,
talk with one of the professors after class.
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.
If you have respect for intellectual property rights, you will avoid
the pirated versions.
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.