The first part will consist in writing several interpreters for an object-oriented language. At this point, the language will include the minimum constructs required to write classes and objects. The first interpreter will use a straightforward but rather naive representation of objects and classes and we will progressively use more sophisticated representations. For this first phase, the language will have no type information.
Once we get this done, we will augment our language with type information, abstract classes, casts, instanceof, and subtype polymorphism.
/cs/classes/cis624/www/code/ooThe directory includes the infrastructure you need to implement the OO interpreter. It includes a parser, and an interpreter for the non-OO parts of the language. Take your time browsing the code.
Your job is to implement four structures that match the signature
OO_INTERPRETER
. I have provided you with a skeleton of
how such a structure would look like in the file oo1.sml
.
Each structure matching the OO_INTERPRETER
interface
will define its own internal representation of objects, and four functions:
elaborateClassDecls
getClassName
find_method_and_apply
new_object
I will provide detailed explanations of the requirements of each structure in the lectures. Please make sure you attend the lectures, or arrange for getting notes if you are going to miss a class.
sabry@cs.uoregon.edu