Predicting Serializability Violations: SMT-Based Search vs. DPOR-Based Search

In our recent work, we addressed the problem of detecting serializability violations in a concurrent program using predictive analysis, where we used a graph-based method to derive a predictive model from a given test execution. The exploration of the predictive model to check alternate interleavings of events in the execution was performed explicitly, based on stateless model checking using dynamic partial order reduction (DPOR). Although this was effective on some benchmarks, the explicit enumeration was too expensive on other examples. This motivated us to examine alternatives based on symbolic exploration using SMT solvers. In this paper, we propose an SMT-based encoding for detecting serializability violations in our predictive model. SMT-based encodings for detecting simpler atomicity violations (with two threads and a single variable) have been used before, but to our knowledge, our work is the first to use them for serializability violations with any number of threads and variables. We also describe details of our DPOR-based explicit search and pruning, and present an experimental evaluation comparing the two search techniques. This provides some insight into the characteristics of the instances when one of these is superior to the other. These characteristics can then be used to predict the preferred technique for a given instance.

[1]  Swarat Chaudhuri,et al.  Symbolic pruning of concurrent program executions , 2009, ESEC/FSE '09.

[2]  Chao Wang,et al.  Symbolic Predictive Analysis for Concurrent Programs , 2009, FM.

[3]  Christos H. Papadimitriou,et al.  The serializability of concurrent database updates , 1979, JACM.

[4]  Chao Wang,et al.  Staged concurrent program analysis , 2010, FSE '10.

[5]  Michael Burrows,et al.  Eraser: a dynamic data race detector for multithreaded programs , 1997, TOCS.

[6]  Sharad Malik,et al.  Runtime checking of serializability in software transactional memory , 2010, 2010 IEEE International Symposium on Parallel & Distributed Processing (IPDPS).

[7]  Azadeh Farzan,et al.  The Complexity of Predicting Atomicity Violations , 2009, TACAS.

[8]  Ana Cavalcanti,et al.  FM 2009: Formal Methods, Second World Congress, Eindhoven, The Netherlands, November 2-6, 2009. Proceedings , 2009, FM.

[9]  M.K. Ganai,et al.  Accelerating High-level Bounded Model Checking , 2006, 2006 IEEE/ACM International Conference on Computer Aided Design.

[10]  G. Gopalakrishnan,et al.  Inspect : A Runtime Model Checker for Multithreaded C Programs , 2008 .

[11]  Rajeev Alur,et al.  A Temporal Logic of Nested Calls and Returns , 2004, TACAS.

[12]  Cesare Tinelli,et al.  Solving SAT and SAT Modulo Theories: From an abstract Davis--Putnam--Logemann--Loveland procedure to DPLL(T) , 2006, JACM.

[13]  Sharad Malik,et al.  Chaff: engineering an efficient SAT solver , 2001, Proceedings of the 38th Design Automation Conference (IEEE Cat. No.01CH37232).

[14]  Eitan Farchi,et al.  Concurrent bug patterns and how to test them , 2003, Proceedings International Parallel and Distributed Processing Symposium.

[15]  Leslie Lamport,et al.  Time, clocks, and the ordering of events in a distributed system , 1978, CACM.

[16]  Sharad Malik,et al.  Predictive analysis for detecting serializability violations through Trace Segmentation , 2011, Ninth ACM/IEEE International Conference on Formal Methods and Models for Codesign (MEMPCODE2011).

[17]  Armin Biere,et al.  Symbolic Model Checking without BDDs , 1999, TACAS.

[18]  Azadeh Farzan,et al.  Monitoring Atomicity in Concurrent Programs , 2008, CAV.

[19]  Thomas R. Gross,et al.  Static Detection of Atomicity Violations in Object-Oriented Programs , 2004, J. Object Technol..

[20]  Cormac Flanagan,et al.  SideTrack: generalizing dynamic atomicity analysis , 2009, PADTAD '09.

[21]  Klaus Havelund,et al.  Using Runtime Analysis to Guide Model Checking of Java Programs , 2013, SPIN.

[22]  Azadeh Farzan,et al.  Causal Atomicity , 2006, CAV.

[23]  Patrice Godefroid,et al.  Dynamic partial-order reduction for model checking software , 2005, POPL '05.

[24]  Francesco Sorrentino,et al.  Meta-analysis for Atomicity Violations under Nested Locking , 2009, CAV.

[25]  Chao Wang,et al.  Universal Causality Graphs: A Precise Happens-Before Model for Detecting Bugs in Concurrent Programs , 2010, CAV.

[26]  Chao Wang,et al.  On interference abstractions , 2011, POPL '11.

[27]  Chao Wang,et al.  Generating Data Race Witnesses by an SMT-Based Analysis , 2011, NASA Formal Methods.

[28]  Chao Wang,et al.  Peephole Partial Order Reduction , 2008, TACAS.

[29]  Chao Wang,et al.  Trace-Based Symbolic Analysis for Atomicity Violations , 2010, TACAS.

[30]  Thomas Ball,et al.  Finding and Reproducing Heisenbugs in Concurrent Programs , 2008, OSDI.

[31]  Klaus Havelund,et al.  SPIN Model Checking and Software Verification , 2000, Lecture Notes in Computer Science.

[32]  Maurice Herlihy,et al.  Linearizability: a correctness condition for concurrent objects , 1990, TOPL.

[33]  Grigore Rosu,et al.  Maximal Causal Models for Multithreaded Systems , 2008 .