Affiliation:
1. University of Cambridge, Cambridge, United Kingdom
2. University of York, York, United Kingdom
3. IMDEA, Madrid, Spain
Abstract
When constructing complex concurrent systems, abstraction is vital: programmers should be able to reason about concurrent libraries in terms of abstract specifications that hide the implementation details. Relaxed memory models present substantial challenges in this respect, as libraries need not provide sequentially consistent abstractions: to avoid unnecessary synchronisation, they may allow clients to observe relaxed memory effects, and library specifications must capture these.
In this paper, we propose a criterion for sound library abstraction in the new C11 and C++11 memory model, generalising the standard sequentially consistent notion of linearizability. We prove that our criterion soundly captures all client-library interactions, both through call and return values, and through the subtle synchronisation effects arising from the memory model. To illustrate our approach, we verify implementations against specifications for the lock-free Treiber stack and a producer-consumer queue. Ours is the first approach to compositional reasoning for concurrent C11/C++11 programs.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
38 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. A Proof Recipe for Linearizability in Relaxed Memory Separation Logic;Proceedings of the ACM on Programming Languages;2024-06-20
2. How Hard Is Weak-Memory Testing?;Proceedings of the ACM on Programming Languages;2024-01-05
3. Mechanised Operational Reasoning for C11 Programs with Relaxed Dependencies;Formal Aspects of Computing;2023-06-23
4. An Operational Approach to Library Abstraction under Relaxed Memory Concurrency;Proceedings of the ACM on Programming Languages;2023-01-09
5. The Path to Durable Linearizability;Proceedings of the ACM on Programming Languages;2023-01-09