John Boyland
boyland@cs.uwm.edu
Fall 2004 (TTh 5:30-6:45pm, EMS E140)
In this course we investigate compiler construction: how a compiler is put together with particular emphasis on front-end issues, although we will cover some high-level optimizations and run-time organization as well, always with emphasis on language-dependent issues. The course will have practical assignments as well as more theoretical ones.
Students will learn the important issues of compiler construction and the theory underlying it. In particular they will learn how implement efficient and useable scanners, parsers and semantic analyzers using regular expressions, LR parsing and attribute grammars. They will also get experience in extending an existing compiler to add a major new feature as well as a new optimization.
CompSci 654 is a prerequisites; graduate standing is required for enrollment in CompSci 754. Students are expected to have practical experience building complete (albeit simple) compilers that translate a simple object-oriented language to a modern assembly language. Students should be competent writing and using regular expressions, context-free grammars and should be aware of attribute grammars. The course will involve a significant amount of programming in C++ and Java. Students who did not take CompSci 654 at UWM will need to get acquainted with the structure of the COOL compiler.
There are two recommended textbooks for the course. Both are valuable but will not be used extensively.
Michael Scott. Programming Language Pragmatics. Morgan Kaufmann, San Francisco. 1999.
Alfred V. Aho, Ravi Sethi and Jeffrey D. Ullman. Compilers: Principles, Techniques and Tools. Addison-Wesley, Reading, Massachussetts, 1986.Additionally, there will be research papers distributed in class for reading.
The grade for the course will be computed from class participation, homework assignments and a final exam. The instructor will meet with individually and privately with students periodically to discuss progress. No electronic or xerographic copying of assignments is permitted. Whether or not you have permission of the other, submitting someone else's work as your own is plagiarism, a serious instance of academic misconduct. Everyone is responsible for learning the material themselves.
The following schedule is subject to change.
| Week Starting | Topic |
| September 2 | Scanning |
| September 9 | Bottom-Up Parsing |
| September 16 | Top-Down Parsing |
| September 23 | Error recovery |
| September 30 | Attribute Grammars |
| October 7 | Evaluation Classes |
| October 14 | Attribute storage |
| October 21 | Incrementality |
| October 28 | Implementing Compound types |
| November 4 | Implementing Exceptions |
| November 11 | Implementing Coroutines/Threads |
| November 18 | Optimizing Classes |
| November 30 | Garbage Collection Considerations |
| December 7 | Intermediate Representations |
| December 14 | TBA |
| December 16 | Final Exam |
The homework assignments are anticipated to include: