CS712/CS812
Compiler Design
Spring 2002
Instructor: P. Hatcher
Office: Kingsbury M202
Phone: 862-2678
E-mail: hatcher@unh.edu
Office Hours: MWF 9:30-10:00am, MWF 11:10am-11:40noon,
and MWF 1:10-2:00pm
or by appointment.
The prerequisite for this course is CS671.
This course has two major objectives:
-
The first objective comprises the items listed in the formal course
description (in the UNH
course catalog).
That is, you will learn how modern compilers are designed and implemented
(and also a bit about the difficulties of designing languages).
-
The second objective of the course is for you to improve your
software engineering skills by:
- working with a system involving thousands of lines of code;
- working with a system written partially by others;
- working with a system for which testing is nontrivial; and,
- working with program generation tools.
Grading
The major portion (70%) of your course grade will be based upon a large
programming project.
The class will be building
a C compiler written in C that generates code for the Compaq Alpha.
Tentatively, the project will consist of five phases:
- declarations - due February 24.
- expressions - due March 10.
- statements - due March 31.
- pointers, arrays, structs and unions - due April 21.
- compile the compiler - due May 12.
Project assignments may be handed in late at a penalty of 5% per day
up to one week late.
An assignment is not considered late unless turned in after 8am
on the day after the due date.
There will be three homework assignments given
during the semester.
- Homework 1
is a programming assignment to introduce compiler writing using lex and yacc.
- Homework 2
is a written assignment concerning LL parsing.
- Homework 3
is a written assignment concerning LR parsing.
The homework (in total) will be worth 9% of your course grade.
Each assignment will be worth 3%.
The rest (21%) of your course grade will be based upon a final examination.
This examination will be comprehensive and will be closed book.
The final exam will be Thursday May 16 8-10am.
In summary, your course grade will be determined in the
following way:
- Programming Project - 70%
- Homework - 9%
- Final Examination - 21%
Textbooks
There is no required textbook for this course.
On reserve in the Kingsbury library:
- Compilers: Principles, Techniques, and Tools
by Aho, Sethi and Ullman
- Introduction to Compiler Construction with Unix
by Schreiner and Friedman
- Alpha AXP Architecture Reference Manual
by Sites and Witek
- Tru64 Unix Assembly Language Programmer's Guide
- C: A Reference Manual
by Harbison and Steele
(on the CS611 reserve list)
- The ANSI C Standard
Note that one of the books is available on-line.
You can also download PDF for the this book
here.
I do not think you need to purchase any of the above books.
Access to the copies on reserve in the library should be sufficient.
However, if you want to order your own copies of any of the books on reserve,
I suggest Quantum Books
or Amazon.com Books.
O'Reilly and Associates publishes a good book on lex and yacc:
- Lex & Yacc by Mason, Brown and Levine (about $27)
Documentation is available on-line
for the Unix utilities we will be making heavy use
of this semester.
Look in ~cs712/public/docs.
Computer Accounts
The UNH CIS Alpha servers
are the primary computing resources for this course.
You should automatically be given accounts on these machines.
During the semester you may use any other machines that you have access to,
but for grading purposes your programs must execute on the CIS Alpha machines.
Last modified on January 31, 2002.
Comments and questions should be directed to
hatcher@unh.edu