Model Checking C/C++ with Mixed-Size Accesses
Iason Marmanis, Michalis Kokologiannakis, Viktor Vafeiadis
Abstract
State-of-the-art model checkers employing dynamic partial order reduction (DPOR) can verify concurrent programs under a wide range of memory models such as sequential consistency (SC), total store order (TSO), release-acquire (RA), and the repaired C11 memory model (RC11) in an optimal and memory-efficient fashion. Unfortunately, these DPOR techniques cannot be applied in an optimal fashion to programs with mixed-sized accesses (MSA), where atomic instructions access different (sets of) bytes belonging to the same word. Such patterns naturally arise in real life code with C/C++ union types, and are even used in a concurrent setting. In this paper, we introduce Mixer , an optimal DPOR algorithm for MSA programs that allows (multi-byte) reads to be revisited by multiple writes together. We have implemented Mixer in the GenMC model checker, enabling (for the first time) the automatic verification of C/C++ code with mixed-size accesses. Our results also extend to the more general case of transactional programs provided that the set of read accesses performed by a transaction can be dynamically overapproximated at the beginning of the transaction.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
1 top-tier paper has cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Truly stateless, optimal dynamic partial order reduction cites HMC: Model Checking for Hardware Memory Models
- Unblocking Dynamic Partial Order Reduction cites HMC: Model Checking for Hardware Memory Models
- Unblocking Dynamic Partial Order Reduction cites Truly stateless, optimal dynamic partial order reduction
- Dynamic Partial Order Reduction for Checking Correctness against Transaction Isolation Levels cites HMC: Model Checking for Hardware Memory Models
- Dynamic Partial Order Reduction for Checking Correctness against Transaction Isolation Levels cites Truly stateless, optimal dynamic partial order reduction
- Kater: Automating Weak Memory Model Metatheory and Consistency Checking cites Truly stateless, optimal dynamic partial order reduction
Cited by top-tier papers1
Builds on6
- Truly stateless, optimal dynamic partial order reductionMichalis Kokologiannakis, Iason Marmanis, Vladimir Gladstein, Viktor VafeiadisPOPL 2022 · 46 citations
- HMC: Model Checking for Hardware Memory ModelsMichalis Kokologiannakis, Viktor VafeiadisASPLOS 2020 · 29 citations
- Kater: Automating Weak Memory Model Metatheory and Consistency CheckingMichalis Kokologiannakis, Ori Lahav, Viktor VafeiadisPOPL 2023 · 15 citations
- Unblocking Dynamic Partial Order ReductionMichalis Kokologiannakis, Iason Marmanis, Viktor VafeiadisCAV 2023 · 7 citations
- Dynamic Partial Order Reduction for Checking Correctness against Transaction Isolation LevelsAhmed Bouajjani, Constantin Enea, Enrique Román-CalvoPLDI 2023 · 7 citations
Related papers
- Optimal Reads-From Consistency Checking for C11-Style Memory ModelsHünkar Can Tunç, Parosh Aziz Abdulla, Soham Chakraborty, Shankaranarayanan Krishna et al.PLDI 2023 · 12 citations
- C11Tester: a race detector for C/C++ atomicsWeiyu Luo, Brian DemskyASPLOS 2021 · 26 citations
- Implementing and verifying release-acquire transactional memory in C11Sadegh Dalvandi, Brijesh DongolOOPSLA 2022 · 6 citations
- Verifying observational robustness against a c11-style memory modelRoy David Margalit, Ori LahavPOPL 2021 · 22 citations
- Parsimonious Optimal Dynamic Partial Order ReductionParosh Aziz Abdulla, Mohamed Faouzi Atig, Sarbojit Das, Bengt Jonsson et al.CAV 2024 · 4 citations
