![]() |
CS 434
|
The design and construction of a compiler involves both theoretical issues of algorithm design and practical issues of software engineering. In this course we will look at both of these aspects of compiler construction. The course will involve a large software project intended to expose you to the engineering aspects of managing a large project and to familiarize you with the basic problems that must be addressed in any compiler. In class, we will explore the techniques that have been developed for lexical analysis, parsing, code generation and optimization.
|
There are no required texts for this course. I will place a copies of all the texts listed above on reserve, but...
I strongly suggest you get a copy of the Kernighan and Ritchie text on C if you are not already comfortable programming in C.
I also strongly recommend that you purchase a copy of the text by Cooper and Torczon. For many years, I have taught this course without a text, relying instead on distributing my own course notes. I will continue to distribute these notes, but after examining the Cooper and Torczon text, I decided (at the last minute) that it would be nice to try to integrate this relatively new text into the course. Given that I know that I have presented the material without a text many times, I didn't quite have the confidence to make it a required text, but I think you will all find it valuable.
Below, in the list of topics planned for our class meetings, I have indicated which sections of these texts might be appropriate readings to accompany the topics discussed in class. I have used the authors initials (i.e. C+T, A+U, ...) to refer the texts in the list of readings. I will provide additional guidance to possible readings in class when appropriate.
The following is a tentative schedule of lectures with associated readings.
Date | Topic | Readings |
1. 2/2 | The Structure of a Compiler. |
|
Symbol Table Organization. |
| |
3. 2/14 | Run-time Storage Organization. |
|
4. 2/16 | Variable Reference and Type Checking. |
|
5. 2/21 | Formal Specification of Syntax. |
|
Code Generation for Expressions. |
| |
7. 3/2 | Code Generation for Control Structures. |
|
An Introduction to Parsing. |
| |
Working with Lex and Yacc. |
| |
Intro. to LR Parsing. |
| |
11. 4/11 | Code Generation for Procedures and Procedure Calls. |
|
12. 4/13 | More Code Generation & the Correctness of LR(0) parsing |
|
13. 4/18 | Dynamic Memory Management |
|
SLR, LR(1) and LALR Parsing. |
| |
Basic Code Improvement Techniques. |
| |
Analysis for Code Improvement. |
| |
Most of the programming assignments for the course will be components of the construction of a compiler for a specially designed programming language. In addition, there will be written assignments designed to expose you to aspect of compiler construction not touched on in the main project. Your work on all homeworks and programs must conform to the "Honor Code Guidelines for Computer Science Courses" handout which I will make available. In interpreting these guidelines all the programs in this course should be treated as "homework programs".
There will be a midterm (probably) and a final examination. Final grades will be based on an average obtained by treating homework scores as 15%, project grades as 35%, the midterm as 20% and the final as 30%.
Woolite Project Schedule
Phase | Assigned | Duration | Description |
1.1 | 2/9 | 12 days | Basic Declaration Processing: Type and Variable Declarations |
1.2 | 2/21 | 7 days | Identifier Reference Processing and Type Checking |
2.1 | 3/2 | 12 days | Code Generation for Expressions |
2.2 | 3/14 | 9 days | Code Generation for Control Structures |
2.3 | 3/16 | 12 days? | Code Generation for Methods |
??? | 4/11 | 9 days | Parser and Scanner Construction |
3.1 | 4/20 | 12 days | Constant Folding |
3.2 | 5/2 | 10 days | Garbage Collection |