CS 453 Programming Assignment #5 — Full MeggyJava Language

In this assignment you will complete the implementation of the full MeggyJava grammar. The primary additions are the implementation of objects and arrays. The MeggyJava demos from the beginning of the semester should now work through your compiler!

Groups for PA5

Groups can be of size 1 to 5 for PA5.

You can create a github repository for PA5 by going to the PA5 assignment in the github classroom for cs453.

Grading Details

Compiling and using your compiler will proceed as follows:
    stack build MJCPA5
    stack exec MJCPA5 TestCase.java
    java -jar MJSIM.jar -b -f TestCase.java.s > t1
    
    // Executing the Java-only version with the meggy/ package.
    javac TestCase.java
    java TestCase > t2
    diff t1 t2
   

The input files can be any PA5 MeggyJava program. The InputFile.java.s file must be such that we can run it through the AVR simulator, MJSIM.jar.

If you need additional Haskell libraries, you need to post a message on Piazza indicating you would like to use the external library. We will reply with a .cabal file that will be used to grade ALL projects. This means everyone will then be able to use that same external library.

We highly recommend you use the regression script regress.sh that was provided in Piazza @467. Read the comments in the file header to see how it works. Create multiple test cases, put them in the WorkingTestCases/ subdirectory and test your mjc compiler against the Java-only output.

For this assignment, there will be no lexer or parser errors, but there will be examples with type errors. Your compiler should catch type errors and print out a reasonable message. We will be manually comparing your messages to those generated by by the Java compiler, javac.

You will need to submit a video of your MeggyJr with a MeggyJava program that demonstrates MeggyJava language features. The picture should be named demoPA5.something, where something is .mov or whatever video format you used for PA1. You can talk during the demo.

Submitting the Assignment

Grading

Late Policy

Late assignments will be accepted up to 24 hours past the due date for a 20% deduction. The assignment will not be accepted past this period. Late means anything after 11:59pm on the day the assignment is due, including 12 midnight and 11:59pm and one second. If your assignment is late, it will not be included in the peer review process.


mstrout@cs.arizona.edu, 11/23/16, changed 50 point penalty to 25
mstrout@cs.arizona.edu, 11/13/16, updated for Fall 2016
mstrout@cs.colostate.edu, 4/20/15