LMU | CMSI 488/588
COMPILER CONSTRUCTION
Syllabus • Spring, 2009
Ray Toal
rtoal@lmu.edu
Doolan 110
310.338.2773
Wednesday Evenings
4:30 p.m. – 7:00 p.m.
Doolan 219
3-4 semester hours

Objectives

To study fundamental concepts of programming language design, specification, implementation and translation through the very practical exercise of designing, writing, documenting and testing a compiler; to survey the state of the art in compiler theory and design. Students will implement a working a compiler that translates a high-level language into assembly language for the x86.

This class will have a highly practical component; students will gain working knowledge of a modern toolset for Java development including Eclipse, JUnit, Maven, JavaCC, and CVS. Students will create their compiler as an open source project and release it to the world on the public Internet, thus providing incentive to do a good job, because if a good job is done, potential employers may be impressed.

Prerequisites

Fluency in a high-level programming language such as C# or Java. Courses in Programming Languages and Systems Programming are required; courses in Computer Science Theory and Computer Architecture are exceedingly helpful.

Readings

Readings for this class include portions of the following sources, and perhaps a few other papers and reference materials chosen along the way:

Additional papers and readings will be assigned throughout the course (including my own course notes, practice problems, and sample code). If you have projects or papers to work on, you'll have to find some additional readings on your own. Use judgment when researching on the web; a fair amount of information is often wrong, and much of the so-called sample code is especially atrocious. Regardless, you must take the time for effective self-study that includes practicing the craft of programming.

Assignments and Grading

You'll have several homework sets containing in-depth theoretical questions and non-trivial programming problems, and quizzes and a final exam with less difficult material. Of course you have to build a compiler in this course, but since you have only a semester to do it the compiler will be built off of an existing compiler for a simple language; you will extend it to a compiler for a more complex language. To keep you on track, the project will be turned in in pieces, specifically as part of the five homework assignments for the semester. The assignments will also contain some theoretical problems for you to work out, too. You have to write a report documenting the architecture and design of the compiler. To help prepare you to meet industry expectations for college graduates, most assignments will take the form of open source software products. Unless otherwise specified, you are required to keep all work in your CVS repository and prepare all homework solutions with LaTeX document preparation system. Exams will cover material from lectures not previously assigned for homework: don't whine about this.

Generally, coursework may be done in groups of no more than two students; however, while only one solution set is turned in per group, both students are responsible for understanding all of its content and may be asked at any time for an oral explanation of any solution. Collaboration with other groups is fine but must be limited: you may share ideas and approaches but nothing resembling a solution (not even pseudocode). You must also acknowledge any help received. Academic dishonesty may result in expulsion; be certain your work meets the standards set forth in the LMU Honor Code.

Your final grade will be weighted as follows:

Homework sets
45 pts.
 
Quiz 1
12 pts.
 
Quiz 2
16 pts.
 
Final Exam
27 pts.
 

Letter grades are figured according to the usual scale: 90% or more of the total points gets you an A, 80% a B, 70% a C, and so on. These are minimal requirements; for example, if you get 82 points you are guaranteed a B- or better, though you might still get an A since 82 may be the top score.

Homework is due at the beginning of class; late assignments are docked 30% per class. Missing class just to get an assignment done on time will not be tolerated; the only good excuses for missing class are excellent surf conditions, family problems, sickness, and personal emergencies. Skipping class just puts your fellow students at an advantage: we often spend class time going over things that will be "on the exam".

Your programming style will play a huge part in determining your score on the programming assignments. I will not hesitate to assign D's or F's to working programs which are poorly structured, under-commented, have poor identifier names and abbreviations, contain inappropriate hard-coded values, or are not easily maintainable. Appearance of the grading policy in this syllabus constitutes fair warning of the consequences of poorly written code.

Topics and Tentative Schedule

University Links

All students will want to acquaint themselves with the useful information found in the following sources: