In this phase you will implement and test the code generation phase of your compiler for the T programming language. However, you are not responsible for handling arrays or method overloading in this phase. Arrays and method overloading will be handled (both semantic analysis and code generation) in Phase 5.
Your code generator only needs to work for syntactically and semantically correct programs.
Your compiler should read a T input file from stdin and should write Intel assembly code to stdout. Your run-time code should be written in C and placed in a file called "RTS.c".
Develop a set of tests to thoroughly test your code generator. I am not going to require that you turn in your tests for this phase, but I believe having a comprehensive set of tests will be necessary to obtain a good grade (i.e. to pass my tests!). You will also find these tests useful for doing "regression" testing during Phase 5.
As in earlier phases, please provide a Makefile for your compiler. The default Make target (topmost in the Makefile) should build your compiler (which should be called "tc").
Grading will be based on the following:
On this phase I will treat source code quality (documentation, style, etc.) as a "deductible". That is, you can only lose points: well-written source code is expected and, if I don't find it, I will deduct up to 10 points.
You can develop your compiler on any system that you have access to, but for grading purposes I will execute it on turing.unh.edu, so be sure to test in that environment.
The deliverables for this phase include the source code for your
compiler, the "RTS.c" file, and a Makefile.
Archive all your files in a tar file called "phase4.tar".
You should submit your tar file from turing.unh.edu using my "submit" script.
To turn in this assignment, type:
~cs712/bin/submit phase4 phase4.tar
Submissions can be checked by typing (also on turing.unh.edu):
~cs712/bin/scheck phase4
To receive full credit for the assignment, you must turn in your files prior to 8am on Monday April 18. Late submissions will be accepted at a penalty of 2 points for one day late, 5 points for two days late, 10 points for three days late, 20 points for four days late, and 40 points for five days late. No program may be turned in more than 5 days late.
Remember: you are expected to do your own work on this assignment!
Comments and questions should be directed to hatcher@unh.edu