Target Deadline: 1pm, Wednesday, October 31, 2007
The third assignment is to complete the compiler front-end by adding an additional phase that translates your TL07 Abstract Syntax Tree into basic blocks of three-address ILOC instructions [Section 5.4.2 and Appendix A of Cooper]. You may want to add instructions to represent the READINT and WRITEINT operations. As in the examples found in Cooper, each basic block should end in a conditional branch or unconditional branch (a.k.a., jump).
In addition, you should provide a mechanism to output the 3-address code to a graphviz DOT file. Each basic block of ILOC instructions should label a node in the DOT file. These nodes should be connected to create a control flow graph (CFG) [Scott 15.3 on the CD, Cooper 5.3.2.]. The graphviz CFG labeled with ILOC instructions should have a ".cfg.dot" extension added to the base name. It should also continue to output the parse tree and AST. So if the input file name "simple.tl07", the parse-tree should be placed in "simple.pt1.dot", the AST should be placed in "simple.ast.dot", and the CFG/ILOC output should be placed in "simple.cfg.dot".
It is recommended, that...
Please see revised packaging and submission instructions.
Please see revised grading notes.
There may need to be corrections, clarifications, or other modifications to these instructions, you are responsible for monitoring the class web site, monitoring your CS account mailboxes, and listening during lecture for announcements related to this assignment.