Preserving Separation Logic Specifications through Compilation
Carmine Abate, Kleio Liotati, Franti\v{s}ek Farka, Sebastian Ertel
Key points
From the paper's conclusion- We investigate WP-preserving compilation: when a compiler translates a source program, the weakest preconditions that the program satisfies in a separation logic carry over to the compiled program.
Abstract
Program specifications in separation logic describe ownership of resources and serve as logical interfaces for local reasoning. Compiler correctness, expressed as semantics preservation, does not by itself supply such an interface for compiled code, because it does not explicitly relate source and target resources and assertions. We investigate WP-preserving compilation: when a compiler translates a source program, the weakest preconditions that the program satisfies in a separation logic carry over to the compiled program. Our proof technique consists of a resource-aware simulation over interaction trees: it relates the resources required by corresponding source and target events, and tracks ownership through target operations, such as register accesses, that have no source counterpart. We apply the approach to a compiler from a structured imperative language to an assembly-like language, first for closed programs and then extended with modules and function calls. In the extended setting, each module can be verified in the source logic and compiled separately; its specifications carry over to the compiled module and are preserved when compiled modules are linked. All results are mechanized in Rocq.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Linking as Evaluation: Correct Separate Compilation via First-Class EnvironmentsarXiv · 2026
- Sound State Encodings in Translational Separation Logic VerifiersProceedings of the ACM on Programming Languages · 2026
- Modern Software Engineering with Verification Agents: A Spec-First Architecture for Autonomous Synthesis, Verification IRs, and Organizational ScalearXiv · 2026
- Blame-aware Recomposition for Secure Compilation Proofs of Low-Level Compartment IsolationarXiv · 2026
- Fibered Separation Logic: Weakest Preconditions, Universal Constructions, and Local IndependencearXiv · 2026
- Don't exhaust, don't waste: Resource-aware soundness for big-step semanticsJournal of Functional Programming · 2026