CS 352: Compilers: Principles and Practice
Spring 2015
Instructor: Zhiyuan Li (office: LWSN 3154H)
This page contains only the syllabus accessible to the general public.
Enrolled students please access the rest of the important course
information on Piazza (to be up at the beginning of the Spring semester). The grade book will be maintained on Purdue's Blackboard.
Textbook
No required textbook.
Recommended reference Book:
Compilers: Principles, Techniques, and Tools (Second Edition)
A Aho & M. Lam & Sethi & Ullman
Addison-Wesley
978-032-148681-3
Course Objectives
- Through the introduction of the compiler front-end techniques, this course strengthens the understanding of the key concepts
of programming languages, including syntax rules and type rules.
It provides the theoretical foundation and implementation skills for designing and implementing new programming languages. Due to rapid changes in computer/internet applications and user environments -- new languages are often introduced to meet the new need in today's world. Compilers and interpreters are the essential tools to bring the new languages to reality.
- Through the discussion of the internal representation of programs, the course strengthens the understanding of program semantics at various abstraction levels. In particular, the impact of memory allocation on program operations will be important to the avoidance of common programming errors made by beginning programmers due to mishandling of data references.
- Through the discussion of code generation and optimization techniques, the course strengthens the understanding of the architectural level issues that can have significant impact on program performance, e.g. efficient use of the memory hierarchy (from registers to caches) and effective use of optimization options provided by today's compilers.
- Through the discussion of the basic control flow and data flow analyses, the course introduces some fundamental concepts useful for software error diagnosis.
Main Course Work
- The course has a project that implements an interpreter
for a subset of the JavaScript language, using compiler techniques studied in the course. The project will be divided into several phases with the respective due dates. The front-end of the interpreter will be built using Lex(flex)/YACC(Bison) tools.
- There will be two midterm exams and one (comprehensive) final exam.
- To prepare for the exams there will be four to five written homework assignments.
Academic Integrity Policy
Unless specified otherwise explicitly in the specific assignment/project handout, all assignments and projects must be completed by each student independently.
Copying, either electronically or manually, from others' work (from Purdue students or external sources such as the internet) is a violation of the policy. Letting a student copy one's work is also a violation. If a student claims that his/her work is copied by another student without consent, then the case will be reported, as a theft, to appropriate authorities, with the student who owns the stolen work as a key witness. A case of theft will normally result in a more severe consequence than an academic dishonesty case.
The teaching staff will diligently examine all submitted work, possibly with the help of software tools, to make sure the honesty policy is not violated.
Depending on the severity of violation, the first offense will receive a penalty of either a zero point for the specific assignment and/or an automatic reduction of the final letter grade, e.g. A to B, B to C, etc. Multiple (i.e. two or more)
offenses will automatically result in a failing letter grade for the course and a report to the university. Any dispute with the decision will be handled by the Deans of Students Office.
The instructor will collect signed agreement from all enrolled students in the first class.
If a student does not consent with the policy stated above, he or she must explain the reason to the instructor immediately after the first class. If agreement cannot be reached after discussion, the student must either withdraw from the course or appeal to the CS department immediately after the first day of the class. Students who fail to sign the agreement in the first week will be reported to CS Undergraduate Committee and possibly Deans of Students Office, and no submitted course work will be accepted by the teaching staff.