COMP 412: Compiler Construction for Undergraduates
Keith Cooper
Linda Torczon
Department of Computer Science
Rice University
Houston, Texas, USA
Fall 2016: Room 301, Sewall Hall Monday, Wednesday, Friday, 11:00am


Slides and/or Notes

  1. Introduction to the Course

  2. The Compiler's Front End   (a lab 1 perspecitive)
  3. Local Register Allocation   (a lab 1 perspective)
  4. Lab 1: Tutorial 1 Notes
  5. The ILOC Virtual Machine (more Lab 1 help)
  6. Lab 1: Tutorial 2 Notes   <== NEW

  7. Lexical Analysis, Part I   (Chapter 2 in EaC2e)
  8. Lexical Analysis, Part II, NFAs and Thompson's Construction
  9. Lexical Analysis, Part III, the Subset Construction and Brzozowski's Algorithm for DFA Minimization
  10. Lexical Analysis, Part IV, Hopcroft's Algorithm for DFA Minimization
    Revised section on Hopcroft's algorithm from EaC3e
  11. Lexical Analysis, Part V, Implementing Scanners from DFAs  (not presented; here for reference)

  12. Syntax Analysis I    (Chapter 3 in EaC2e)
  13. Syntax Analysis II
  14. Syntax Analysis III
  15. Syntax Analysis IV    First Sets, Follow Sets, and LL(1) table    Corrected

  16. Syntax Analysis V    Start of Bottom-up Parsing (Handles)
  17. Syntax Analysis VI
  18. Syntax Analysis VII   LR(1) table construction
  19. Syntax Analysis VIII

  20. Lab 2: Tutorial Notes

  21. Intermediate Representations, I    (Chapter 5 in EaC2e)
  22. Intermediate Representations, II

  23. Syntax-Directed Translation, I    (Chapter 4 in EaC2e)
  24. Syntax-Directed Translation, II-

  25. Code Generation Preliminaries, I
    Paper mentioned in class and lecture notes:   Robert Floyd, "An Algorithm for Coding Efficient Arithmetic Operations," CACM 4(1), January 1961, pages 42-51.

  26. Code Generation Preliminaries, II    Assignment and Memory Management

    You are responsible for material above this line on the mid-term exam

    Material below this line is covered on the final exam

  27. Array & Structure Address Calculations
  28. Function & Procedure Calls

Additional Materials

  1. Notes on Garbage Collection in Java
    It is hard to understand your Java lab's performance without understanding garbage collection and its impact on running times.
  2. The Software Stack
    What happens to code after compilation?


Fall 2016 Syllabus

Comp 412 Home Last modified Wednesday, 19-Oct-2016 08:17:44 CDT.