| Lectures, Exams, and Assignments, Spring 2001 | |||||
| Week | Dates | Topic | Assignment / Exam | Date | Text |
| 1 | Aug 27, 29, 31 | Intro, course organization.
Programming language(PL) overview. Syntax versus semantics. Run-time versus compile-time. |
|||
| 2 | Sept 5, 7 (Sept 3: Labor day) |
Compiler overview.
Translation versus interpretation. |
Nogoto Assignment |
Sept 7 | 1, 2.1 |
| 3 | Sept 10, 12, 14 | The lexical level of a language.
Lexical analysis (scanning or tokenizing). Finite-state machines (FSM, automata). |
0. Quadruple Interpreter |
Sept 14 | 3.1 |
| 4 | Sept 17, 19, 21 | FSMs and lexical analysis, con't.
Hand-made versus automated scanners. |
FSM Homework | Sept 19 | 2.6, 3.2, 3.3, 3.6 |
| 5 | Sept 24, 26, 28 | Formal description of PLs.
Grammars (context-free grammars). |
I. Initial Scanner | Sept 26 | 2.2 4.1, 4.2 |
| 6 | Oct 1, 3, 5 | Grammars con't. Flow diagrams.
Parsing and ambiguity. |
Grammar Homework |
Oct 3 | 4.3 |
| 7 | Oct 8, 10, 12 | Specifics on parsing.
Top-down (recursive descent) parsing. |
2.4, 4.4 | ||
| 8 | Oct 15, 17, 19 | Intro to syntax-directed translation.
Translating arithmetic expressions (AEs). |
2.3 5.1, 5.2 |
||
| 9 | Oct 22, 24, 26 (Oct 26: Last drop) |
Symbol tables in PL translation.
Semantics in compliers |
Midterm Exam
(review, answers) |
Oct 24 | 2.7, 7.6 |
| 10 | Oct 29, 31, Nov 2 | Translation of flow-of-control.
Goto, if-then, while. |
Simple Quad Assign | Nov 2 | 8.4, 8.6 |
| 11 | Nov 5, 7, 9 | Discuss the Postscript language. | II. Initial Parser | Nov 7 | 7.2, 7.3 |
| 12 | Nov 12, 14, 16 | Discuss the prolog language. | Nov 14 | 8.7 | |
| 13 | Nov 19, 21 (Nov 22: Thanksg.) |
Work on final details of project. |
III. Translate AEs to
Quadruples |
||
| 14 | Nov 26, 28, 30 | Leeway | 4.5 | ||
| 15 | Dec 3, 5
(Dec 6, 7: Study) |
Leeway. |
IV. Translate if, while Structures |
Dec 5 | |
| Dec 11 | Final Exam (review) |
Dec 11 8 am |
|||
Late Penalties: Assignments are due at the start of class on the due date, usually a Wednesday. 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 5 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).
Details about Exams: Exams appear in green in the table above.
Textbook:
Compilers: Principles, Techniques, and Tools
By Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman, Addison-Wesley, 1986.