Compilers

Computer Science 331

Spring, 2012

Course Information

Grading Procedures

Your grade will be based on homework, a multi-phase programming project, and two exams.
 
Point breakdown (approximate):
Project/Homework 200-250
Midterm Exam (March 21) 100
Final Exam (May 16 - 9 am) 150
Total 450-500


Policies

Please hand in assignments on time and working.  Paper-and-pencil homework assignments must be handed in by the due date; late homeworks will not be accepted.  For hands-on programming assignments, late programs will be assessed a penalty of up to 10% per day.

All late assignments must be submitted by the end of the reading period.

Regular class attendance and participation is expected of everyone in the class.

You may work on the programming projects individually or in pairs.  If you work with a partner, your pair should submit one solution for each phase of the project.

The Honor Code

The Honor Code has a straightforward application to this class.  On all of the exams you are responsible for your own work; you may neither give nor receive aid during the course of the exam.  If someone takes an exam at a different time than the rest of the class there may be no communication concerning the exam between that person and anyone else in the class, not even about whether the exam was easy or difficult.  The atmosphere is somewhat more relaxed for the homework and programming assignments.  You may discuss the problems with anyone else in the class, but you may not share your code with anyone (other than your partner on the programming projects).  You must design and write your own solutions.

Topical outline and reading assignments

  1. What is a compiler?  Why study compilers?  Languages and grammars.  Phases of a compiler.   (chapters 1, 2)
  2. Lexical analysis.  Finite state automata and regular expressions.  (chapter 3)
  3. Parsing.  (chapter 4)
  4. Syntax-directed translation.  (chapter 5)
  5. Semantic analysis and intermediate code generation.  (chapter 6)
  6. Run-time support for procedures.  Storage organization.  Parameter passing and activation records.  Heap management and garbage collection (chapter 7)
  7. Code generation:. Basic blocks and flow graphs.  (chapter 8)
  8. Machine-independent optimization.  (chapter 9)