Assignment 6 (Objects and Types)


Due Date: May 31, 2000 before class

This the last assignment. It is a rather big project, and will be decomposed into several related pieces. The current edition of EOPL has a rather different explanation of objects. The following is based on the yet unpublished draft version of the new edition.

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.

Part I

Copy the following directory and all its contents:
 /cs/classes/cis624/www/code/oo 
The 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:

These four functions completely specify the semantics of the OO parts of the language.

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.


Page visited times since November 18, 1996.

sabry@cs.uoregon.edu