CS712/CS812
Compiler Design
Spring 2016
Mon/Wed 11:10am-12:30pm and Fri 11:10-12noon, Kingsbury N133


Instructor
Catalog Description
Learning Objectives
Disability Services
Emotional or Mental Health Distress
Grading
Computer Accounts
Lecture Videos
Suggested Readings
Course Site on Piazza

Programming Project: Phase 1
Programming Project: Phase 2
Programming Project: Phase 3
Programming Project: Phase 4

Instructor

P. Hatcher
Office: Kingsbury N215B
Phone: 862-2678
E-mail: pjh@cs.unh.edu
Office Hours: Mon/Wed 12:30-2pm; Fri 10:30-11am; or by appointment (send e-mail to request an appointment).

Catalog Description

Formal languages and formal techniques for syntax analysis and parsing; organization of the compiler and its data structures; code generation. LL and LR parsing; automatic generation of scanners and parsers from high-level descriptions. Implementation of features from imperative and object-oriented languages. Students required to design and implement a compiler for a simple language.

Undergraduates can count this course as either a theory elective or as an implementation-intensive elective, but not both. For graduate students this is an implementation-intensive course.

The prerequisites for this course are CS520 and CS659

Learning Objectives

Disability Services

The University is committed to providing students with documented disabilities equal access to all university programs and facilities. If you think you have a disability requiring accommodations, you must register with Disability Services for Students (DSS). If you have questions about the process, please contact DSS at (603) 862-2607 or disability.office@unh.edu. If you have received an accommodation letter for this class, please contact me immediately so we can discuss the necessary arrangements.

Emotional or Mental Health Distress

Your academic success in this course is very important to me. If, during the semester, you find emotional or mental health issues are affecting that success, please contact the University's Counseling Center, which provides counseling appointments and other mental health services.

Grading

The theory component of the course will be evaluated by two midterm exams, tentatively scheduled for Wednesday March 9 and Monday April 18, and by a portion of the final exam, scheduled for Friday May 13. The material covered by each exam will be cumulative. That is, the second exam will cover both new material and the material covered on the first exam, and the final exam will cover new material plus the material covered by the two midterm exams. Each midterm exam will be worth 11% of the course grade. The final exam is discussed below.

Prior to each midterm exam there will be a written homework assignment to help you prepare for the exam. Each homework will be worth 2% of the course grade. Homework assignments may not be turned in late.

The implementation component of the course will be evaluated by a large programming project. You will implement an translator for a significant subset of the ECMAScript Language Specification, which is the common core for languages like Javascript, Jscript and Actionscript. The translator will be written in Java. You will use the ANTLR parser generator and the Javassist tool for generating and executing Java bytecode.

The project will consist of 4 phases:

Each project assignment will be worth 15% of the course grade and consist of 100 points. Assignments are due at midnight on the day they are due, but there is an eight-hour grace period until 8am the next day. Project assignments may be handed in late at a penalty of 10 points for one day late and 30 points for two days late. No program may be turned in more than 2 days late. The eight-hour grace period is in effect for the late submissions too.

The project is cumulative. You must live with your code for the whole semester. Solutions for phases will not be given out. Regression testing is critical.

WARNING: All students are expected to do their own work on the programming assignments (and homework and exams for that matter). No collaboration is allowed. A general rule to follow is that you may discuss the programs with other students at the concept level but never at the coding level. If you are at all unclear about this general rule, don't discuss the programs with other students at all.

WARNING: To get full credit on a programming assignment, your code must be adequately documented and structured. If we can't easily read and understand your code, you may lose points!

There will also be a final exam given during finals week. The final exam will be held in Kingsbury N101. The final exam will cover all material covered in class, including both the theory portion and the practice portion. The final exam will be worth 14% of the course grade.

In summary, your course grade will be determined in the following way:

Final course grades will be assigned in the following way:

Computer Accounts

The UNH CS server agate.cs.unh.edu is the primary computing resource for this course. You should automatically be given an account on this machine. During the semester you may use any other machines that you have access to, but for grading purposes your programs must execute on agate.cs.unh.edu.

Lecture Videos

Regular Languages and Regular Sets (14 min, slides)
Finite Automata (10 min, slides)
Regular Languages and NFAs (10 min, slides)
More About DFAs and Regular Languages (14 min, slides)
More About NFAs and DFAs (31 min, slides)
DFA Minimization (14 min, slides)
More About Regular Languages (11 min, slides)
Regular Grammars (9 min, slides)
Context Free Languages (26 min, slides)


Last modified on May 3, 2016.

Comments and questions should be directed to pjh@cs.unh.edu.