Operational Aspects of C/C++ Concurrency
Anton Podkopaev, Ilya Sergey, Aleksandar Nanevski

TL;DR
This paper introduces a comprehensive operational semantics framework for C/C++11 concurrency, capturing various memory models and synchronization primitives, and provides an executable implementation for testing and debugging concurrent programs.
Contribution
It presents the first formal, executable operational semantics for C11 that encompasses all key concurrent features, including relaxed atomics, while avoiding common issues like Out-of-Thin-Air behaviors.
Findings
Successfully models all essential concurrent aspects of C11
Provides an executable semantics in PLT Redex
Demonstrates practical application through a large case study
Abstract
In this work, we present a family of operational semantics that gradually approximates the realistic program behaviors in the C/C++11 memory model. Each semantics in our framework is built by elaborating and combining two simple ingredients: viewfronts and operation buffers. Viewfronts allow us to express the spatial aspect of thread interaction, i.e., which values a thread can read, while operation buffers enable manipulation with the temporal execution aspect, i.e., determining the order in which the results of certain operations can be observed by concurrently running threads. Starting from a simple abstract state machine, through a series of gradual refinements of the abstract state, we capture such language aspects and synchronization primitives as release/acquire atomics, sequentially-consistent and non-atomic memory accesses, also providing a semantics for relaxed atomics,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
