The goal of this project is for you to devise a way to interpret an a language with polymorphism in a language without it. You will put this into practice by encoding a POJay program into the OJay language. Then, using your OJay to RecJay translator from Project 7 and the RecJay interpreter I provided, you'll have POJay interpreter.
I am giving you an interpreter for RecJay (in Java), you will supply the OJay-to-RecJay translator (in ML) from the previous project, and you will complete a POJay-to-OJay translator (in ML). A script will feed the results of your translator into the RecJay interpreter.
All this is archived in a tar file. Copy the file from the class directory and untar it.
cp /cslab/class/cs365/proj8.tar . tar xvf proj8.tar
The script file contains the dummy ojay2recjay.sml
and pojay2ojay.sml
files.
Copy your ojay2recjay.sml
from last time;
I will grade this right away and give you feedback about anything not working.
Let me know very soon if you still need a working ojay2recjay
,
so that this does not impede your progress on the current project.
Your task is to write complete the code in pojay2ojay.sml
.
This file looks almost exactly like the stub file I gave you last time.
There are three driver scripts:
OJay-print
will translate from POJay to OJay,
feed the result into the OJay-toRecJay translator, and
finally print the RecJay translation to the screen,
for debugging purposes.
Usage:
./OJay-print somefile.pojay
POJay-print
will print the OJay translation to the screen,
for debugging purposes.
Usage:
./POJay-print somefile.pojay
POJay-run
will do both translations and execute the final RecJay translation.
Usage:
./POJay-run somefile.pojay
To turn in this project, please copy your
ojay2recjay.sml
and pojay2ojay.sml
to the turn-in directory I will prepare for you:
/cslab/class/cs365/turnin/proj8/xxxxxx
where "xxxxxx" is [andy|david|tyler|yelemis]. I will grade your project by running it against a collection of test files.
NOTE that you are responsible for turning in a working
ojay2recjay.sml
for this project also.
DUE: Monday Apr 7, 5:00 pm.