Project
We will build a full compiler for IC (Irish Coffee1), a Java-like programming language. Implementation proceeds in phases, as listed below. Each phase has a due date and (typically) one or more required checkpoints.
Resources
- IC Language Specification
- Sample IC programs
- Other tools (Scala, Eclipse, Mercurial, etc.)
IndentingPrintStream.java
, useful for pretty-printing. Should work just fine next to Scala code or feel free to convert it to Scala.test.sh
, sample test script- GraphViz and Dot
- Front End
- Back End
- Basic TAC specification
- x86-64 intro
- x86-64 Linux ABI
- Intel Architecture Software Developer’s Manual (Tour):
- x86-64 intro
- CSAPP from CS 240 is a good reference – refer to x86-64 parts.
- GDB cheat sheet
- GDB manual
- Example programs:
Project Phases
- Lexer: code Implement lexing.
- assign: Tuesday, 9 February
- due: Thursday, 18 February
- Front End: code Implement Parsing, ASTs, symbol tables, and type checking.
- assign: Tuesday, 16 February
- checkpoint: Thursday, 25 February
- checkpoint: Thursday, 3 March
- checkpoint: Thursday, 10 March
- due: Thursday, 17 March
- Back End: code Implement a TAC IR and translation from ASTs to TAC and from TAC to x86.
- assign: Tuesday, 29 March
- checkpoint: Thursday, 7 April
- due: Thursday, 14 April
- Optimizer: code Implement several compiler optimizations.
- assign: Friday, 15 April
- checkpoint: Friday, 22 April
- due: Friday, 29 April
- Project: code Implement a non-trivial extension to your compiler.
- assign: Monday, 4 April
- checkpoint: Tuesday, 3 May
- due: Monday, 16 May
-
Or whatever your favorite backronym is. ↩