A Unifying Metatheorem on Weak-Memory Robustness
Giovanna Kobus Conrado, Stephan Spengler, Mohamed Faouzi Atig, Andreas Pavlogiannis
Abstract
Memory models specify the behaviors that concurrent programs may exhibit under compiler and hardware optimizations, which often deviate from Sequential Consistency (SC). Robustness is the property of a program P not exhibiting any weak behaviors when executing under a weak memory model MM, compared to SC. As such, the algorithmic problem of deciding whether P is robust against MM has been studied extensively, and has been repeatedly shown to be in PSPACE for many memory models, such as TSO, PSO, and Release/Acquire. However, each model has required its own, dedicated proof, raising the natural question of whether robustness admits a unifying treatment across memory models. In this work, we answer this question affirmatively for a broad class of memory models definable in Kleene Algebra with Tests (KAT). We prove that robustness against any prefix-closed, KAT-definable memory model is in PSPACE. This metatheorem recovers nearly all prior PSPACE robustness results, and establishes PSPACE membership for several new models, including the full RC11 and the OCaml memory model. We have further formalized the correctness of our approach in Lean. On the other hand, we prove that robustness against the KAT-definable Relaxed model is undecidable, and thus prefix-closedness cannot be dropped, in general. Finally, we implement our algorithm in a prototype tool RoboKAT, and demonstrate its flexibility by checking robustness against nine memory models, several of which are not handled by prior work.
Create a lesson
Related papers
Tenon: A Unified Programming Framework for Retargetable PIM Compilation
Shared title terminology · Niansong Zhang, Shiran Guo, Zhiru Zhang
Retargetable Compilation for Tensor Kernels via a Unified Layout Abstraction
Shared title terminology · Likai Ma, Renze Chen, Tianqi Li et al.
Context Types: Bunched Modalities for Unifying Safety and Reachability
Shared title terminology · Zhe Zhou, Benjamin Delaware, Suresh Jagannathan
Bao: Automatic Region Placement and Memory Allocation for Intermittent Computing
Shared title terminology · Byeongjee Kang, Jan Hoffmann, Limin Jia et al.