Title: thread 1:
1 SDPOR Testing Multithreaded C Programs with
Dynamic Partial Order Reduction and State
Capture Yu Yang, Xiaofang Chen, Ganesh
Gopalakrishnan, Robert M. Kirby School of
Computing, University of Utah, Salt Lake City, UT
84112 http//www.cs.utah.edu/formal_verification
Stateful Dynamic Partial Order Reduction
Motivation
- Naïvely backtracking when encountering a visited
- state may result in missed backtracking points
- Concurrency bugs lurk within unexamined paths
- Stateless model checking with dynamic partial
- order reduction works well for small thread
- programs
- We offer method to capture thread-local states,
- which, in turn, helps reduce redundant searches
- Our solution -- summarizing the state-space
using - a transition dependency graph. The summary is
- not associated with each state. Instead, it is
- computed dynamically when a visited state is
- encountered.
A Simple Example
- thread 1
- for (i 0 i lt100i)
- lock(x)
- data
- assert(data5 ! 4)
- unlock(x)
thread 2 for (j 0 j lt100i) lock(x)
data-j assert(data5!2) unlock(x)
Implementation
- 200! / (100! 100!) interleavings will be
explored - with stateless search, even when dynamic
partial - order reduction is enabled (i.e. no
reductions!)
An Alternative State Capturing Scheme
- Local states of threads are treated as opaque
objects
- Capture local state deltas whenever possible
- Assign unique IDs to local states that repeat
over - different executions (IDs computed based on
deltas)
Experimental Results
n
y
n
y
Acknowledgments This work was supported by NSF
CNS 0059379, SRC 2005-TJ-1318, and the Microsoft
HPC Institutes Program