CS712/CS812
Project Phase 1
Fall 2018
Due Sunday September 23


Add features to the distributed T compiler, which is available on agate in ~cs712/public/tc.tar:

  1. (20 points) declaration and use of main block variables

  2. (20 points) assignment operator

  3. (15 points) if, while, block and empty statements

  4. (10 points) break and continue statements

  5. (35 points) additional integer operators: subtraction, multiplication, division, greater than, less than, equals and not

You should be sure to complete the first three items in the above work list because they will be used to test your Phase 2, Phase 3 and Phase 4 submissions. The remaining items in the list will not be used to test your Phase 2, Phase 3 and Phase 4 submissions.

You should complete the first four items in the above work list in the order that they are presented. That is, declaration of variables will be used to test assignment, assignment will be used to test the if and while statements, and while statements will be used to test break and continue.

Also, you must maintain the -AST flag for all the new tree nodes that you add. Reviewing the AST dump will be part of grading this assignment.

There are some initial test files available on agate in ~cs712/public/tests/phase1.

To get full credit, your code must be adequately documented and structured. If I can't easily read and understand your code, you may lose points.

You must give me back the system in the same form that I gave it to you. I must be able to install it and run it in the exact same way as when it was delivered to you. I would also like you to keep the source code organized in the same directory hierarchy. If you fail to do this, a significant deduction will be made to your grade.

Note that there is a script, distribute.sh, in tc/bin, which will generate a tar file for you. This tar file is what I require you to submit to me for grading.

To turn in this assignment, type (on agate.cs.unh.edu):
~cs712/bin/submit phase1 tc.tar

Submissions can be checked by typing (on agate.cs.unh.edu):
~cs712/bin/scheck phase1

The assignment is due on Sunday September 23. There is a grace period to 8am on Monday September 24 when no late penalty will be assigned. Submissions between 8am September 24 and 8am September 25 will have a late penalty of 10 points. Submissions between 8am September 25 and 8am September 26 will have a late penalty of 30 points. No submissions will be accepted after 8am on Wednesday September 26.

Remember: you are expected to do your own work on this assignment.


Last modified on September 6, 2018.

Comments and questions should be directed to pjh@cs.unh.edu