Date: Wed, 20 Nov 1996 22:39:22 GMT Server: NCSA/1.5.1 Last-modified: Wed, 20 Nov 1996 16:17:39 GMT Content-type: text/html Content-length: 5729 CIS 606 Translator Design I Fall 1996

CIS 606
Translator Design I Fall 1996



What's New on these Web Pages


OVERVIEW
This course explores basic problems in the construction of programming language translators. We study the theoretical foundations of translators and common implementation techniques. The course will focus on compilers for high-level languages, but we will also look at applying translation techniques to a variety of little languages.


LECTURES
Nichols 127, MWF 10:30-11:20 am


INSTRUCTOR
Prof. Matt Dwyer
 
Office:       Nichols 324E
Email:        dwyer@cis.ksu.edu
WWW:          http://www.cis.ksu.edu/~dwyer
Phone:        532-6350
Office Hours: MW 2:30-3:30, Thu 2:00-3:00


TEXT
Compilers : Principles, Techniques, and Tools, Aho, Sethi, and Ullman, Addison-Wesley


ADDITIONAL RESOURCES
Web pages for course will include tool documentation, assignments, solutions, test cases, and lecture notes


PREREQUISITES
CIS 500


REQUIREMENTS
The course will consist of a mixture of different kinds of assignments. A major component of your grade will be determined by a large multi-part compiler implementation project. There will be an open-book open-note in-class final exam. Occasional short homework assignments and closed-book closed-note in-class quizzes will be given. The goal of these assignments is to provide feedback to you on how you are progressing in understanding the course material. It also provides valuable feedback to me on how you are doing so that I can tailor the course to maximize the benefit to the class. The weighting used for the final grade will be : 50%project, 30%final exam and 20%homeworks and quizes.

The project consists of implementing a compiler for a Pascal-like language with classes. You may write your compiler in C, C++, Pascal or Ada (if you really want to write it in another language come and talk to me). I expect the code to be clearly organized and documented (I am very serious about this). If you use either C, C++ or Ada you can write your lexical analyzer using a scanner generator, such as flex (see "man flexdoc" for details). If you use another language you will have to build the lexical analyzer by hand. Regardless of the implementation language you will build a top-down recursive descent parser. This parser will produce an abstract syntax tree intermediate representation from which code will be generated. You may use the VCG tool to quickly and easily produce postscript depictions of your syntax trees. Your compiler will generate assembly code for the MIPS R2000/R3000. Generated programs will be executed on a MIPS simulator called spim. If you don't already know about machine architecture and assembly language programming you might start to browse the spim document.

The compiler will be implemented in four phase:

    Scanner with identifier table
    Parser with type checking
    Embellish Parser to build IR
    Optimize IR
    Code Generator

The project can be implemented either independently or in pairs. Those who chose to work in pairs will be expected to perform some local optimization of the generated code. This will involve building an additional phase to perform the IR optimization.

In part, this is an exercise in building a large software system with reasonably complicated component interactions. You will not be graded on the quality of the generated code. Correctness of the code, however, is very important. I will make a number of test files available prior to the due date of each stage. You are encouraged to use these to test your implementation. I may execute your projects on those (and other) test files. You may also create tests of your own. If there is sufficient interest we can create a class wide collection of test cases for all to use.

All students are encouraged to talk to each other about compiler concepts, design alternatives, implementation details, etc. The final product should be of your own creation. If you copy other's work you will not be prepared for the exam and you will not maximize the benefit you get from this course.


SCHEDULE


ACADEMIC HONESTY

On all assignments, you are expected to do your own work. From the Provost's office: "Plagiarism and cheating are serious offenses and may be punished by failure on the exam, paper or project, failure in the course and/or expulsion from the University. For more information refer to the `Academic Dishonesty' policy in `Inside KSU'".