CS712/CS812
Project Phase 1
Fall 2017
Due Sunday September 24


Add features to the initial UNH Go compiler, which is available on agate in ~cs712/public/ugo.tar:

  1. (20 points) The string type and string literals, including assigning and printing strings. You only need to support raw string literals, and you may assume that string literals will only contain ASCII characters.

  2. (25 points) The sum (+), product (*) and negation (unary -) operators for the int, int64 and string types. You do not need to evaluate constant expressions at compile time.

  3. (25 points) The boolean type (including assigning and printing booleans), the equal (==), less (<), greater (>) and not (!) operators for the int, int64, string and boolean types. You do not need to evaluate constant expressions at compile time.

  4. (15 points) Evaluate constant expressions at compile time for the operators in the second and third bullet items.

  5. (15 points) Local variable declarations.

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.

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 ugo/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 ugo.tar

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

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

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


Last modified on August 28, 2017.

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