Reference. Relational Separation Logic for Compiler Verification
Cite
Cites 37 works (9 here)
With notes (9)
Tail Modulo Cons, OCaml, and Relational Separation Logic allain_etal_tmc_2025
Common functional languages incentivize tail-recursive functions, as opposed to general recursive functions that consume stack space and may not scale to large inputs. This distinction occasionally requires writing functions in a tail-recursive style that may be more complex and slower than the natural, non-tail-recursive definition.
This work describes our implementation of the tail modulo constructor (TMC) transformation in the OCaml compiler, an optimization that provides stack-efficiency for a larger class of functions — tail-recursive modulo constructors — which includes in particular the natural definition of List.map and many similar recursive data-constructing functions.
We prove the correctness of this program transformation in a simplified setting — a small untyped calculus — that captures the salient aspects of the OCaml implementation. Our proof is mechanized in the Coq proof assistant, using the Iris base logic. An independent contribution of our work is an extension of the Simuliris approach to define simulation relations that support different calling conventions. To our knowledge, this is the first use of Simuliris to prove the correctness of a compiler transformation.
Simuliris: A Separation Logic Framework for Verifying Concurrent Program Optimizations gaher_etal_simuliris_2022
Today’s compilers employ a variety of non-trivial optimizations to achieve good performance. One key trick compilers use to justify transformations of concurrent programs is to assume that the source program has no data races: if it does, they cause the program to have undefined behavior (UB) and give the compiler free rein. However, verifying correctness of optimizations that exploit this assumption is a non-trivial problem. In particular, prior work either has not proven that such optimizations preserve program termination (particularly non-obvious when considering optimizations that move instructions out of loop bodies), or has treated all synchronization operations as external functions (losing the ability to reorder instructions around them).
In this work we present Simuliris, the first simulation technique to establish termination preservation (under a fair scheduler) for a range of concurrent program transformations that exploit UB in the source language. Simuliris is based on the idea of using ownership to reason modularly about the assumptions the compiler makes about programs with well-defined behavior. This brings the benefits of concurrent separation logics to the space of verifying program transformations: we can combine powerful reasoning techniques such as framing and coinduction to perform thread-local proofs of non-trivial concurrent program optimizations. Simuliris is built on a (non-step-indexed) variant of the Coq-based Iris framework, and is thus not tied to a particular language. In addition to demonstrating the effectiveness of Simuliris on standard compiler optimizations involving data race UB, we also instantiate it with Jung et al.’s Stacked Borrows semantics for Rust and generalize their proofs of interesting type-based aliasing optimizations to account for concurrency.
Transfinite Iris: resolving an existential dilemma of step-indexed separation logic spies-2021-transfinitex
ReLoC Reloaded: A Mechanized Relational Logic for Fine-Grained Concurrency and Logical Atomicity frumin_krebbers_birkedal_reloc_2021
Iris from the ground up: A modular foundation for higher-order concurrent separation logic jung_etal_iris_ground_up_2018
A Higher-Order Logic for Concurrent Termination-Preserving Refinement tassarotti_jung_harper_2017
Formal verification of a realistic compiler leroy_formal_2009
Relational separation logic yang_relational_separation_2007
Simple relational correctness proofs for static analyses and program transformations benton_relational_2004
External (28)
- A family of sims with diverging interests (2026)
- Relational reasoning on monadic semantics (2025)
- Coinductive proofs for temporal hyperliveness (2025)
- Almost fair simulations (2025)
- Lilo: A higher-order, relational concurrent separation logic for liveness (2025)
- Ccr 2.0: High-level reasoning for conditional refinements (2025)
- Hyper Hoare logic: (dis-)Proving program hyperproperties (2024)
- Refinement composition logic (2024)
- An algebra of alignment for relational verification (2023)
- Stuttering for free (2023)
- Alignment complete relational Hoare logics for some and all (2023)
- The WhyRel prototype for modular relational verification of pointer programs (2023)
- Conditional contextual refinement (2023)
- Separation logic foundations (2021)
- Separation logic for sequential programs (functional pearl) (2020)
- Thirty-seven years of relational hoare logic: Remarks on its principles and history (2020)
- An equational theory for weak bisimulation via generalized parameterized coinduction (2020)
- A relational logic for higher-order programs (2019)
- Separation logic (2019)
- Bisimulation and coinduction enhancements: A historical perspective (2019)
- ReLoC: A mechanised relational logic for fine-grained concurrency (2018)
- Tower induction and up-to techniques for CCS with fixed points (2017)
- Concurrent separation logic (2016)
- Coinduction all the way up (2016)
- The power of parameterization in coinductive proof (2013)
- A machine-checked framework for relational separation logic (2011)
- A formally verified compiler back-end (2009)
- Product properties and their direct verification (1983)