CPSC 124/258: Compiler Construction
Dr. Chuck C. Liang
Associate Professor of Computer Science,
Hofstra University .
Office Address:
201A Adams Hall
Hofstra University
Hempstead, NY 11550
Office Phone: (516 463) 5559
Email: cscccl@hofstra.edu
(<- click to send me mail)
Official Office Hours: MW 5:30-6:30pm, F 2-3pm or by appointment.
Course Description:
A study of the use of language theory and automata theory in the design
and construction of compilers. Topics to be discussed include lexical analysis,
parsing, symbol tables, syntax trees, storage allocation, error recovery, translation systems, code generation and optimization. Students will practice
programming (in Java) by writing a working compiler of limited scale for
a subset of ALGOL, Pascal, or some other language.
Prerequisite: CSC 123
Required Text: "Modern Compiler Implementation in Java, 2nd
edition
" by Andrew Appel.
Reference Material:
- "Compilers: Principles, Techniques, and Tools" by
Aho, Sethi and Ullman
Class Web Page: http://www.cs.hofstra.edu/~cscccl/csc124
Tentative Schedule and List of Topics:
- Overview of the Structure of a Compiler;
Regular Languages and Finite Automata
- Lexical analysis tools.
- Context Free Grammers;
Derivation trees, Ambiguous grammers,
- Grammer transformations; Predictive parsing
- LL, LR, and LALR parsing
- Java Cup Grammer Specifications; error handling
- Interpreters; Building parse trees
- Symbol Tables and Environments; Type Checking
- CPU cycle overiew; intermediate code generation
- Intel x86/64 architecture and Assembly language programming
- x86/64 Code Generation
- Implementing Static Scoping; Runtime stack
- Code optimazation; register allocation
- Implementing Object Orientation and other Advanced Features
Exams, Assignments and Grading:
There will be approximately one programming assignment per week.
Some written assignments will also be given. There will be a midterm
exam and possibly a final. The grade distribution will be roughly
60% programming assignments and 40% written homeworks and exams.
All material handed in must be in hard copy, and be well organized
and legible. Unreadable material will not be graded. Consultation of outside
sources (books, web material) for completion of assignments must be
pre-approved.
Late assignments will not be accepted.
Attendance: Attendance is required due to the schedule and nature of the
course.
A Note on Collaboration:
Students are expected to write their
own programs. No code sharing is allowed. Code sharing
include, but is not limited to, looking at someone else's code,
copying and pasting text, writing code together, telling a
friend what to type over the phone, and debugging a friend's program.
Students are allowed to converse and share ideas, as long as no actual
exchange of code is involved. For example, "I used an array to
represent the symbol table; the size of the array is determined
by a parameter to the constructor" is borderline acceptable. Anything
more specific would be considered code sharing.
Final Note:
Because of the advanced nature of the course,
students may be expected to learn certain topics and techniques on
their own. Depending on specific background, students may need
extra effort to keep up. This course does not teach basic programming
and OS skills. A high level of intellectual dedication is
required.
The contents of the this syllabus may be modified according
to the progress of the course.