The Reads-From Equivalence for the TSO and PSO Memory Models

11/23/2020
by   Truc Lam Bui, et al.
0

The verification of concurrent programs remains an open challenge due to the non-determinism in inter-process communication. One algorithmic problem in this challenge is the consistency verification of concurrent executions. Consistency verification under a reads-from map allows to compute the reads-from (RF) equivalence between concurrent traces, with direct applications to areas such as Stateless Model Checking (SMC). The RF equivalence was recently shown to be coarser than the standard Mazurkiewicz equivalence, leading to impressive scalability improvements for SMC under SC (sequential consistency). However, for the relaxed memory models of TSO and PSO (total/partial store order), the algorithmic problem of deciding the RF equivalence, as well as its impact on SMC, has been elusive. In this work we solve the problem of consistency verification for the TSO and PSO memory models given a reads-from map, denoted VTSO-rf and VPSO-rf, respectively. For an execution of n events over k threads and d variables, we establish novel bounds that scale as n^k+1 for TSO and as n^k+1·min(n^k^2, 2^k· d) for PSO. Based on our solution to these problems, we develop an SMC algorithm under TSO and PSO that uses the RF equivalence. The algorithm is exploration-optimal, in the sense that it is guaranteed to explore each class of the RF partitioning exactly once, and spends polynomial time per class when k is bounded. We implement all our algorithms in the SMC tool Nidhugg, and perform a large number of experiments over benchmarks from existing literature. Our experimental results show that our algorithms for VTSO-rf and VPSO-rf provide significant scalability improvements over standard alternatives. When used for SMC, the RF partitioning is often much coarser than the standard Shasha-Snir partitioning for TSO/PSO, which yields a significant speedup in the model checking task.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/16/2022

Optimal Stateless Model Checking of Transactional Programs under Causal Consistency

We present a framework for efficient stateless model checking (SMC) of c...
research
09/03/2019

Value-centric Dynamic Partial Order Reduction

The verification of concurrent programs remains an open challenge, as th...
research
05/13/2021

Stateless Model Checking under a Reads-Value-From Equivalence

Stateless model checking (SMC) is one of the standard approaches to the ...
research
08/19/2022

Awaiting for Godot: Stateless Model Checking that Avoids Executions where Nothing Happens

Stateless Model Checking (SMC) is a verification technique for concurren...
research
04/07/2023

Optimal Reads-From Consistency Checking for C11-Style Memory Models

Over the years, several memory models have been proposed to capture the ...
research
11/05/2019

Plankton: Scalable network configuration verification through model checking

Network configuration verification enables operators to ensure that the ...
research
08/29/2018

Memory Consistency Models using Constraints

Memory consistency models (MCMs) are at the heart of concurrent programm...

Please sign up or login with your details

Forgot password? Click here to reset