In order to avoid getting lost in generalities and abstract theories, students will build a compiler. The source language must be fairly simple so that a full compiler can be built in a semester. However, it must be sufficiently complex to illustrate the language constructs and compiler techniques we will learn in this course. The language that accomplishes this is ice9, which is described in an EBNF file.
The compiler project consists of three phases.
Subsequent phases build upon the previous phases; therefore, it is
very important to stay current on the early assignments.
The three phases are listed in the table below.
| Phase | Due | |
| 1 | Lexical/Syntactical Analysis | February 4 |
| 2 | Semantic Analysis | February 27 |
| 3 | Code Generation | March 25 |
| 4 | Project | End of semester |
Turnin directories are .../turnin/pN/<afs_id>, where ... is the root of the course directory, N is the program number, and afs_id is your AFS ID. (Ignore the dropbox area--that is generated by OIT. Enough said.)
You will always turn in a Makefile (or makefile) that correctly compiles your source into the appropriately named executable. Failing to compile is a major problem. A program that fails to compile cannot be graded and received a zero. Some leniency is given in case of technical issues. (For example, some students rely on environment variables that have different value in the TA's environment.)
Turnin directories are only to be used for source files. Do not copy binaries or object files into them. Do not use directories for compiling or storage. You may not use the directory as a cache for netscape. (You may compile in the turnin directory after you've turned in your source in order to check it, but please clean up the directory afterwards.)
Additionally, deductions will be made for some errors. First, a segmentation fault, or other catastrophic error, is bad. This error will result in up to a letter grade deduction. (It could be grounds for failing the entire assignment because, after all, most of the test files are known a priori. Core dumping on a known test is, well, bad.) Second, output should conform to the specification. Minor deviations result in grading difficulties. When TA has a problem grading, he is instructed to choose the lowest grade. Students must then appeal and show cause for the higher grade. Grossly deviating from the specification results in a penalty.
Programs will be tested on one or more of the Sun workstations in the Engineering Cluster. You may develop on a different platform. But remember that not all tools are portable; so you do so at you own peril.
Last modified: Tue Jan 8 15:07:23 EST 2002