CS 4120: Introduction to Compilers
Fall 2009

Changes:

Programming Assignment 7: Object-oriented features

Due: Wednesday, December 16

In this assignment you will complete your compiler project by adding object-oriented features. The new, extended language is called IX. It adds classes and inheritance to Iota9. The differences between IX and Iota9 are described in a separate writeup.

In addition, you are expected to fix bugs and limitations in your compiler existing from previous assignments.

You are welcome to extend the IX language in backward-compatible ways. Well-considered extensions give good karma.

The compilers from the various groups will be compared in the 2009 CS 4120 Compiler Bakeoff. The winning compiler time will gain bragging rights and be immortalized on the web page above.

Interface

Your driver must support the same command-line interface as in Programming Assignment 6.

Updates to provided code

We have updated the lexer interface files from PA1 to support the new lexemes in IX. Download cs4120-pa7.jar if your group is using the PA1 lexer interface. Updated documentation is also available.

An updated version of the runtime library is also available, with an initialization example and enchanced i9filt which understands IX symbols. Download it here: runtime.tar.gz.

Library support

The QtIX GUI Library enables IX programs to build graphical user interfaces that work cross-platform.

The LibIX library provides object-oriented extensions to the Iota9 library, including file I/O. Untar it into the runtime directory and use "make" to build it. The include directory contains the corresponding IX interface files.

Example programs

Some example programs are available for testing your compilers:

Iota9

The following Iota9 programs should still work in IX. For some even smaller programs that some PA6 submissions still failed, see the PA5 tests.

ack
Ackermann's function
mat-mult
Matrix multiply
sieve
Sieve of Eratosthenes
contrast
Image contrast enhancement
enigma
An Enigma machine cracker
lex
An Iota9 lexer

Here are some IX programs that use object-oriented features:

mandelbrot
A graphical Mandelbrot set explorer using QtIX.
kmp
A Knuth-Morris-Pratt string matcher (mostly not OO, but uses the LibIX file interface).

Submission instructions

As in previous assignments, please ensure that all your Java code lives in a package containing the NetId of at least one of your group members. Your code should compile without errors or warnings. Your code should not contain any superfluous print or debug statements.

Submit the following:

Submitting functional tests and benchmarks

For fun and good karma, you are encouraged to submit programs that you think are good functional tests or good performance benchmarks. We encourage each group to submit up to three short programs of each kind, following the guidelines set in previous assignments.

Each test case will be a valid IX source file. It should conform to the format restrictions described in the previous programming assignment description for functional test cases.