Introduction
Verifying concurrent software is a major challenge due to the exponential number of possible thread interleavings, a phenomenon known as state-space explosion. Stateless Model Checking (SMC) addresses this by exploring execution traces rather than full program states. To remain efficient, SMC relies on Dynamic Partial Order Reduction (DPOR) to group equivalent traces into classes, exploring only one representative from each. However, traditional equivalences like Mazurkiewicz or reads-from (RF) are often too fine-grained, leading to redundant exploration and excessive computational overhead.
The Reads-Value-From (RVF) Equivalence
The core contribution of this work is the Reads-Value-From (RVF) equivalence. Unlike previous methods that focus on the specific write event a read observes, RVF groups traces that agree on the values obtained by every read event while maintaining consistent causal orderings.
This approach is provably coarser than Mazurkiewicz or RF equivalences. By focusing on values, the algorithm can ignore different interleavings that do not affect the program's observable behavior, leading to an exponentially smaller search space in many concurrent benchmarks. If two different orders result in the same values being read, the program's behavior is effectively identical for safety properties.
The VerifySC Algorithm
Implementing RVF-SMC requires solving the Verifying Sequential Consistency (VSC) problem: determining if a given set of read-value requirements is consistent with a sequentially consistent execution. While VSC is NP-hard in general, the authors demonstrate that it is fixed-parameter tractable with respect to the number of threads ($k$) and variables ($d$).
The proposed VerifySC algorithm runs in $O(k^{d+1} \cdot n^{k+1})$ time. To further optimize performance, the authors introduce "backtrack signals" and "closure" filters. These heuristics prevent the model checker from revisiting the same equivalence class multiple times and quickly prune impossible execution paths, solving common performance bottlenecks in previous value-based explorers.
Experimental Evaluation
The authors implemented RVF-SMC within the Nidhugg model checker and evaluated it against 119 benchmarks, including Linux kernel drivers and concurrency primitives. They compared their tool against state-of-the-art explorers like VC-DPOR and DC-DPOR.
Key results include:
- Exponential Trace Reduction: In benchmarks like
45_monabsex1, RVF-SMC reduced the number of traces to explore from millions down to just one. - Significant Speedups: For the
27_Boop4benchmark, RVF-SMC finished in 837 seconds, while other tools took over 2,600 seconds or timed out entirely. - Scalability: RVF-SMC handled much larger unroll bounds than its competitors, demonstrating superior efficiency in complex race scenarios.
Conclusion
RVF-SMC represents a significant step forward in stateless model checking by shifting the focus from operation ordering to value consistency. By providing a tractable solution to the VSC problem and implementing effective pruning heuristics, the authors have created a tool that can verify complex concurrent programs that were previously out of reach for automated verification. Future research aims to extend this framework to relaxed memory models such as TSO and PowerPC.
Summary updated