CS301 - Compiler Construction

Fall 1998 Syllabus

 

Instructor: Panagiotis Takis Metaxas Meeting Times: T/Th 1:30 - 2:40pm. Location: SCI 173 Office Hours: WF 9:50 - 12:00 noon and by appointment

Description: A survey of the techniques used in the implementation of programming language translators. Topics include lexical analysis, the theory of parsing and automatic parser generators, semantic analysis, code generation, and optimization techniques.

Textbook: We will use Kenneth Louden's "Compiler Construction: Principles and Practice" book (required; copies available in the bookstore). It is a good idea to bring it to class.

Project: A major part of the course is constructing your own compiler. The implementation language is ANSI C. If you are not very familiar with programming in C, you may want to study Wang's "ANSI C on UNIX" book (on reserve in the Science Library and on sale at the bookstore). I have also collected a list of on-line resources for C. (If you find an interesting link about compilers or C on the web, please let me know.)

Books on reserve:

  1. Louden's textbook
  2. Wang's UNIX book
  3. Eric Roberts' "The Art and Science of C"
  4. Kernighan & Richie's "The ANSI C Programming Language"

Platform: I had hoped that we could use the NT operating system right away on our brand-new NT machines. However, technical difficulties have made this a rather bumpy choice. We will start by using poobah's UNIX and the gcc compiler, and when we have ironed out the technical problems in NT we could do the switch (if you so desire). If you do not have an account on poobah, please let me know and I will create one for you. Also, if you want to refresh your memory on UNIX, a have compiled here a list of UNIX tutorials. We are working on a new, consice tutorial which should be ready before Thursday.

Evaluation: There will be two midterm exams, four or five homework assignments and a project. There will be no final exam! The first midterm will be on Thursday, October 8, and the second on Thursday, November 19. Please mark your calendar! Both exams will be held in-class and will account for 15% of the total grade each. Homework assignments will account for 30%, while the project will account for another 30% of the total grade. The remaining 10% will be allocated to class participation and contribution (class attendance and interest, presenting your solutions in class, etc.).

Grading Policy: 90%, 75%, 60% and 50% of the total grade are the boundries that separate the A, B, C and D final grades. Plus and minus grades will also be used within a grade. For example, 73% corresponds to a C+.

Late assignment submission policy: No grade will be given for work that is submitted late. Homework and project assignments are due in the beginning of the class on the day they have been assigned for.

Word of wisdom: This course is rather heavy on programming; programming takes longer than you think; therefore start as soon as I hand out the assignment.

Collaboration Policy and the Honor Code:

You are allowed - in fact, ENCOURAGED - to discuss the homework problems with other students in the class,
BUT YOU *ABSOLUTELY* HAVE TO
THINK UP, SOLVE AND WRITE UP YOUR HOMEWORK SOLUTIONS,
CODE UP AND DEBUG AND TEST YOUR OWN PROGRAM.

Doing otherwise is a violation of the honor code - if it is not clear, please ask me!

I believe that's a safe and effective way to learn, both by interacting with your colleagues and by trying out your hand on programming ... On the other hand, asking for or looking at someone else's solution will not help you.


Pointers:

Homework

Project


Part 0 (setup)

HW1

Part 1 (scanner)

HW2

Part 2 (parser)

HW3

Part 3 (semantic analyzer)

HW4

Part 4 (code generator)

HW5