California State University Stanislaus

CS 4300: Compiler Theory

Fall 2009

MWF (sections 1 and 2) 11:15 am - 12:13 pm, P 114,  Dr. Melanie Martin

[Basic Information]         [Announcements]         [Calendar/Assignments]         [Useful Links]

Welcome to CS 4300, Compiler Theory

Course Description

This course will introduce you to the principles of the design, evaluation, and implementation of compiler theory. This includes lexical, syntactic, and semantic analyses and syntax directed translation of programming languages, symbol table construction, error diagnostics, and code generation. In addition to learning the theory, students will construct a compiler for a subset of the C++ programming language.

Announcements and Upcoming Events


Welcome to CS 4300!
Take winter term survey:

Wrap-up Schedule:
  • On Friday 12/18 at 2:00 pm:
    • Demo
    • Final Group Report to be uploaded to submission system
      • What does and doesn't work
      • Limitations
      • What needs to be done
    • Individual Reports (email to me, confidential). About one single spaced page each analyzing:
      • Your contribution
      • Other team members contribution
      • How group worked
Exam Week Office Hours:

Tuesday, Dec. 15th:            noon - 2 pm and 4 pm - 6 pm
Wednesday, Dec. 16th:      6 pm - 9 pm - By Appointment Only
Thursday, Dec 17th:            9 am - noon and 3:30 pm - 6 pm
or by appointment

Basic Information

Textbooks are Compilers: Principles, Techniques, and Tools, by Aho, Sethi, and Ullman ( known as the dragon book) Addison Wesley; 2 edition (August 31, 2006),    
                                    ISBN-10: 0321486811,  ISBN-13: 978-0321486813 
                        flex & bison, by Levine. O'Reilly Media, Inc. (August, 2009), ISBN-10: 0596155972, ISBN-13: 978-0596155971

Instructor: Dr. Melanie Martin                                  Office: Demergasso-Bava Hall 276

Email:                               Office Phone: (209) 667-3787

Web Page:

Office Hours: 

Monday            3:35 - 4:35 pm
Wednesday       3:35 - 4:35 pm
Thursday          3:05 - 4:05 pm
and by appointment.

Best way to contact Dr. Martin:  Email  Please put "CS4300" in the subject line of the email.

Prerequisite: CS 4100
Corequisite: CS 4300 section 2

Warning: I reserve the right to make changes to the syllabus at any time during the term by announcing them in class and on my web page.

Course Email list: There is an email list set up for this course. Please join it at your earliest convenience, since class announcements and discussion may take place on the list.
To sign up, go to:
Enter your email address and cs4300-1 as the name of the list.

Campus Employee Furloughs:
For the past 10 years the CSU system has suffered chronic under-funding. This year, because of the state economic crisis, the budget cuts are draconian, $584 million, the worst ever in decades. The CSU administration is attempting to manage these cuts by dramatically increasing student fees and by furloughing almost all University employees, including faculty, staff, and administrators.  A furlough means mandatory un-paid days off for employees; there are 18 of these this year for faculty.

The days when I’m forced to cancel class because of the furloughs will be announced on the class calendar.  These days off are not holidays; they are a very concrete example of how budget cuts have consequences.  If you would like to take action, or simply learn more, I strongly recommend you contact ASI:

Grading and Policies

Final grades will be based on a term project and an exam. A plus and minus grading scale will be used to assign final grades.

Term Project:  Seventy percent of your grade will be determined by the compiler project. The grade will be composed of a team grade (50%), which will be the same for all team members, and an individual grade (50%), which will be determined by your fellow team members and the instructor, based on your individual contribution to the overall team effort. Additional information about the project requirements in available in the project handout. Project materials were developed by Dr. Ray Zarling (used with permission).

Additional project materials:
Target Language Syntax

Sample flex/bison/make applications (tar-gnuzip archives: use 'tar xzf archive.tgz to unpack) Sample code:
Virtual Machine for Quadruples

Exams, Quizzes and Homework: There will be quizzes, homework and exams given to reinforce the theory component of the course. The scores from exams, quizzes and homework will be combined into a “theory” grade, which will account for 30% of your final grade.

Academic Honesty: The work you do for this course will be your own, unless otherwise specified. You are not to submit other people's work and represent it as your own. I consider academic honesty to be at the core of the University's activities in education and research. Academic honesty is expected at all times in this course.

Cell Phone Policy: During class time, your cell phone is to be turned off and out of sight. Any use of a cell phone during class will result in confiscation of the phone until that day's class has ended or your removal from the class for that day. If you attempt to use your cell phone or leave it on during an exam, you will be considered to have finished your test, and I will collect your exam at that time.  Exceptions may be made only if you discuss your situation with me prior to the start of that day's class, in this case, your cell phone must be set to vibrate/silence.

Important dates:

(See Schedule of Courses or Academic Calendar)

Last day to add a class:                     

Sept 11;

Last day to drop a class:

Oct 6;

Last day to change grade options (CR/NC): 
Nov 20;

No classes:

Oct 13, Nov 11, Nov 26, Nov 27;

Furlough Days for Staff and Administrators
Sept 25 & 28, Oct 9 & 23, Nov 6 & 20, Dec 4.