Affiliation:
1. MPI-SWS, Germany
2. Radboud University Nijmegen, Netherlands
3. KAIST, South Korea
Abstract
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.
Funder
Nederlandse Organisatie voor Wetenschappelijk Onderzoek
European Research Council
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Cited by
13 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Refinement Composition Logic;Proceedings of the ACM on Programming Languages;2024-08-15
2. Algebraic Effects Meet Hoare Logic in Cubical Agda;Proceedings of the ACM on Programming Languages;2024-01-05
3. Asynchronous Probabilistic Couplings in Higher-Order Separation Logic;Proceedings of the ACM on Programming Languages;2024-01-05
4. Trillium: Higher-Order Concurrent and Distributed Separation Logic for Intensional Refinement;Proceedings of the ACM on Programming Languages;2024-01-05
5. Borrowable Fractional Ownership Types for Verification;Lecture Notes in Computer Science;2023-12-30