CS403

Compilers

How source code becomes machine code: lexing, parsing, semantic analysis, and code generation.

10 modules · 50 lessons · Practice after every lesson

Syllabus

  1. Module 1

    Compiler Architecture

    • Language Processing Pipelines
    • Source Languages, Target Machines, and Runtimes
    • Compiler Phases and IR Boundaries
    • Ahead-of-Time, Just-in-Time, and Interpretation
    • Correctness and Diagnostics
  2. Module 2

    Lexical Analysis

    • Tokens and Lexical Specifications
    • Regular Expressions and Automata
    • Maximal Munch and Ambiguity
    • Scanner Generation
    • Source Locations and Lexical Errors
  3. Module 3

    Parsing

    • Context-Free Grammars for Programming Languages
    • Top-Down Parsing
    • LL Parsing and Left Recursion
    • Bottom-Up and LR Parsing
    • Parser Generators and Error Recovery
  4. Module 4

    Abstract Syntax and Semantic Analysis

    • Concrete and Abstract Syntax Trees
    • Symbol Tables and Scope Resolution
    • Name Binding
    • Type Checking
    • Semantic Error Reporting
  5. Module 5

    Intermediate Representations

    • Three-Address Code
    • Control-Flow Graphs
    • Static Single Assignment Form
    • Dataflow Facts and Lattices
    • IR Design Trade-Offs
  6. Module 6

    Program Analysis

    • Reaching Definitions
    • Live-Variable Analysis
    • Available Expressions
    • Alias and Pointer Analysis
    • Interprocedural Analysis
  7. Module 7

    Optimization

    • Local Simplification and Constant Folding
    • Common-Subexpression Elimination
    • Dead-Code Elimination
    • Loop Optimizations
    • Inlining and Whole-Program Optimization
  8. Module 8

    Code Generation

    • Instruction Selection
    • Tree and DAG Pattern Matching
    • Register Allocation
    • Instruction Scheduling
    • Calling Conventions and ABI Compliance
  9. Module 9

    Runtime Systems

    • Activation Records and Closures
    • Object Layout and Dynamic Dispatch
    • Exception Handling
    • Garbage Collection
    • Runtime Metadata and Reflection
  10. Module 10

    Modern Compiler Systems

    • JIT Compilation and Profiling
    • Speculation and Deoptimization
    • Domain-Specific Languages
    • Verification and Translation Validation
    • Compiler Security and Supply Chains

Start Compilers.

No setup, nothing to install. Try the first lessons before you sign up.