Computer Language Engineering
Build a compiler for the Decaf language in five projects: parsing, semantic checks, x86-64 code generation, dataflow analysis and an optimizer.
Writing a working compiler teaches how programming languages are really implemented. Teams in this class build one in five stages for a language called Decaf, with lectures following each step: scanning and parsing, semantic checks, x86-64 output, dataflow analysis and then a full optimizer. The term ends with a compiler derby.
What You Will Achieve
- Specify languages with regular expressions and context-free grammars
- Build a scanner, parser and semantic checker
- Generate x86-64 code
- Implement dataflow analysis, register allocation and loop optimizations
Program Overview
Scanner, Parser and Semantic Checker
The first projects turn text into a checked program.
- Regular expressions and grammars
- Shift-reduce and top-down parsing
- Intermediate formats
- Semantic analysis
Unoptimized Code Generation
The middle project produces real machine code.
- Unoptimized code generation
- X86-64 architecture guide
- Introduction to program analysis
Dataflow Analysis and Loop Optimizations
The last projects improve the code.
- Foundations of dataflow analysis
- Instruction scheduling
- Register allocation
- Parallelization and loop optimizations
Course Completion
Job Outlook
These skills fit compiler engineering, programming language tooling and systems software development.
Good for: Strong Java programmers who want to understand compilers by building one in a team.
Keep in mind: From spring 2010. The project setup refers to Athena, a campus computing system you cannot use, so you must run Java, Ant and GCC yourself. Only selected notes are here, with no videos.
Bottom line: A thorough and honest project sequence, with test cases and skeleton code that make it workable at home.
Frequently Asked Questions
What tools do the projects need?
Java, Ant and GCC. The materials provide a skeleton and test inputs for the scanner and parser, and test cases for the later projects.
Is a textbook required?
No. There are two optional references: Appel's Modern Compiler Implementations in Java and Muchnick's Advanced Compiler Design and Implementation.
Where can I find video lectures?
Not in this version. The page says audio and video lectures from a previous semester are in the Fall 2005 lecture notes section.



There are no reviews yet.