Project #5: Type Checker

Submit: Turn in your entire Project5 directory (JavaCC grammar, abstract syntax tree classes, associated helper classes, and Makefile using the turnin command on morbius.mscsnet.mu.edu or one of the other Systems Lab machines.

Work may be completed in teams of up to three students. Be certain to include all team members' names in the file. Include a comment block at the very top of each file that contains the following:

/**
 * COSC 4400 - Project 5
 * Explain briefly the functionality of the program.
 * @authors [your names]
 * Instructor [your instructor]
 * TA-BOT:MAILTO [your email addresses]
 */

The Checker

Implement a Type Checker for our dialect of the MiniJava programming language, as detailed below.

Specification

You will need to represent two type environments -- one for the set of class descriptors, and a second scoped symbol table to be used during checking of the expressions and statements in the program. Implement this as a class Table in a package Symbol. The Table class will need methods put(), get(), beginScope(), and endScope(), as discussed in class and in the textbook. A complete list of errors that the reference implementation produces can be found here. Please match them as exactly as possible. Implement the classes of the Types package as outlined in class. (Types API can be found here.)


[back]

[Revised 2022 Oct 03 13:54 DWB]