University of Colorado at Boulder
CU: Home | Search | A to Z | Map

 

 

× Close
  • [    home    ]
  • [    courses    ]
    • comprehensive course list
    • fall semester courses
    • spring semester courses
    • summer semester courses
    • library courses
    • library course list
    • course/media purchase + shipping rates
    • professional development
    • professional development course list
  • [    distance delivery    ]
    • delivery methods
    • course access
    • course management tools
    • technical requirements
    • technical help/faq
  • [    degrees    ]
    • earn your degree from a distance
    • application + admissions
    • aerospace
    • computer science
    • electrical + computer
    • engineering management
    • telecommunications
  • [    certificates    ]
    • graduate/academic
    • professional development
  • [    registration + tuition    ]
    • academic courses
    • professional development
  • [    resources    ]
    • students
    • distance learning faculty
    • professional development instructor
    • articles + papers

Register Now Button

Interact
  •  
     
     
  • Request Information
  • Facebook
  • YouTube
Courses
  • Comprehensive Course List
  • Fall Semester Courses
  • Spring Semester Courses
  • Summer Semester Courses
  • Library Courses
  • Library Course List
  • Course/Media Purchase + Shipping Rates
  • Professional Development
  • Professional Development Course List

CSCI 5525: Compiler Construction Tools

Description
High-level programming languages like Python make programming a breeze, but how do they work? There's a big gap between Python and the machine instructions for modern computers. Learn how to translate Python programs all the way to assembly language with a pit stop at C along the way. Most compiler courses teach one phase of the compiler at a time, such as parsing, semantic analysis, and register allocation. The problem with that approach is that it is difficult to understand how the whole compiler fits together and why each phase is designed the way it is. Instead, each week we will implement a successively larger subset of the Python language. The very first subset will be a tiny language of expressions, and by the time we are done the language will include objects, inheritance, and first-class functions. Same as ECEN 5013.
Outline
Integer expressions and ASTs
Floats, bools, and polymorphism
Variables, assignment, and control flow
Lists and heap allocation
Functions and closure conversion
Objects and Inheritance
Overview of x86 assembly
Operand stacks and registers
Activation records
Struct layout and heap allocation
Instruction selection
Register allocation
Objectives
Objectives for the course
Upon completion of this class, students posses:
• an understanding of how high-level languages features, such as objects and first-class functions, are translated to machine-level operations,
• the ability to create a parser using lex/yacc,
• an understanding of program-as-data. Able to write functions that inspect and transform abstract syntax trees,
• an understanding of static analyses and the ability to implement them, in particular: o type checking and type inference. o The difference between dynamic and static type checking. o Understand polymorphism and its impact on the run-time representations of values.
• an understanding of memory management techniques, especially garbage collection.
• an understanding of how to map language features to machine-level features. In particular: o how to implement function calls in assembly. Understand calling conventions and able to write assembly code that performs function calls. o How to allocate variables to registers. Able to implement a register allocator and able to perform register allocation by hand.
Prerequisites
Fluency in at least one programming language (Java, C, C++, Python, etc.).
Students will do a lot of programming in Python, but prior knowledge of Python is not required. The course will start with a crash course on Python and Python is one of the easiest languages to learn.
A familiarity with the C programming language is needed or a willingness to learn it quickly on your own. Prior knowledge of an assembly language helps, but is not required.
Education Officer (EO)

Required

Textbooks
* Modern Compiler Implementation in Java 2nd edition by Andrew W. Appel (The book is also available in C and ML.)
* Compilers: Principles, Techniques, and Tools 2nd edition by Aho, Lam, Sethi, and Ullman
* Python in a Nutshell by Alex Martelli
* The C Programming Language 2nd edition by Kernighan and Ritchie
Hardware & Software
An x86-based computer (such as Intel or AMD) with the gnu C compiler installed.
Syllabus
http://ece.colorado.edu/~siek/ecen4553
Sample Lectures and YouTube Vignettes
Lecture Title Semester Year Type
Wed, Aug 26, 10 57 AM Fall 2009 Lecture
Mon, Aug 24, 10 55 AM Fall 2009 Lecture
Upcoming & Previous Offerings

Meeting Days Legend: Monday (M), Tuesday (T), Wednesday (W), Thursday (R), Friday (F), Saturday (S), Sunday (U)
Summer Terms: M = Maymester, A = 1st 5 weeks, B= 2nd 5 weeks, C = 8 weeks, D= 10 weeks
Refer to the Academic Calendar for specific dates.

top

Semester Term Time Days Location Instructor Additional Instructors
Fall 2009 11:00 AM - 11:50 AM MWF ECCS 1B12 Siek, J
bottom block
  • [    corporate    ]
  • [    about    ]
  • [    faq    ]
  • [    contact    ]
CU LogoCenter for Advanced Engineering and Technology Education
College of Engineering and Applied Science
University of Colorado at Boulder, 435 UCB, Boulder CO 80309-0435
303.492.6331 | FAX 303.492.5987 | caete@colorado.edu
© Regents of the University of Colorado