|
Mini-Java Virtual Machine
Abstract
In Modern Compiler Implementation in Java, Andrew Appel defines Mini-Java, a significantly expressive subset of the Java programming language. The undergraduate compiler course at Purdue, CS 352: Principles and Practices, is structured as one semester-long project: the implementation of a Mini-Java compiler. Individual projects are actually stages of compilation, so students will write phases of the compiler that perform syntactic analysis, semantic analysis, translation to a low-level intermediate represention (IR), and finally code generation.
The task of evaluating the validity of a translation from an Abstract Syntax Tree to a low-level IR compared to a translation performed by a reference implmentation traditionally has been somewhat difficult. Traditionally, the grader constructed a "printing pass" that could traverse an IR and generate a textual representation. This class would then traverse trees generated by the reference and student implementations; a difference in the output implied failure. Prof. Zhyuan Li concluded that it would be valuable to create a Mini-Java Virtual Machine that interprets the IR and evaluate it as a program. Given a sufficient suite of test cases, such a virtual machine could effectively determine if two IR trees are functionally equivalent.
Research Advisor: Zhiyuan Li
If you are interested in obtaining a copy of the code for personal use, please contact either myself or Antony Hosking.
|