Denotational Semantics
Origin. Scott and Strachey (1970s). Mathematical meaning of programs. Domains as semantic spaces. Compositionality: meaning from parts. Foundation for language semantics.
Models. Programs denote mathematical objects. ⟦·⟧: syntax → semantics. Compositionality: ⟦e₁ op e₂⟧ = f(⟦e₁⟧, ⟦e₂⟧). Fixed points for recursion.
Formalism.
Semantic function: ⟦·⟧: Syntax → Domain Maps syntactic constructs to meanings.
Domains: Partially ordered sets with limits. D = D⊥ (lift with ⊥ for non-termination). Function spaces: D → E continuous functions.
Basic constructs: ⟦n⟧ρ = n (numeral) ⟦x⟧ρ = ρ(x) (variable lookup) ⟦e₁ + e₂⟧ρ = ⟦e₁⟧ρ + ⟦e₂⟧ρ
Lambda abstraction: ⟦λx.e⟧ρ = λd.⟦e⟧ρ[x↦d]
Application: ⟦e₁ e₂⟧ρ = ⟦e₁⟧ρ(⟦e₂⟧ρ)
Recursion: ⟦fix f⟧ρ = fix(⟦f⟧ρ) = ⊔ₙ fⁿ(⊥) Least fixed point.
Continuity: Semantic functions are continuous. Preserves directed limits. Enables fixed-point existence.
Soundness: e ⇓ v implies ⟦e⟧ = ⟦v⟧. Evaluation preserves meaning. This direction is proved by structural induction and is the easy one.
Adequacy: The converse, and the harder direction: at ground type, ⟦e⟧ ≠ ⊥ implies e converges, and ⟦e⟧ = ⟦v⟧ for a value v implies e ⇓ v. Soundness alone leaves open that the denotation is too coarse to see divergence — a semantics sending everything to a single point is sound. Adequacy is what excludes that, and it needs a logical-relations or computability argument rather than induction on syntax.
Symbols.
| Symbol | Unicode | Name | Meaning |
|---|---|---|---|
| ρ | U+03C1 | Rho | Environment mapping variables to values |
| ⊥ | U+22A5 | Bottom | Least element, denoting divergence |
| ⊔ | U+2294 | Join | Least upper bound of a directed set |
| ⊑ | U+2291 | Information order | Approximation order on a domain |
| ⇓ | U+21D3 | Evaluates to | Big-step operational convergence |
| ↦ | U+21A6 | Maps to | Environment update ρ[x ↦ d] |
| λ | U+03BB | Lambda | Abstraction, in syntax and in the semantic function space |
| ≠ | U+2260 | Not equal | ⟦e⟧ ≠ ⊥, the hypothesis of adequacy |
| → | U+2192 | Arrow | Continuous function space |
| ⟦ ⟧ | — | Semantic brackets | Denotation of a syntactic phrase |
| fix | — | Fixed point | Least fixed point, ⊔ₙ fⁿ(⊥) |
| D⊥ | — | Lift | Domain with a new bottom adjoined |
| D∞ | — | Scott's inverse limit | Solution of D ≅ [D → D] |
Metatheory. Scott's D∞ construction (1969) solved D ≅ [D → D] by inverse limit, giving the first mathematical model of the untyped lambda calculus and showing that the reflexive-object obstruction is escaped by restricting to continuous functions. Kleene's fixed point theorem in a pointed cpo gives the least fixed point as ⊔ₙ fⁿ(⊥), so recursion has a canonical denotation. The central results concern PCF. Plotkin, "LCF Considered as a Programming Language" (1977), proved the Scott model adequate but not fully abstract, since parallel-or is an element of the model that no PCF term defines, and showed that adding parallel-or to the language restores full abstraction. Milner (1977) constructed the fully abstract order-extensional model of PCF and proved it unique up to isomorphism. Abramsky, Jagadeesan and Malacaria and, independently, Hyland and Ong gave the first syntax-free fully abstract models, by game semantics with innocent strategies, in the 1990s. Loader (2001) proved that observational equivalence for finitary PCF is undecidable, which rules out any effectively presented fully abstract model.
Applies to. Language specification. Compiler correctness. Program analysis. Concurrency models.
Limitations. Full abstraction fails for the standard domain model of PCF, and Loader's undecidability result shows the failure is not an artefact to be repaired: no fully abstract model of PCF can be effectively presented, and the game-semantic ones achieve full abstraction only after an extensional quotient that is itself non-effective. Domains commit the semantics to monotone continuous functions and least fixed points, so recursion is forced to have one particular meaning and non-monotone constructs fall outside. Nondeterminism requires a powerdomain, and the Plotkin, Smyth and Hoare constructions each identify different programs, none of them neutrally. Combining probability with nondeterminism is worse: it is a long-standing open problem, raised by Jung and Tix in 1998, whether any cartesian closed category of continuous domains is closed under the probabilistic powerdomain. Compositionality itself is a constraint — control operators and dynamically scoped exceptions have no direct compositional denotation and must be routed through a continuation-passing transform, changing the semantics of every other construct.
© 2026 Lingenic LLC