ECE 49500 - Introduction to Compilers and Translation Engineering

Lecture Hours: 3 Lab Hours: 3 Credits: 4

Counts as:

Experimental Course Offered: Fall 2007, Fall 2008, Fall 2009

Catalog Description:
The design and construction of compilers and other translators. Topics include compilation goals, organization of a translator, grammars and languages, symbol tables, lexical analysis, syntax analysis (parsing), error handling, intermediate and final code generation, assemblers, interpreters, and an introduction to optimization. Emphasis is on engineering, from scratch, a compiler or interpreter for a small programming language - typically a C or Pascal subset. Projects involve the stepwise implementation (and documentation) of such a system.

Supplementary Information:
Engineering Design Content: The course project which requires the students to construct a fully functional compiler, requires them to synthesize knowledge of programming, algorithms and data structures learned in earlier courses. The objectives and high-level design of the project are provided, but the students are required to design interfaces between different components of the compiler. Students are required to come up with tests cases for their projects, and to ensure that they will work on "hidden" test cases. Engineering Design Considerations: None

Required Text(s):
  1. Crafting a Compiler, Fischer & LeBlanc, Benjamin/Cummings, 1991, ISBN No. 0-8053-2166-7.
Recommended Text(s):
  1. Course Notes.

Learning Outcomes:

A student who successfully fulfills the course requirements will have demonstrated:
  1. an understanding of the terminology, representation and use of formal languages and grammars. [a]
  2. an understanding of terminology and techniques of Lexical analysis, parsing, semantic processing, code generation, and optimization. [a,e]
  3. an ability to design and implement a compiler, translator or interpreter for a small language based on their knowledge of (i) and (ii). [a,b,c,e,k]

Lecture Outline:

Week(s) Topic
1 Structure of a compiler
2 Scanning, Scanner Generators
2 Grammar, Parsing, Parser Generators
1 Semantic processing
1 Symbol Tables and Declarations
2 Processing Expressions and control structures
2 Procedures and Functions
2 Code Optimizations
1 Program Analysis
1 Tests

Engineering Design Content: