Foundations of Programming Languages: A Comprehensive Overview
Required Textbook
Practical Foundations for Programming Languages (2nd Ed.) by Robert Harper (free PDF from CMU).
Types and Programming Languages by Benjamin C. Pierce (supplemental).
Module 2: Simply Typed Lambda Calculus (STLC)
The λ-calculus is powerful but unsafe (you can apply True to 3). Adding types fixes this. You learn the typing judgment:
Γ ⊢ e : τ (In context Γ, expression e has type τ).
You also meet the Type Safety Theorem, which proves:
Progress: A well-typed term is not stuck (it’s either a value or can take a step).
Preservation: If a term steps, the new term has the same type.
Sample Homework Exercise
Problem: Define a small language of Boolean expressions with and (short-circuiting) and or.
Give the abstract syntax.
Write small-step operational semantics (SOS) for call-by-name evaluation.
Write typing rules.
Prove that if e has type bool and e → e', then e' has type bool (Preservation).
That cryptic "Mismatched types" error in TypeScript or MyPy is not a bug—it’s a proof failure. 15-312 teaches you to read inference rules. You learn to ask: Which typing rule did I violate?
1. Orthogonality
A language is orthogonal if its features can be combined in a consistent and predictable way.
15312 Foundations - Of Programming Languages ((link))
Foundations of Programming Languages: A Comprehensive Overview
Required Textbook
Practical Foundations for Programming Languages (2nd Ed.) by Robert Harper (free PDF from CMU).
Types and Programming Languages by Benjamin C. Pierce (supplemental).
Module 2: Simply Typed Lambda Calculus (STLC)
The λ-calculus is powerful but unsafe (you can apply True to 3). Adding types fixes this. You learn the typing judgment:
Γ ⊢ e : τ (In context Γ, expression e has type τ).
You also meet the Type Safety Theorem, which proves:
Progress: A well-typed term is not stuck (it’s either a value or can take a step).
Preservation: If a term steps, the new term has the same type.
That cryptic "Mismatched types" error in TypeScript or MyPy is not a bug—it’s a proof failure. 15-312 teaches you to read inference rules. You learn to ask: Which typing rule did I violate?Practical Foundations for Programming Languages (2nd Ed
1. Orthogonality
A language is orthogonal if its features can be combined in a consistent and predictable way.