In this class, you will be writing an optimizing compiler for a toy programming language, which we will call, TL07 (and targeting the SPIM MIPS Simulator.) You may choose to implement your project in Java, C++, or Standard ML; I will be able to provide the most advice if you choose Java.
This project is divided 4 required and three extra credit parts. The four required parts will necessitate writing a working compiler that parses TL07 and translates it through an Abstract Syntax Tree representation, a low-level three-address IR, and into MIPS assembly code. The completed compiler will produce a separate output for each part; except for the final assembly code output, this output will be in the form of Graphviz DOT files.
The three extra credit parts involve optimizations. If you're intrested in compiler research; these are well worth your time. The first piece of extra credit is to translate roundtrip from three-address code to SSA and back to three-address code again. (BTW, if you're looking at the Fall 2005 project, I no longer recommend Brandis and Mössenböck's method.) The second extra-credit part is to perform some scalar Machine-Independent Optimizations in three-address code. The third part is to perform register allocation.
At four fixed dates, each student will need to turn in their compiler in its current state on that date. At each submission date, each student will be given a grade for their progress as of that date (worth up to 7 points). Students should aim, at minimum, to complete one of the required parts by each of the scheduled delivery dates.
In addition, each part of the compiler will receive a grade worth up to 28 points (10 points for extra credit parts). An initial grade will be assigned when the student indicates that that part is complete and requests that it should be graded.
Regrades of a particular part of the compiler may be requested at any delivery date subsequent to the initial grading. The requested part will be graded using the same criteria as the initial grade and the resulting grade will replace the original grade. Regrades requested as part of the final (November 21, 2007) submission will only replace the original grade if they are higher.
Grading of completed parts will be based on an assessment of the following (in order of importance):
A grade of 25, 26, or 27 doesn't necessarily mean that there is anything specifically wrong with the compiler; it may just mean that one or more points were reserved to reward students that did exceptionally well in one or more ways.
Please see revised submission instructions.