Introduction to Compilers
Fall 2000 - 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: 140 Wulling Hall
Instructor: Wei Hsu Office Hours: T,Th 2:00 - 3:00 Location: EE/CS 6-207
e-mail: hsu@cs.umn.edu Phone: 612-625-2013
Teaching Assistant: Vishal Agarwal (vagarwal@cs.umn.edu) Office Hours: MW, 2:00-3:00 Location: EE/CS, 4-204 Phone: TBD
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 10/26 during the regular class hours. Final exam will be on 12/18, Monday, from 1:30 to 3:30AM. 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. 5: Introduction (Ch 1)
Sept. 7: Simple one-pass compiler (Ch 2)
Sept. 12: Extension to the simple compiler (Ch 2) Programming Assignment#1: Lexical analysis
Sept. 14: Lexical analysis (Ch 3), Lex/Flex
Sept. 19: Regular expressions, NFA, DFA (Ch 3)
Sept. 21: Syntax analysis, CFG (Ch 4)
Sept. 26: Top-down parsing, Predictive parser (Ch 4) (Assignment#1 due) Assignment#2: Parser
Sept. 28: Bottom-up parsing (Ch 4),
Oct. 3: Yacc/Bison tutorial (Ch 4)
Oct. 5: LR parsers, parser table construction (Ch 4)
Oct. 10: Syntax directed translation (Ch 5) (Assignment#2 due) Programming Assignment#3: Type checker
Oct. 12: Type-checking (Ch 6)
Oct. 17: Runtime environment and storage management (Ch 7)
Oct. 19: Parameter passing, symbol table, dynamic storage allocation (Ch 7)
Oct. 24: Mid-term review, mid-term evaluation
Oct. 26: Mid-term exam: 9:45 to 11:00
Oct. 31: (Assignment #4 and #5) Compiler project -- generating MIPS code: Part I and Part II (Assignment#3 due)
Nov. 2: Intermediate code representation (Ch 8)
Nov. 7: Storage allocation, AR layout, translating assignments (Ch 8)
Nov. 9: Translating expressions, struct, arrays (Ch 8)
Nov. 14: Translating control structures, loops, boolean Expressions, cases (Ch 8)
Nov. 16: Translating procedures, register convention, procedure call optimizations
Nov. 21: Temporary names, register assignment, register allocation (Ch 9) (Compiler project Part I due)
Nov. 23: Thanksgiving Holiday
Nov. 28: Design of code generators, local register allocation, DAG, peephole optimization (Ch 9)
Nov. 30: Global register allocation and instruction scheduling
Dec. 5: Global optimization, loop analysis (Ch 10)
Dec. 7: Global data flow analysis, optimization transformations (Ch 10)
Dec. 12: Semester review, Course evaluation (Compiler project Part II due)
Dec. 18: Final Exam: 1:30-3:30 pm
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.