Skip to main content
QUICK REVIEW

[Paper Review] Stateless Model Checking for TSO and PSO

Parosh Aziz Abdulla, Stavros Aronis|arXiv (Cornell University)|Jan 9, 2015
Parallel Computing and Optimization TechniquesComputer Science25 references7 citations
TL;DR

This paper introduces chronological traces—a novel, acyclic representation of relaxed memory executions under TSO and PSO—that enable optimal dynamic partial order reduction (DPOR) in stateless model checking. By ensuring a one-to-one correspondence with Shasha-Snir traces while avoiding cycles, the method reduces verification effort for relaxed memory models to near-sequential consistency levels, significantly outperforming prior tools in practice.

ABSTRACT

We present a technique for efficient stateless model checking of programs that execute under the relaxed memory models TSO and PSO. The basis for our technique is a novel representation of executions under TSO and PSO, called chronological traces. Chronological traces induce a partial order relation on relaxed memory executions, capturing dependencies that are needed to represent the interaction via shared variables. They are optimal in the sense that they only distinguish computations that are inequivalent under the widely-used representation by Shasha and Snir. This allows an optimal dynamic partial order reduction algorithm to explore a minimal number of executions while still guaranteeing full coverage. We apply our techniques to check, under the TSO and PSO memory models, LLVM assembly produced for C/pthreads programs. Our experiments show that our technique reduces the verification effort for relaxed memory models to be almost that for the standard model of sequential consistency. In many cases, our implementation significantly outperforms other comparable tools.

Motivation & Objective

  • To address the inefficiency of stateless model checking (SMC) under relaxed memory models (RMM) like TSO and PSO, where redundant execution exploration increases verification cost.
  • To overcome the limitation of existing partial order reduction (POR) techniques, which rely on cyclic happens-before relations in RMM and cannot be applied directly.
  • To design a canonical, acyclic representation of relaxed memory executions that preserves equivalence under Shasha-Snir traces but avoids redundant exploration.
  • To enable optimal DPOR for TSO and PSO by constructing a partial order (happens-before) that is both minimal and sufficient for full coverage.
  • To demonstrate that the proposed method achieves verification performance close to sequential consistency, even under relaxed memory models.

Proposed method

  • Introduce chronological traces as a novel, canonical representation of program executions under TSO and PSO, capturing dependencies via a carefully designed event ordering.
  • Define a happens-before relation based on chronological traces that is acyclic and thus suitable for DPOR, unlike the cyclic relations in vanilla Shasha-Snir traces.
  • Ensure one-to-one correspondence between chronological traces and Shasha-Snir traces, guaranteeing that each equivalence class under RMM is explored exactly once.
  • Adapt the Optimal-DPOR algorithm to use the acyclic happens-before relation from chronological traces, ensuring minimal exploration while maintaining full coverage.
  • Extend the technique to PSO by modeling per-location store buffers and adjusting program order edges to avoid cycles between updates to different memory locations.
  • Implement and evaluate the approach on LLVM-compiled C/pthreads programs, comparing performance against existing tools.

Experimental results

Research questions

  • RQ1Can a canonical, acyclic representation of relaxed memory executions be constructed that preserves equivalence under Shasha-Snir traces?
  • RQ2Can such a representation enable optimal dynamic partial order reduction (DPOR) for TSO and PSO, avoiding redundant exploration of equivalent executions?
  • RQ3To what extent does the proposed method reduce verification effort for relaxed memory models compared to sequential consistency?
  • RQ4Does the approach outperform existing tools in terms of scalability and efficiency on real-world programs?
  • RQ5Can the method be extended to handle PSO’s per-location store buffers without reintroducing cycles in the happens-before relation?

Key findings

  • Chronological traces provide a one-to-one correspondence with Shasha-Snir traces, ensuring no loss of coverage while enabling acyclic happens-before relations.
  • The acyclic happens-before relation derived from chronological traces supports optimal DPOR, guaranteeing exploration of exactly one execution per Shasha-Snir trace equivalence class.
  • For robust programs (e.g., data-race-free), the number of executions explored under TSO and PSO is identical to that under sequential consistency, due to the one-to-one correspondence with Mazurkiewicz traces.
  • The method reduces verification effort for relaxed memory models to nearly the same level as for sequential consistency, significantly improving efficiency.
  • Empirical evaluation shows the implementation outperforms other comparable tools in many cases, especially on complex concurrent programs.
  • The approach successfully handles PSO by modeling per-location store buffers and avoiding cycles between updates to different memory locations through selective program order edges.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.