CS 3723 Programming Languages -- Spring 2000


Project Overview

The main work for the semester is a continuing project, working on a small compiler for a simple (very small) subset of C/C++, mostly contained in Java also.

Languages to Use:

There are three languages at issue here, and the situation can be confusing. The implementation language is the programming language you use to write the project. The source language is the language to be translated by the compiler, and the target laguage is the language into which your compiler is translating the source.

For this course the implementation language can be either C, C++, or Java. (Or even C with C++ features like I/O.) I assume that most of you will use C. You should pick a language you are reasonably well familiar with.

As mentioned above, the target language will be a subset C or C++. We will start just with simple arithmetic expressions and assignments, and then add features. There is no requirement that we implement the semantics (= meaning) of C++, even if we have some of C++'s syntax (= appearance).

The initial target language will be an intermediate language known as quadruples, named this because each machine instruction has 4 parts: the operator, up to two operands, and one result. This is an intermediate language in the same sense that Java byte code is also one, those these two intermediate languages are only similar in that they both are halfway to machine code. See Quadruple Machine for a formal description of quadruples.

The final target language will be MIPS assembly code. We will either rewrite the compiler to target MIPS directly or will write a translator from quadruples to MIPS. (One can also write software that will directly execute the quadruples -- this is similar to the way the Java virtual machine directly executes Java byte code.)

Details about Assignments:


Revision Date: 12/28/99