# Video Slides

Here you can download the original and annotated slides for each video.

I. Introduction | Original | Annotated
Introduction |  |
Structure of a Compiler |  |
The Economy of Programming Languages |  |

II. The Cool Programming Language | Original | Annotated
Cool Overview |  |
Cool Example II | — | —
Cool Example III | — | —

III. Lexical Analysis | Original | Annotated
Lexical Analysis |  |
Lexical Analysis Examples |  |
Regular Languages |  |
Formal Languages |  |
Lexical Specifications |  |

IV. Finite Automata | Original | Annotated
Lexical Specification |  |
Finite Automata |  |
Regular Expressions to NFAs |  |
NFA to DFA |  |
Implementing Finite Automata |  |

V. Parsing | Original | Annotated
Introduction to Parsing |  |
Context-Free Grammars |  |
Derivations |  |
Ambiguity |  |

VI. Top-Down Parsing | Original | Annotated
Error Handling |  |
Abstract Syntax Trees |  |
Recursive Descent Parsing |  |
Recursive Descent Algorithm |  |
Left Recursion |  |

VII. Bottom-Up Parsing I | Original | Annotated
Predictive Parsing |  |
First Sets |  |
Follow Sets |  |
LL(1) Parsing Tables |  |
Bottom-Up Parsing |  |
Shift-Reduce Parsing |  |

VIII. Bottom-Up Parsing II | Original | Annotated
Handles |  |
Recognizing Handles |  |
Recognizing Viable Prefixes |  |
Valid Items |  |
SLR Parsing |  |
SLR Parsing Example |  |
SLR Improvements |  |
SLR Examples |  |

IX. Semantic Analysis and Type Checking | Original | Annotated
Introduction to Semantic Analysis |  |
Scope |  |
Symbol Tables |  |
Types |  |
Type Checking |  |
Type Environments |  |
Subtyping |  |
Typing Methods |  | *
Implementing Type Checking |  |

*Annotated slides 1–4 have been misplaced. Our apologies.

X. Cool Type Checking | Original | Annotated
Static vs. Dynamic Typing |  |
Self Type |  |
Self Type Operations |  |
Self Type Usage |  |
Self Type Checking |  |
Error Recovery |  |

XI. Runtime Organization | Original | Annotated
Runtime Organization |  |
Activations |  |
Activation Records |  |
Globals & Heap |  |
Alignment |  |
Stack Machines |  |

XII. Code Generation | Original | Annotated
Introduction to Code Generation |  |
Code Generation I |  |
Code Generation II |  |
Code Generation Example |  |
Temporaries |  |
Object Layout |  |

XIII. Operational Semantics | Original | Annotated
Semantics Overview |  |
Operational Semantics |  |
Cool Semantics I |  |
Cool Semantics II |  |

XIV. Local Optimization | Original | Annotated
Intermediate Code |  |
Optimization Overview |  |
Local Optimization |  |
Peephole Optimization |  |

XV. Global Optimization | Original | Annotated
Dataflow Analysis |  |
Constant Propagation |  |
Analysis of Loops |  |
Orderings |  |
Liveness Analysis |  |

XVI. Register Allocation | Original | Annotated
Register Allocation |  |
Graph Coloring |  |
Spilling |  |
Managing Caches |  |

XVII. Garbage Collection | Original | Annotated
Automatic Memory Management |  |
Mark and Sweep |  |
Stop and Copy |  |
Conservative Collection |  |
Reference Counting |  |

XVIII. Java | Original | Annotated
Java |  |
Java Arrays |  |
Java Exceptions |  |
Java Interfaces |  |
Java Coercions |  |
Java Threads |  |
Other Topics |  |