COL728: Compiler Design
Sem II, 2023-24
Home
–
Administrivia
–
References
–
Labs
–
Lecture Videos
News
22 May 2024
: Course feedback posted:
lecture
,
practicals
.
29 Dec. 2023
: Course webpage goes online.
Lecture schedule
Week
Material
1
Videos:
Evolution of Compilers
Compilation is partial evaluation of the Interpreter
Introduction to Optimizations
Outline of a Compiler
Introduction to Lexical Analysis
Notes:
Introduction to Interpreters, Compilers, and Programming Languages
Lexical Analysis Examples and Regular Languages
2
Videos:
Regular Expressions
Lexical Analysis High Level Algorithm
DFA and NFA
Software Implementation of DFA and NFA
Regular Expression to NFA
Context Free Grammar
CFG Examples
Notes:
Formal Languages and Lexical Specifications
Context free languages and Derivations, Error handling, ASTs
3
Videos:
Derivation Tree and Order
Ambiguity in CFG
Error Handling
Abstract Syntax Tree
Recrusive Descent Parsing Introduction
Notes:
Context free languages and Derivations, Error handling, ASTs
Recursive Descent Parsing
Parser generators vs. handwritten parsers (2021 survey)
4
Videos:
Recursive Descnt Parsing Algorithm
Left Recursion
Predictive Parsing
LL1 Parsing
Constructing First Sets
Notes:
Recursive Descent Parsing (contd.)
Bottom up Parsing
Optional reading:
Discussion on Overflow on hand-written vs. automated parsers
Optional reading:
Blog post on parsing tools
5
Videos:
Constructing Follow Sets
Construct LL1 Parsing Table
Introduction to Bottom-up Parsing
Shift Reduce Parsing
Handles
Viable Prefixes
Structure of Viable Prefixes
NFA for recognizing viable prefixes
LR0 Algorithm
SLR Implementation
SLR Examples
Notes:
Bottom up Parsing (contd.)
6
Videos:
Module 34 : Semantic Analysis, Introduction to Scope
Module 35 : Semantic Analysis as Recursive Descent over AST
Module 36 : Types
Module 37 : Type Formalism
Module 38 : Soundness of a Typesystem
Module 39 : More Type Rules
Module 40 : Type Environments
Module 41 : Type Environment and Symbol Table
Module 42 : Typing Methods
Module 43 : Typechecker Implementation
Module 44 : Static vs Dynamic Types
Module 45 : Recovering from Type Errors
Notes:
Semantic Analysis
7
Videos:
Module 46 : Runtime Organization
Notes:
Runtime Organization
Introduction to Code Generation
8
Notes:
Code Generation
Code Generation for Objects
Optional reading:
The return of the frame pointers
9
Minor exam
10
Language Semantics (contd.)
11
Intermediate Language
Optimization Overview
Local Optimization
12
Dataflow analysis
Global constant propagation
13
Global constant propagation (contd.)
Register allocation
14
Phase Ordering Problem
Lecture Videos Playlist (Embedded)