Late Penalties: Assignments are due at the start of class on the due date, usually a Wednesday (except for Sept 8). There will be a 10% penalty for late programs turned in before the weekend, and a 25% penalty for programs turned in on Monday, after the weekend. Programs will not be accepted after the Monday following the Wednesday deadline. (Thus programs must be turned in no later than the following class period.) (See Grading Policy.)
No Team Programming: The course project has 6 parts, aiming to produce a single final program. In case you have trouble with one part, you should hand in your best effort for partial credit. Then for later parts you may use someone else's earlier program for the previous parts, with no penalty (but the borrowed code must be identified).
| Week | Dates | Topic | Assignment / Exam | Due date | Text |
| 1 | Aug 28, 30, Sept 1 | Intro, course organization.
Programming language(PL) overview. Syntax versus semantics. Run-time versus compile-time. |
|||
| 2 | Sept 6, 8 (Sept 4: Labor day) |
Compiler overview.
Translation versus interpretation. |
0. Quadruple Interpreter/
Translator |
Sept 8 | 1, 2.1 |
| 3 | Sept 11, 13, 15 | The lexical level of a language.
Lexical analysis (scanning or tokenizing). Finite-state machines (FSM, automata). |
FSM Homework | Sept 13 | 3.1 |
| 4 | Sept 18, 20, 22 | FSMs and lexical analysis, con't.
Hand-made versus automated scanners. |
2.6, 3.2, 3.3, 3.6 |
||
| 5 | Sept 25, 27, 29 | Formal description of PLs.
Grammars (context-free grammars). |
I. Initial Scanner | Sept 27 | 2.2 4.1, 4.2 |
| 6 | Oct 2, 4, 6 | Grammars con't. Flow diagrams.
Parsing and ambiguity. |
Grammar Homework | Oct 4 | 4.3 |
| 7 | Oct 9, 11, 13 | Specifics on parsing.
Top-down (recursive descent) parsing. |
Parentheses Homework | Oct 11 | 2.4, 4.4 |
| 8 | Oct 16, 18, 20 | Intro to syntax-directed translation.
Translating arithmetic expressions (AEs). |
II. Initial Parser | Oct 18 | 2.3 5.1, 5.2 |
| 9 | Oct 23, 25, 27 (Oct 27: Last drop) |
Symbol tables in PL translation.
Semantics in compliers |
Midterm Exam (review, answers) |
Oct 23 | 2.7, 7.6 |
| 10 | Oct 30, Nov 1, 3 | Translation of flow-of-control.
Goto, if-then, while. |
8.4, 8.6 | ||
| 11 | Nov, 6, 8, 10 | Activation records for functions.
Other storage management. |
III. Translate AEs to
Quadruples |
Nov 8 | 7.2, 7.3 |
| 12 | Nov 13, 15, 17 | Translation of functions.
Parameters and local storage. |
8.7 | ||
| 13 | Nov 20, 22 (Nov 23: Thanksg.) |
Work on final details of project. | |||
| 14 | Nov 27, 29, Dec 1 | Other issues: bottom-up parsers.
Compiler tools. |
IV. Translate Control
Structures |
Nov 29 | 4.5 |
| 15 | Dec 4, 6
(Dec 7, 8: Study) |
Leeway. | |||
| May 12 | Final Exam | Dec 12 8 am |
Details about Exams:
Exams appear in green in the table above.
Details about Assignments:
The main work for the semester is a continuing project, working on a small compiler for a simple (very small) subset of C/C++ (and almost Java). Assignments related to this project are given above in red boldface. Other written assignments appear in blue.
Textbook:
Compilers: Principles, Techniques, and Tools
By Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman, Addison-Wesley, 1986.