Compilers · Cluster

Semantic Analysis

Scopes, symbol tables, and type checking passes.

  1. 01 Resolving Identifier Uses Against a Stack of Lexical Scopes How a semantic pass turns each identifier token into a reference to exactly one declaration, what the scope stack must record, and where a single pass over the tree is not enough. foundational · Nov 14, 2021
  2. 02 Symbol Table Layouts and the Cost of Leaving a Scope Why a compiler symbol table is not just a hash map, how scope exit is made cheap, and what the per-scope-frame and shadow-stack designs each cost in lookup and memory. foundational · Mar 4, 2025
  3. 03 Separate Namespaces and Overload Sets in a Symbol Table How languages keep types, values, tags, and labels in distinct tables, and what changes when one spelling must resolve to a set of candidate declarations instead of a single one. foundational · Mar 8, 2025
  4. 04 Collecting Declarations Before Resolving Any Body How a hoisting pass makes forward and mutual references resolvable, what it must record about ordering and initialization, and which language rules it cannot express. intermediate · Jun 3, 2026
  5. 05 Bottom-Up Expression Typing with Inference Variables How a checker types an expression from its children, when it must defer a decision to a metavariable, and how unification and the occurs check close those holes. intermediate · Mar 26, 2025
  6. 06 Definite Assignment as a Flow-Sensitive Dataflow Problem How a checker proves every variable is written before it is read, why the answer depends on control flow rather than scope, and how the lattice and transfer functions are chosen. intermediate · Sep 6, 2025
  7. 07 Closure Capture, Lexical Scope, and Storage Duration Why capturing a variable is a decision about storage rather than about names, how an escaping frame is moved to the heap, and what breaks when a loop body shares one binding. intermediate · Aug 1, 2025
  8. 08 Bidirectional Checking: When a Type Is Synthesized and When It Is Checked How splitting the typing judgment into synthesis and checking makes annotated lambdas and empty literals typable without a global constraint solver, and where the split loses completeness. advanced · May 15, 2026
  9. 09 Let-Polymorphism and Where Generalization Happens Why a let-bound definition can be used at several types while a lambda parameter cannot, how the level of a metavariable decides what gets generalized, and what the value restriction protects. advanced · Jun 23, 2024
  10. 10 Error Types and Recovery in a Type Checker How a checker keeps going after the first type error without accepting nonsense, what an error type must absorb, and why the count of reported errors is a design decision. advanced · Feb 10, 2025