Principles of Compiler Design CIS 29
Spring 2005
Professor Samir Chopra
(schopra@brooklyn.cuny.edu)
Question: how does a C (or your favorite high-level language) program get translated into assembly language and then into machine language?
The answer: by a compiler.
How does a compiler work? What are its
components? What are its functions? How does a compiler detect syntactic errors
in source code? How does one design a compiler? What kinds of data structures
are essential for a compiler? How is the design of a programming language
related to the design of a compiler for that language?
This class puts the 'science' back in computer science. Students will learn the principles of compiler design and obtain an understanding of one of the most fundamental of computer science concepts: how a program is converted into instructions that a machine can understand. On the way we will cover lexical analysis, syntactic analysis, recursive descent parsing, LR parsing, syntax-directed translation, type checking, run-time environments, code generation, code optimization.
Completion of this class will enable a
student to fully understand the relationships between hardware, operating
systems and programming languages and be a genuine computer scientist.
Students should be proficient in
programming concepts such as recursion, pointers, parameter passing and be
experienced in the use of data structures such as linked lists, trees, hash
tables, and stacks.
Prerequisites: Prerequisite: CIS 2.10 or 2.20 or 2.30 or 2.40 or 2.50 or 2.70 or 2.85 or
26; CIS 11 and 22. (CIS 38 would be
nice but is not necessary).
Textbook: