| Personalized Page | Course Objectives | Course Description | Grading | Class Hours | Exam schedule |
| Prerequisites | Manuals | Instructor and TA | Texts | Special needs | Survival Tips |
Compilers and interpreters are among the most widely used tools in software development. It is important for a computer scientist to understand the process by which programs written in high-level languages are translated and executed. Among other things, this will help you write better programs, and enable you to make more effective use of available compiler technology. The main objective of this course is to gain an in-depth understanding of the compilation process.
An important side benefit of this course would be that you will gain significant experience in OO-programming with C++.
There is a misconception that ``compiler design'' is specialized, useful only if you work in a department that earns its living by writing compilers. In reality, lexical, syntactic and semantic analyses are an integral part of most large-scale systems that process non-trivial input. In addition, most large-scale systems support programmability using special-purpose macro or scripting languages. An understanding of the language translation process is hence critical for building such systems.
In the class, we will discuss the theory and principles of developing compilers and interpreters. In the projects, you will then apply this theory (directly and indirectly) to develop a complete compiler for a high-level language. The problem of language translation is traditionally decomposed into many phases. Most common are:
All phases use a symbol table to keep track of the properties (types, number of parameters etc.) of each symbol (variables, procedures etc.). In the end, code is generated, which will be executed either directly by a machine (the so-called compiled-code approach) or by a software program that implements an "abstract machine" (the interpreter approach). Some languages (e.g., C) prefer the compiled-code approach due to its increased efficiency. Others (e.g., Java) prefer the interpreted approach due to its portability and flexibility.
The compiler will be written in C++. This course requires serious C++ programming, and you will be writing 5K+ lines of code, about half of which will be in teams of 2 to 3 students. This course isn't for those who aren't sure about their programming abilities.
We will use GNU g++ compiler on Linux, Solaris or within the cygwin environment for Windows. You should be familiar with working in an UNIX environment, including the use of Makefiles and so on. If not, be prepared to pick this up in the first couple of weeks of the course.
To help you decide if you are ready for the course, the first programming assignment will be handed out this wednesday, and will be due next friday (2/3), the last day for swapping graduate courses without petitions to the grad school.
The first module we will build for this compiler would be a symbol table manager. Following this, we will develop modules for each phase of compilation.
Lectures: Tue, Thu 9:50am to 11:10am Library N4000 (It is a good 10 minute walk from the department, 15 minutes if you are not familiar with the 4th floor of Library.) Spring Break: April 10-14 Last lecture: May 4, thursday
R . Sekar
Office: 2313E Computer Science
Office Hours: Tue-Thu 9:00am to 9:30am, 11:15am to 12:00pm
TAs:
Xianjin Zhu
Additional office hours (only during weeks when assignments are due) Friday 4:30-5:30pm
Office Hours: Monday: 4:30-5:30pm, Wednesday: 1:00-2:00pm.
Compilers: Principles, Techniques, and Tools, by Aho, Sethi, and Ullman, Addison-Wesley, 1985, 796pp. ISBN 0-201-10088-6.
Mid-term 3/2/06 CS 2129/2130 9:50am to 11:10am Final: May 16 (Tuesday) Harriman Hall 108 8:00am to 10:30am
The weightage for programming assignments, midterm and final exams will be as follows. Note that these weightages are preliminary, and are subject to change in the future. In particular, we may break the project down into more than 6 parts.
You are advised to start working on the projects at the earliest possible time even if the deadlines are far away. The date the projects are due will be clearly specified. Projects are due by 11:59pm on the specified date. Late projects will be penalized at the rate of 5% for the first day, 15% the second day and 25% per day after that. So, there is no point submitting a project more than 4 days late! No further extensions will be allowed.
Any form of copying in the course, and all forms of academic dishonesty, are considered serious offenses, and will be prosecuted to the maximum extent permitted by university policies.The minimum penalty for any form of copying, whether from your friends, the Internet or outside sources, or from previous offerings of the course, will be an F-grade.
Official prerequisites are CSE 304 and 307. I am usually willing to allow students that do not have one of these prerequisites, as long as I can be satisfied about their programming background. If you have only one of these prerequisites, please do come an talk to me so that I can formally give you permission to take the course in spite of missing one of the prerequisites.
The following manuals are available online. These manuals are linked from GNU documentation site.
If you have a physical, psychological, medical or learning disability that may impact on your ability to carry out assigned course work, I would urge that you contact the staff in the Disabled Student Services office (DSS), in the ECC building (where the Computer Store used to be), 632-6748v/TDD. DSS will review your concerns and determine, with you, what accommodations are necessary and appropriate. All information and documentation of disability is confidential.