CS230
Compiler Design
Instructor
Frederic Green, Mathematics/Computer Science,
BP 334, ext. 7410. E-mail: fgreen (at) black (dot) clarku (dot) edu.
Lectures
Tuesdays and Thursdays, 10:25am-11:40am, BP 312; Labs on Tuesdays 1:25 - 2:40pm in BP310.
Office Hours
Tuesday 3-5 and Thursday 1-3 (usually around until 5 at least). If
you can't make it at those times, for appointment send e-mail to
fgreen (at) black (dot) clarku (dot) edu.
Text
Compilers: Principles, Techniques, and Tools, Alfred V. Aho, Ravi Sethi,
and Jeffrey D. Ullman, Addison-Wesley.
Course Goals
To study the theory and practice of compiler design. In particular, we
will discuss the principles and algorithms involved in parsing source programs,
analyzing their semantics, and generating intermediate code from them.
We will continue with an introduction to some of the design principles
of the "back-end" of a compiler: for example, optimization, register allocation
and code generation. Practical experience will be gained by writing a small
Pascal compiler with MIPS (or the assembly code of your
choice) as a target language.
Course Work
Tests will consist of a midterm and a final, comprising 50% of the final
grade. The remaining 50% will be determined by the project (see below)
and (perhaps) an occasional additional homework assignment.
The Project
Writing a compiler is no small task, but fear not.... the project will
be broken down into a set of five smaller, manageable assignments; detailed
information will be given shortly. Grades are based on performance (does
it work?), style, design and documentation.
Course Outline
The plan of the book will be followed fairly closely.
You are responsible for all material discussed in lectures, and whatever
I tell you in the book (certainly not all of it!). Here is a list of topics
and the corresponding sections in the text:
I - A model compiler 1, 2
II - Lexical Analysis 3.1 - 3.7, 3.9
III - Parsing 4.1
A - Quick review of CF grammars 4.2, 4.3
B - Top-down parsing
(recursive descent
& LL) 4.4
C - Bottom-up parsing (LR & LALR) 4.5 - 4.7
IV - Semantic analysis 5.1 - 5.5
V - Intermediate code generation 6.1-6.8
A - Syntax-directed translation
B - Abstract syntax trees, triples, etc.
VI - Run-time environments 7.1 - 7.5
VII - Code generation 8.1 - 8.8
VIII - Code optimization 9.1 - 9.4
Project Assignments
Links
Back to Fred Green's Home Page