| Lectures, Exams, and Assignments, Spring 2002 | |||||
| Week | Dates | Topic | Assignment / Exam | Date | Text |
| 1 | Jan 14, 16, 18 | Intro, course organization.
Programming language(PL) overview. Syntax versus semantics. Run-time versus compile-time. |
|||
| 2 | Jan 23, 25 (Jan 21: MLK) |
Compiler overview.
Translation versus interpretation. |
Nogoto Assignment | Jan 25 | 1, 2.1 |
| 3 | Jan 28, 30, Feb 1 | The lexical level of a language.
Lexical analysis (scanning or tokenizing). Finite-state machines (FSM, automata). |
0. Quadruple Interpreter | Feb 1 | 3.1 |
| 4 | Feb 4, 6, 8 | FSMs and lexical analysis, con't.
Hand-made versus automated scanners. |
FSM Homework | Feb 6 | 2.6, 3.2, 3.3, 3.6 |
| 5 | Feb 11, 13, 15 | Formal description of PLs.
Grammars (context-free grammars). |
I. Initial Scanner | Feb 15 | 2.2 4.1, 4.2 |
| 6 | Feb 18, 20, 22 | Grammars con't. Flow diagrams.
Parsing and ambiguity. |
Grammar Homework | Feb 22 | 4.3 |
| 7 | Feb 25, 27, Mar 1 | Specifics on parsing.
Top-down (recursive descent) parsing. |
2.4, 4.4 | ||
| 8 | Mar 4, 6, 8 | Intro to syntax-directed translation.
Translating arithmetic expressions (AEs). |
II. Initial Parser | Mar 6 | 2.3 5.1, 5.2 |
| Spring Break, Mar 11-16 | |||||
| 9 | Mar 18, 20, 22 (Mar 23: Last drop) |
Symbol tables in PL translation.
Semantics in compliers |
Midterm Exam | Mar 20 | 2.7, 7.6 |
| 10 | Mar 25, 27, 29 | Translation of flow-of-control.
Goto, if-then, while. |
8.4, 8.6 | ||
| 11 | Apr 1, 3, 5 | Discuss the Postscript language. |
III. Translate AEs to
Quadruples |
Mar 29 | 7.2, 7.3 |
| 12 | Apr 8, 10, 12 | Discuss the prolog language. |
IV. Translate if, while
Structures |
Apr 12 | 8.7 |
| 13 | Apr 15, 17, 19 | Leeway | Postscript Homework | April 19 | |
| 14 | Apr 22, 24, 26
(Apr 26: B of F) |
Leeway | 4.5 | ||
| 15 | Apr 29, May 1
(May 2, 3: Study) |
Leeway. | Prolog Homework | Apr 29 | |
| Tuesday, May 7 | Final Exam | May 7 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.