Syllabus and general information for MC97: Compiler Design (Spring 1999)
MC97 attempts to draw together the theory and practice of compiler
construction. Much of the material will have a strong theoretical
foundation. However, with the exception of the last couple topics
(due to time constraints), this material will serve as the basis for
compiler-writing projects. Topics include lexical, syntactic, and
semantic analysis, code generation, data-flow analysis, register
allocation and assignment, and optimization.
I will be available in my office (OHS 303)
Mondays 10:30-11:20, Tuesdays 11:30-12:20, Wednesdays 2:30-3:20, and
March 24th, Thursday, March 25th, and Thursday, April 22nd)
and by appointment. You
may send me electronic mail at firstname.lastname@example.org or call me at
extension 7466. I'll try to put any updates to my office
hours on my web page, so check
there if in doubt.
World Wide Web
All course materials will be available through my World Wide Web page. The URL for this
course is http://www.gustavus.edu/~max/courses/S1999/MC97/.
After this syllabus I will give hardcopy handouts only to those
students who want them.
Our text will be Modern Compiler Implementation in Java
by Andrew Appel (Cambridge University Press, 1998).
On Thursdays, we will meet in the OHS 326 computer lab rather than in
the usual classroom. Each lab has one, two, or three Thursdays set aside for
us to work together, but will also require you to spend additional
time out of class.
There will be midterm and final exams, as shown on the syllabus below.
(Note that the final exam will be as scheduled by the registrar. The
date and time shown in the syllabus are the tentative projection from
the registrar's office, but are subject to change by that office.)
Students are encouraged to discuss the course, including issues raised
by the assignments. However, the solutions to assignments
should be individual original work unless otherwise specified. If an
assignment makes you realize you don't understand the material, ask a
fellow student a question designed to improve your understanding,
not one designed to get the assignment done. To do otherwise is to
cheat yourself out of understanding, as well as to be intolerably
Any substantive contribution to your solution by another person or
taken from a publication should be properly acknowledged in writing.
Failure to do so is plagiarism and will necessitate disciplinary
The same standards regarding plagiarism apply to team projects as to
the work of individuals, except that the author is now the entire team
rather than an individual. Anything taken from a source outside the
team should be be properly cited.
One additional issue that arises from the team authorship of
project reports is that all team members must stand behind all reports
bearing their names. All team members have quality assurance
responsibility for the entire project. If there is irreconcilable
disagreement within the team it is necessary to indicate as much in
the reports; this can be in the form of a ``minority opinion'' or
``dissenting opinion'' section where appropriate.
All lab assignments are due at the beginning of class on the day
indicated. Late assignments will be penalized by one ``grade notch''
(such as A to A- or A- to B+) for each weekday (that the college is in
session) late or fraction thereof. However, no late assignments will
be accepted after graded assignments are handed back.
If you are too sick to complete an assignment on time, you
will not be penalized. Simply write ``late due to illness'' at the
top of the assignment, sign your name and hand it in. Other circumstances
will be evaluated on a case-by-case basis.
Please point out any arithmetic or clerical error I make in grading,
and I will gladly fix it. You may also request reconsideration if I
have been especially unjust.
I will provide you with a letter grade on each
assignment and test, in addition to the mid-term and final
grades, so that you may keep track of your performance. As a
guideline, the components will contribute in the following proportion
to the final grade:
The 58% from labs is subdivided as follows:
- 58% lab assignments (see below)
- 24% homeworks (first two 5% each, second two 7% each)
- 8% midterm exam
- 10% final exam
- 4% whichever of labs 1-4 is the worst
- 24% the best three of labs 1-4 (8% each)
- 30% labs 5-7 (10% each)
However, I reserve the right to subjectively adjust your final grade.
Please see me if you have any question how you stand. Class
participation is not graded; however, it allows you to find and repair
the gaps in your understanding before doing the homework or exam, and
thus can dramatically improve your grade.
All homework and lab reports should be readily readable, and should
not presuppose that I already know what you are trying to say. Use
full English sentences where appropriate (namely almost everywhere)
and clear diagrams, programs, etc. Remember that your goal is to
communicate clearly, and that the appearance of these technical items
plays a role in this communication process. Be sure your assignments
are always stapled together and that your name is always on them.
Please contact me immediately if you have a learning or physical
disability requiring accommodation.
The below is my best guess as to the rate at which we will cover
material. However, don't be shocked if I have to issue one or more
revised syllabi. Where a single number appears in the reading column,
it means to read the full chapter. Where a reading is shown as
beginning with section 0 of a chapter, it means to start at the very
beginning of that chapter, before the first section heading. Note
also that I won't be present for the March 25th and April 22nd lab
|2/11||Lab 1: Warm-up interpreter||
|2/12||2.5||A lexical analyzer generator||
|2/17||3.3||LR parsing||Lab 1
|2/18||Lab 2: Lexical analysis||
|2/19||More on LR parsing||
|2/22||3.4||A parser generator||
|2/24||3.5||Error recovery||Lab 2
|2/25||Lab 3: Parsing and AST generation||
|3/3||5.3-5.4||Type checking||HW 1
|3/4||Lab 3, continued||
|3/5||More on semantic analysis||
|3/10||6.2||Storage allocation||Lab 3
|3/11||Lab 4: Semantic analysis||
|3/12||More on activation records||
|3/17||7.3||Processing declarations||HW 2
|3/18||Lab 4, continued||
|3/19||More on intermediate code generation||
|3/22||Review/catch-up/special topic||Lab 4
|3/25||Lab 5: Escape analysis||
|4/7||8||Basic blocks and traces||
|4/8||Lab 5, continued||
|4/9||More on basic blocks and traces||
|4/14||9.3||Implementing instruction selection||Lab 5
|4/15||Lab 6: Redo worst of labs 1-4||
|4/16||9.2||CISC instruction selection||
|4/21||10.2||Implementing liveness analysis||
|4/22||Lab 6, continued||
|4/28||Continued (Mayday: class 12:10-12:40)||Lab 6
|4/29||Lab 7: Liveness analysis or register allocation||
|5/5||11.5||Register allocation for trees||HW 3
|5/6||Lab 7, continued||
|5/7||12||Lab wrap-up issues||
|5/12||17.3-17.4||More on dataflow analysis||
|5/13||Lab 7, continued||HW 4
|5/17||18.3-18.5||More on loop optimization||
|5/19||Evaluation/review/catch-up/special topic||Lab 7
|5/22||Final: 10:30-12:30 in OHS 318 w/ Ron Rietz's class||
Course web site: http://www.gustavus.edu/~max/courses/S1999/MC97/
Instructor: Max Hailperin <email@example.com>