CS712/CS812
Compiler Design
Spring 2015
Mon/Wed/Fri 11:10am-12:30pm, 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 10-11am, 12:30-1pm; Wed 10-11am, 12:30-1pm;
Fri 10-11am, 12:30-1pm;
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
- Review the theory of regular and context-free languages.
- Learn the theory of parsing context-free languages.
- Study an advanced computer science topic, the design and implementation
of compilers and interpreters.
- Improve the understanding of programming language concepts
by studying the implementation of language features such as virtual
method calls, exceptions, prototypal inheritance and function closures.
- Improve software engineering skills via the completion
of a significant software project.
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 are registered with DSS, and eligible for
accommodations that you would like to utilize in this course, please forward
that information to me in a timely manner so that we can meet privately in
my office to review those accommodations.
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 three
exams, tentatively scheduled for Monday March 2, Wednesday April 8,
and Monday April 27.
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 third exam will
cover new material plus the material covered by the first two
exams.
Each exam will be worth 11% of the course grade.
Prior to each 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 13% 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 cover the compilation concepts
(and not the theory material
covered by the exams given during the semester).
The final exam will be worth 9% of the course grade.
In summary, your course grade will be determined in the
following way:
- Programming Project - 52%
- Homework - 6%
- Examinations - 33%
- Final Exam - 9%
Final course grades will be assigned in the following way:
- Students receiving at least 55% of the course points are guaranteed
at least a D-.
- Students receiving at least 65% of the course points are guaranteed
at least a C-.
- Students receiving at least 75% of the course points are guaranteed
at least a B-.
- Students receiving at least 85% of the course points are guaranteed
at least an A-.
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 April 2, 2015.
Comments and questions should be directed to
pjh@cs.unh.edu