Denotational semantics can prove closure conversion correct for a Turing-complete language
Denotational Results in Compiler Correctness and Comparisons with Operational
Proving a compiler correct requires choosing a style of semantics, and operational approaches like those in CakeML and CompCert dominate. This paper asks whether denotational semantics can carry the load, focusing on a compiler from FPC — a language with lexically scoped functions and recursive types — down to a first-order low-level intermediate language, including closure conversion. The authors give the first denotational proofs of semantic reflection for closure conversion on a Turing-complete language, one via a graph model with a new approximant logical relation and one via Scott domains adapting a Reynolds relation. They then compare mechanized proofs of an eight-pass compiler across five semantic styles, finding no single semantics wins on every pass: operational proofs grow with divergence between source and target runs, while denotational proofs stay short when a pass is an equation between meanings and balloon when a logical relation is needed.
For closure conversion, reflection is the hard direction.