arXiv · 2610.37244
Preserving Separation Logic Specifications through Compilation
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.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Carmine Abate, Kleio Liotati, František Farka, Sebastian Ertel. 2026-10-27. Preserving Separation Logic Specifications through Compilation. https://arxiv.org/abs/2610.37244
Cite the original work for its findings. Save a collection to share your selection of sources.