Thread View: comp.compilers
2 messages
2 total messages
Started by John R Levine
Wed, 25 Nov 2026 15:37
Paper: Denotational Results in Compiler Correctness and Comparisons with Operational Approaches
Author: John R Levine
Date: Wed, 25 Nov 2026 15:37
Date: Wed, 25 Nov 2026 15:37
38 lines
3071 bytes
3071 bytes
Abstract Anyone setting out to prove a compiler correct must choose a style of semantics. The CakeML and CompCert projects, among others, show that operational semantics such as abstract machines and interpreters are viable choices. In this paper we explore whether denotational semantics can also be used in proofs of compiler correctness and evaluate the tradeoffs. We focus on a compiler from FPC, a language with lexically scoped functions and recursive types, to a first-order low-level intermediate language. This compiler includes closure conversion, but no prior proof of correctness with respect to denotational semantics covers closure conversion for a Turing-complete language. Compiler correctness requires that the denotation of a program be both preserved and reflected by the compiler. For closure conversion, reflection is the hard direction. We present the first denotational proofs of semantic reflection for closure conversion applied to a Turing-complete language, one proof with respect to a graph model and one with respect to Scott domains. For the graph-model proof we develop a new logical relation, the approximant logical relation, and for the Scott-domain proof we adapt a logical relation of Reynolds. As a first step in evaluating the tradeoffs, we compare mechanized correctness proofs of an eight-pass compiler, from FPC down to a typed low-level intermediate language, in five semantic styles. Two of the styles are denotational and three are operational. We find that no one semantics yields the shortest proofs for every compiler pass. We identify two factors that influence proof size. For operational semantics, proof size tends to grow with how much the runs of the source and target differ. For denotational semantics, the proofs are succinct when the correctness of a pass is an equation between meanings, and lengthy when a pass needs a logical relation. https://arxiv.org/abs/2611.31724 Regards, John Levine, johnl@taugh.com, Taughannock Networks, Trumansburg NY Please consider the environment before reading this e-mail. https://jl.ly
Re: Paper: Denotational Results in Compiler Correctness and Comparisons with Operational Approaches
Author: Derek M Jones
Date: Sun, 29 Nov 2026 17:32
Date: Sun, 29 Nov 2026 17:32
24 lines
2111 bytes
2111 bytes
> Anyone setting out to prove a compiler correct must choose a style of > semantics. The CakeML and CompCert projects, among others, show that > operational semantics such as abstract machines and interpreters are > viable choices. In this paper we explore whether denotational semantics A viable choice is one that is well supported by coding agents. Otherwise, the amount of effort involved is not worth it. Does anybody care about the style, other than those with a large sunk cost invested in one particular style? > can also be used in proofs of compiler correctness and evaluate the > tradeoffs. We focus on a compiler from FPC, a language with lexically > scoped functions and recursive types, to a first-order low-level > intermediate language. Use a toy language, and then compare techniques by counting tokens in the implementation (a few thousand with differences of around 10%; table 1). A Planck said: Science advances one funeral at a time. -- Derek M. Jones Evidence-based software engineering blog:https://shape-of-code.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads