JMM

by Cao Qi and Jiang Zhuo (spring '06)

What is it?

The goal of this project is the development of a compiler for a tiny programming language called Java Minus Minus (abbreviated in JMM). JMM is a defined after Java, but realizes only the procedural part of Java; it does not support Object-Oriented programming.
The development of JMM requires the construction of a compiler, to translate JMM programs into another, lower-level language, like assembly. Since we choose Java as our developing language, the JMM compiler will translated to Java bytecode, and the Java bytecode will be accepted and run by the Java Virtual Machine.
To implement a compiler you roughly need: a parser (that takes a program in form of string, converts it to a syntax-tree, and performs some checks and optimizations) and a code generator (that maps the syntax-tree onto a low-level language). The parser for the JMM compiler is built manually, using an extension of the recursive-descent techinque, and the ASM framework is used to generate the low-level code (Java bytecode).