Southern Adventist University
Spring 2008
- Instructor
- Course Venue
- Textbooks
- Code We Develop in Class
- Assignments
- Prerequisite
- Course Content
- Class Requirements and Grading
- Topics
- Important Dates
- Check your grades
Instructor
Rick Halterman
School of Computing
126 Hickman Hall
Southern Adventist
University
Collegedale, TN 37315-0370
423-236-2871
halterman@southern.edu
http://computing.southern.edu/halterman
Office Hours: http://computing.southern.edu/halterman/General/OfficeHours
Course Venue
HSC 113 TTh 8:00 am
Textbooks
- Aho, Alfred, Monica Lam, Ravi Sethi, and Jeffrey Ullman Compilers: Principles, Techniques, and Tools, 2/E. 2007.
- Levine, John, Tony Mason, and Doug Brown. lex and yacc. . O'Reilly and Associates. 1995.
Prerequisites
CPTR 405 and MATH 280 or permission of instructor
Purpose
Catalog description:
CPTR 415. Compiler Construction 3 hours
Prerequisites: CPTR 405; MATH 280.
Principles and techniques of lexical analysis, parsing, semantic analysis, code generation, and optimization. Students will be required to design and implement a functional compiler for a given programming language. (Winter, even numbered years)
For this particular course offering, students will:
- explore the major phases of program translation:
- lexical analysis
- syntactic analysis (parsing)
- type checking (semantic analysis)
- optimization
- code generation
- gain experience using standard tools for compiler construction (including make, lex, and yacc)
- create a complete compiler for a higher-level programming language
Class Requirements and Grading
Grade Distribution. Final grades are determined according to the following table:
Average |
Letter Grade |
100-93 |
A |
92-82 |
B |
81-71 |
C |
60-70 |
D |
0-59 |
F |
The letter grades indicate guaranteed minimums; a plus (+) or minus (-) may be attached to further qualify a letter grade.
Class Work. The average used to determine the final grade is computed from the following class activities and is weighted as indicated.
Activity |
Weight |
Assignments |
50% |
Quizzes |
10% |
Midterm Exam |
20% |
Final Exam |
20% |
Remarks
Remarks.
This course is project-intensive. This means you should expect to spend considerable time working on the programming projects. Generally, you must submit each assignment electronically, as described in class. Your code will be compiled and checked for correctness and completeness. You may elect to work in any environment and upon any platform, but your submitted code must compile and run correctly under GNU C++ on the departmental programming host.
Any submitted work must be the original work of the submitter for an individual project or the original work of the team members for a team project. Any work or portion thereof derived from an outside source must be documented as such. Students representing the work of others as their own without giving due credit to the original authors risk receiving a grade of F in the course.
Appropriate study for the course includes reading the textbook (at least as far as last class's lecture material) and working through the exercises at the end of each chapter. Periodic quizzes encourage students to remain current in their class preparation. Usually quizzes will be distributed at the beginning of the class period. Missed quizzes may not be made up.
Each test contributes significantly to the overall grade. In certain situations, due to unavoidable circumstances, a missed test may be made up. Arrangements for the retake should be made before the time of the originally scheduled test. The make-up test may vary greatly in form from the original test, but its content (topics addressed) will be the same. Because of this difference, any points added (the so called "curve") to tests taken during the regularly scheduled time may not apply to retakes. All students must have an active account on cpp.cs.southern.edu. You should check your assignments on this machine before submitting them electronically.
Ethics. It is expected that each student work individually on individual programming assignments. For team assignments, collaboration is limited to teammates. Some exam questions will be based on experience gained by doing the assignments, so it is important that each student develop his own programs for adequate preparation for the examinations. As long as each student develops her own logic and code, it is permissible to help each other over occasional rough spots. In a team programming environment, each team member is expected to understand the workings of the complete program regardless of the division of responsibilities during development. Except among teammates, portions of programs should never be shared. Those involved in allowing their programs, or parts of their programs, to be copied, or copying from other students' programs risk receiving a grade of F in the course.
Class study. Appropriate study for the course includes reading the textbook (at least as far as last class's lecture material), experimenting with the programs from the book and programs we develop in class, working through the exercises at the end of each chapter. Periodic quizzes encourage students to remain current in their class preparation. Usually quizzes will be distributed at the beginning of the class period. Missed quizzes may not be made up; however, your final quiz score will be computed based on two fewer quizzes than were actually given, so if you miss a quiz or two it will not hurt you, and if you don't miss any quizzes it can help you.
Class decorum. Please comply with the standards of classroom attire as specified in the Student Handbook. Notebook computers are welcome, and the classroom and lab (generally) have an excellent wireless signal. Those with computers should mute the volume and sit in the rear of the class so as not to distract students behind them. Electronic devices must be turned off during quizzes and tests. You are expected to remain in the classroom during quizzes and tests, so be sure to take care of affairs (such as bathroom visits and tissue acquisition) before you sit for the quiz or test.
Examinations. Each test contributes significantly to the overall grade. In certain situations, due to unavoidable circumstances, a missed test may be made up. Arrangements for the retake should be made before the time of the originally scheduled test. The make-up test may vary greatly in form from the original test, but its content (topics addressed) will be the same. Because of this difference, any points added (the so called "curve") to tests taken during the regularly scheduled time may not apply to retakes.
The final examination is worth 20% of your total course grade. Please note the date and time for our final exam on the tentative class schedule. You need to plan to take your final exam at the scheduled time. Please make your work and vacation plans accordingly. Academic Administration will grant approval for variance from the published exam schedule only in cases of verified, serious, illness or a death in the immediate family. Academic Administration may, in case of exceptional and unavoidable circumstances, approve a variance, in consultation with the professor of this course. A $65 processing fee may be assessed.
Extra credit. Since the assigned material and activities are sufficient for most students, no extra credit will be available for additional work. However, well-prepared students wishing to enhance their learning experience beyond the class activities will be directed, upon request, to additional resources. Any such additional work will not influence the grade for this class.
SAU account. All students must have an active Southern Adventist University email account. This account is necessary to receive class messages and to be able to use the computers in the programming lab. If you normally use a different email address, please set up your SAU account to forward your email to your preferred address; instructions about how to do this are available upon request.
Learning Success Services. In keeping with University policy, any student with a disability who needs academic accommodations must call Disability Support Services at 236-2574 or stop by Lynn Wood Hall, room 308, to arrange a confidential appointment with the Disability Services Coordinator during the first week of classes. (Students who request accommodations after the third week of the semester should not depend on receiving accommodations for that semester. Legally, no retroactive accommodations can be provided. For more details, visit the Learning Success Services Web site at http://lss.southern.edu/.) Students whose accommodations requests are approved will be provided confidential letters for them to deliver to their professors for review and discussion about how to implement the accommodations in relation to particular course requirements. Accommodations for disabilities are available only as recommended by Disability Support Services.
Topics
- Introduction to compiling
- structure of a compiler
- evolution of programming languages
- applications of compiler technology
- programming language basics
- Lexical analysis
- regular expressions
- finite automata: NFAs and DFAs
- lexical analyzer generators: lex
- Syntax analysis
- context free grammars
- top-down parsing
- recursive descent
- bottom-up parsing: SLR, LR, LALR
- parser generators: yacc
- Semantic analysis
- attributed grammars
- abstract syntax trees
- type checking
- symbol tables
- Code optimization: dataflow analysis
Code transformations
- code transformations
- machine-dependent transformations
- dataflow analysis
- Runtime environments
- heap management
- garbage collection: reference counting, mark-and-sweep
- Code optimization
- code transformations
- machine-dependent transformations
- dataflow analysis
Important Dates
- Tuesday, January 8: first day of class
- Tuesday, February 26: midterm exam
- Tuesday, March 4: no class (spring break)
- Thursday, March 6: no class (spring break)
- Monday, April 28 at 8:00 AM: final exam
Class Code
Code we develop in class is available at here.