Introduction to Compilers
Fall 2001 - University Of Minnesota
Course Objectives
This course is intended to provide a general introduction to the field of compilers. It will cover theories and mechanisms of programming language processing tools, especially compilers which translate programs written in high-level languages to machine codes or other low level codes. Students will learn the principle ideas behind compilation and how to use software tools such as lex/flex, yacc/bison to build compilers or other language processing tools. The target audience consists of Computer Science majors, both at the undergraduate and the graduate levels.
Course Information
Time: TTh, 9:45 - 11:00AM Room: EE/CSci 3-111
Instructor: Wei Hsu Office Hours: T Th 11:15 to 12:15 Location: EE/CS 6-207
e-mail: hsu@cs.umn.edu Phone: 612-625-2013
Teaching Assistant: Hongliang Chang (hchang@cs.umn.edu) Office Hours: TBD Location: EE/CS, 2-209
Prerequisites: CSci 4011 or instructor's permission
Text
Alfred V Aho, Ravi Sethi, and Jeffery D Ullman, "Compilers: Principles, Techniques and Tools", Addison-Wesley, 1986.
Reference Books
M. L. Scott, "Programming Language Pragmatics", Addison Wesley, 2000, ISBN 1-55860-578-9
C. N. Fisher and R. J. LeBlank, "Crafting a Compiler", Addison Wesley, 1991, ISBN 0805321667
Links: will be added during the semester.
Class materials
All class materials will be posted on the class web site in PDF or HTML format.
Evaluation
Programming Assignments: There will be three programming assignments to get students familiar with software tools such as lex/flex and yacc/bison, and symbol table manipulation.
Compiler Implementation Project: Students are required to implement a compiler, which translate a C-like language for a RISC architecture (e.g. MIPS). More details about the project will be distributed in class. Project requires working in team of two people.
Exams: Midterm exam will be on TBD during the regular class hours. Final exam will be on TBD. Both exams will be open book and open notes.
Grading: Final grades are based on accumulated points gained
for programming assignments, compiler project and exams. The weightages for grading are: Assignments
30%, Compiler Project 30%, Midterm 20%, and Final 20%.
Late submission policy:
Rules for Imcomplete
Programming Project Policy
Sept. 4: Introduction (Ch 1)
Sept. 6: Simple one-pass compiler (Ch 2)
Sept. 11: Extension to the simple compiler (Ch 2) Programming Assignment#1: Lexical analysis
Sept. 13: Lexical analysis (Ch 3), Lex/Flex
Sept. 18: Regular expressions, NFA, DFA (Ch 3)
Sept. 20: Syntax analysis, CFG (Ch 4)
Sept. 25: Top-down parsing, Predictive parser (Ch 4) (Assignment#1 due) Assignment#2: Parser
Sept. 27: Bottom-up parsing (Ch 4),
Oct. 2: Yacc/Bison tutorial (Ch 4)
Oct. 4: LR parsers, parser table construction (Ch 4)
Oct. 9: Type-checking (Ch 6) (Assignment#2 due) Programming Assignment#3: Type checker
Oct. 11: Runtime environment and storage management (Ch 7)
Oct. 16: In-class Mid-term Exam
Oct. 18: Parameter passing, symbol table, dynamic storage allocation (Ch 7)
Oct. 23: Intermediate code representation (Ch 8)
Oct. 25: (Assignment #4 and #5) Compiler project -- generating MIPS code: Part I and Part II
Oct. 30: Storage allocation, AR layout (Ch 8) (Assignment#3 due)
Nov. 1: Translating assignments (Ch 8)
Nov. 6: Translating expressions, struct, arrays (Ch 8)
Nov. 8: Translating control structures, loops, boolean expressi
ons, cases (Ch 8)
Nov. 13: Translating procedures, register convention, procedure
call optimizations (Ch 8)
Nov. 15: Temporary names, register assignment, register allocation (Ch 9)
Nov. 20: Design of code generators, local register allocation, D
AG, peephole optimization (Ch 9) (Compiler project Part I due)
Nov. 22: Thanksgiving Holiday
Nov. 27: Global register allocation and instruction scheduling
Nov. 29: Global optimization, loop analysis (Ch 10)
Dec. 4: Global data flow analysis, optimization transformations
(Ch 10)
Dec. 6: More on data flow analysis (Ch 10)
Dec. 11: Aliases, symbolic debugging (Ch 10)
Dec. 13: Semester review, Course evaluation (Compiler project Part II due)
The views and opinions expressed in this page are strictly those of the page author.
The contents of this page have not been reviewed or approved by the University of Minnesota.