CMPU 331:   Compiler Design (Spring 2016)
1 Textbook
2 Course Requirements
2.1 The exam
2.2 The project
3 Schedule of Readings and Exams
4 Getting help
5 Fine print

CMPU 331: Compiler Design (Spring 2016)

A class mailing list is hosted at Google Groups. Use it to ask (and answer) questions and receive general course announcements. You are responsible for reading the content of this mailing list.

1 Textbook

The textbook for this class is Compilers: Principles, Techniques, and Tools (2nd Edition), by Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman.

2 Course Requirements

Requirements for the course consist of one or two exams and completion of a large programming project. Note that we may not cover all the reading in class, but you are responsible for all assigned readings (see Schedule of Readings and Exams) and all material covered in class.







2.1 The exam

The course will have a single exam, scheduled for April 14, that covers primarily the material on top-down and bottom-up parsing in Ch. 4.1-4.8 of the textbook. Please consult the list of exam topics.

2.2 The project

The project consists of implementing a compiler front-end, in four parts: lexical analysis routines, a parser, symbol table management routines, and semantic routines. Each piece must be integrated with what has been completed previously. The project will be implemented in Java. It is strongly recommended that you use IntelliJ IDEA, a powerful IDE for Java development that is free for educational use.

Due dates are as follows:

Lexical Analyzer


Tuesday February 23



Friday March 11

Symbol Table Routines


Friday April 1

Semantic actions part 1


Monday, April 18

Semantic actions part 2


Friday, April 29

Semantic actions part 3


Saturday May 7

Complete compiler with all semantic actions


Monday, May 16

There will be no exceptions to the final due date.

Please follow the Submission instructions when handing assignments in.

The lexical analyzer, parser, and symbol table routines each count for 10% of the final grade (i.e., 50% of the project grade), and the semantic actions for 30% (50% of the project grade). Assignments and the exam are each graded on a 100 point scale.

Your compiler front-end will parse and generate intermediate code for a subset of the Pascal language. The code you will generate is interpreted and executed by The Vassar Interpreter. Detailed specifications for each phase of the compiler project will be provided as each is assigned.

This is a large project and you should regard it as on-going over the semester. It is not a trivial exercise and cannot be put off for a week’s intensive effort at the end of the semester. The following rules apply: Project pieces must be handed in on the due date or be subject to the following penalty: if handed in up to 3 days late, a penalty of 5 points; 4-7 days late, 10 point penalty. After 7 days an automatic grade of 0 is given. There will be no exceptions.

3 Schedule of Readings and Exams

The following schedule is provisory and may be subject to changes. You are responsible for keeping yourself informed of the possible evolution in content and schedule. The appropriate chapter of textbooks is generally required to be read before the corresponding class. You are responsible for keeping up with the reading and for all material covered in class (some of which may not be in the book). This includes classnotes, assignments, handouts, additional readings, etc. If you miss a class for any reason you are responsible for making arrangements with classmates to provide you with all information disseminated in class that day.









Introduction, overview of compilation




Ch. 1, 2.1-2.5



Lexical Analysis




Ch. 2.6, 3.1-3.5, 3.8



DFA Optimization




Ch. 3.9



Languages, Syntax and Parsing




Ch. 4.1-4.3



Top-Down Parsing




Ch. 4.4



Bottom-Up Parsing




Ch. 4.5-4.6



More powerful bottom-up parsing




Ch. 4.7



Symbol Tables




Ch. 2.7, 7.1-7.3



Syntax-directed translation




Ch. 5



Intermediate Code Generation




Ch. 2.8, 6.1-3



Runtime environments






The Vassar Interpreter






Exam review (topics)





*** EXAM ***





Arithmetic expressions




Ch. 6.4-6.5, 7.1-7.4



Relational expressions and flow of control




Ch. 6.6-6.7



Procedure and function declarations and calls




Ch. 7.1-7.3



Optimization and Code Generation




Ch. 9.1-9.4, 8.4-8.5, 8.7-8.8



Wrap up



4 Getting help

Your first resource for help is the Google Group. Check it to see if I or another student have already answered your question. If not, then send a message to the group.

If you need more help, please email me or come to my office. Please send me personal email only if you need to talk about something private (e.g., grades). Anything else is best discussed in public so that others can benefit.

5 Fine print

I support and implement all the general policies of Vassar, including but not limited to those related to students with disabilities, plagiarism, and respectful classroom etiquette. I expect you to always attend and participate in class.

Academic accommodations are available for students registered with the Office for Accessibility and Educational Opportunity (AEO). Students in need of disability (ADA/504) accommodations should schedule an appointment with me early in the semester to discuss any accommodations for this course that have been approved by the Office for Accessibility and Educational Opportunity, as indicated in your AEO accommodation letter.