Reference. Simuliris: A Separation Logic Framework for Verifying Concurrent Program Optimizations
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.
Cite
Cited by (7)
Yarrow: Reconciling Effect Handlers and Region-Based Memory Management mathiasen-2026-yarrow
Lawyer: Modular Obligations-Based Liveness Reasoning in Higher-Order Impredicative Concurrent Separation Logic namakonov-2026-lawyer
An Axiomatic Basis for Computer Programming on Relaxed Hardware Architectures: The AxSL Logics liu-2026-an
Relational Separation Logic for Compiler Verification leroy_pottier_relsep_2026
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.
Algebraic Effects Meet Hoare Logic in Cubical Agda kidney-2024-algebraic
Trillium: Higher-Order Concurrent and Distributed Separation Logic for Intensional Refinement timany-2024-trillium
Cites 45 works (11 here)
With notes (11)
Transfinite Iris: resolving an existential dilemma of step-indexed separation logic spies-2021-transfinitex
Iris from the ground up: A modular foundation for higher-order concurrent separation logic jung_etal_iris_ground_up_2018
Interactive proofs in higher-order concurrent separation logic krebbers-2017-interactive
A Higher-Order Logic for Concurrent Termination-Preserving Refinement tassarotti_jung_harper_2017
Higher-order ghost state jung_higher-order_2016
Iris: Monoids and Invariants as an Orthogonal Basis for Concurrent Reasoning jung-2015-iris
CakeML: A verified implementation of ML kumar_cakeml_2014
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
The logic of bunched implications ohearn_pym_bi_1999
External (34)
- Simuliris: Technical Documentation and Coq Development (2022)
- RefinedC: automating the foundational verification of C code with refined ownership types (2021)
- Concurrent Permission Machine for modular proofs of optimizing compilers with shared memory concurrency (Cuellar, PhD thesis, Princeton) (2020)
- Understanding and evolving the Rust programming language (Jung, PhD thesis, Saarland) (2020)
- Towards certified separate compilation for concurrent programs (2019)
- Stacked borrows: an aliasing model for Rust (2019)
- Interaction trees: representing recursive and impure programs in Coq (2019)
- ReLoC (2018)
- Certified concurrent abstraction layers (2018)
- MoSeL: a general, extensible modal framework for interactive proofs in separation logic (2018)
- RustBelt: securing the foundations of the Rust programming language (2017)
- A promising semantics for relaxed-memory concurrency (2017)
- The Essence of Higher-Order Concurrent Separation Logic (2017)
- Taming undefined behavior in LLVM (2017)
- Progress of concurrent objects with partial methods (2017)
- A program logic for concurrent objects under fair scheduling (2016)
- Deep Specifications and Certified Abstraction Layers (2015)
- A formal C memory model supporting integer-pointer casts (2015)
- Compositional CompCert (2015)
- Common Compiler Optimisations are Invalid in the C11 Memory Model and what we can do about it (2015)
- Verified Compilation for Shared-Memory C (2014)
- Compositional verification of termination-preserving refinement of concurrent programs (2014)
- Impredicative Concurrent Abstract Predicates (2014)
- The power of parameterization in coinductive proof (2013)
- Compiler testing via a theory of sound optimisations in the C11/C++11 memory model (2013)
- CompCertTSO (2013)
- The marriage of bisimulations and Kripke logical relations (2012)
- Safe optimisations for shared-memory concurrent programs (2011)
- Program transformations in weak memory models (Ševčík, PhD thesis, Edinburgh) (2009)
- Formal certification of a compiler back-end or (2006)
- Permission accounting in separation logic (2005)
- Checking Interference with Fractional Permissions (2003)
- An indexed model of recursive types for foundational proof-carrying code (2001)
- Impartiality, justice and fairness: The ethics of concurrent termination (1981)