|
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 an 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. Instead, I will place several of the texts listed above on reserve. 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. F+L, 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/5 | The Structure of a Compiler. |
|
| Symbol Table Organization. |
| |
|
3. 2/15 | Run-time Storage Organization. |
|
| Variable Reference and Type Checking. |
| |
| Formal Specification of Syntax. |
| |
| Code Generation for Expressions. |
| |
| Code Generation for Control Structures. |
| |
| An Introduction to Parsing. |
| |
| Code Generation for Procedures and Procedure Calls. |
| |
|
10. 3/19 | Dynamic Memory Management |
|
|
9( pt.2). 4/5 | Code Generation for Procedures and Procedure Calls. |
|
|
11. 4/7 | Parser Construction with Yacc. |
|
|
12. 4/9 | Scanner Generation. |
|
| Intro. to LR Parsing. |
| |
| Basic Code Improvement Techniques. |
| |
|
15. 4/28 | The Correctness of LR(0) parsing |
|
|
16. 4/30 | SLR, LR(1) and LALR Parsing. |
|
|
5/5 | Mid(?)term Exam | Sample midterm from Fall 1994 |
| SLR, LR(1) and LALR Parsing. (cont.) |
| |
| 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. Both exams will be "self-scheduled" open-book examinations. 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%.
Project Schedule
| Phase | Assigned | Duration | Description |
| 1.1 | 2/10 | 9 days | Basic Declaration Processing: Type and Variable Declarations |
| 1.2 | 1/19 | 12 days | Identifier Reference Processing and Type Checking |
| 2.1 | 3/3 | 9 days | Code Generation for Expressions |
| 2.2 | 3/12 | 7 days | Code Generation for Control Structures |
| 2.3 | 3/19 | ?? days | Code Generation for Procedures |
| ??? | 4/12 | 9 days | Parser and Scanner Construction |
| 3.1 | 4/21 | 9 days | Constant Folding |
| 3.2 | 4/30 | 7 days | Common Subexpression Identification |
| 3.3 | 5/7 | 7 days | Common Subexpression Elimination |
Links to the descriptions of the project phases will appear above as the course progresses.
Homework Exercises: