CMPU 331:   Compiler Design (Spring 2015)
1  Course Requirements
1.1  The exam
1.2  The project
2  Schedule of Readings and Exams
3  Getting help
4  Fine print

CMPU 331: Compiler Design (Spring 2015)

Instructor:

 

Nancy Ide

Office:

 

104.6 SP

Phone:

 

(845) 437-5988

Email:

 

ide@cs.vassar.edu

Office Hours:

 

MW 11-12 and by appointment

Lectures

 

MW 12:00-1:15pm, 309 SP

This course familiarizes students with the design of compilers and means for their effective and efficient implementation.

Required text: Compilers: Principles, Techniques, and Tools (Second Edition), by Aho, Lam, Sethi, and Ullman.

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 Course Requirements

Requirements for the course consist of one exam 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.

Exam

 

40%

Project

 

60%

1.1  The exam

There is a single exam in this course, currently scheduled for April 22, but the date subject to change. It covers primarily the material on top-down and bottom-up parsing in Ch. 4.1-4.8 of the textbook. Consult the exam resources to help you study.

1.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. Due dates are as follows:

Lexical Analyzer

 

Monday February 23

Parser

 

Friday March 13

Symbol Table Routines

 

Wednesday April 8

Semantic actions Phase 1

 

Monday, April 20

Semantic actions Phase 2

 

Friday, May 1

Semantic actions Phase 3

 

Monday, May 11

Complete compiler

 

Wednesday, May 20

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.

2 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.

Date

 

Topic

 

 

Reading

1/28

 

Introduction, overview of compilation

 

(PPT)

 

Ch. 1, 2.1-2.5

2/2

 

Lexical Analysis

 

(PPT)

 

Ch. 2.6, 3.1-3.5, 3.8

2/9

 

DFA Optimization

 

(PPT)

 

Ch. 3.9

2/11

 

Languages, Syntax and Parsing

 

(PPT)

 

Ch. 4.1-4.3

2/16

 

Top-Down Parsing

 

(PPT)

 

Ch. 4.4

2/23

 

Bottom-Up Parsing

 

(PPT)

 

Ch. 4.5-4.6

3/2

 

More powerful bottom-up parsing

 

(PPT)

 

Ch. 4.7

3/9

 

Symbol Tables

 

(PPT)

 

Ch. 2.7, 7.1-7.3

3/30

 

The Vassar Interpreter (Keith Suderman)

 

(PPT)

 

--

4/1

 

Syntax-directed translation

 

(PPT)

 

Ch. 5

4/6

 

Intermediate Code Generation

 

(PPT)

 

Ch. 2.8, 6.1-3

4/15

 

Run-Time Environments

 

(PPT)

 

Ch. 6.4-6.5, 7.1-7.4

4/20

 

Optimization and Code Generation

 

(PPT)

 

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

4/27

 

Relational expressions and flow of control

 

(PPT)

 

Ch. 6.6-6.7

4/29

 

EXAM (Solution)

 

 

5/4

 

Procedure and function declarations and calls

 

(PPT)

 

Ch. 7.1-7.3

3 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.

4 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.