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

  • Arnab Sinha
  • Sharad Malik
  • Chao Wang
  • Aarti Gupta
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7261)


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.


Predictive Analysis Concurrent Program Execution Trace Context Switch Bound Model Check 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Biere, A., Cimatti, A., Clarke, E.M., Zhu, Y.: Symbolic Model Checking without BDDs. In: Cleaveland, W.R. (ed.) TACAS 1999. LNCS, vol. 1579, p. 193. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  2. 2.
  3. 3.
    Farchi, E., Nir, Y., Ur, S.: Concurrent Bug Patterns and How to Test Them. In: IPDPS, p. 286 (2003)Google Scholar
  4. 4.
    Farzan, A., Madhusudan, P.: Causal Atomicity. In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144, pp. 315–328. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  5. 5.
    Farzan, A., Madhusudan, P.: Monitoring Atomicity in Concurrent Programs. In: Gupta, A., Malik, S. (eds.) CAV 2008. LNCS, vol. 5123, pp. 52–65. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  6. 6.
    Farzan, A., Madhusudan, P.: Meta-analysis for Atomicity Violations under Nested Locking. In: Bouajjani, A., Maler, O. (eds.) CAV 2009. LNCS, vol. 5643, pp. 248–262. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  7. 7.
    Farzan, A., Madhusudan, P.: The Complexity of Predicting Atomicity Violations. In: Kowalewski, S., Philippou, A. (eds.) TACAS 2009. LNCS, vol. 5505, pp. 155–169. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  8. 8.
    Flanagan, C., Godefroid, P.: Dynamic Partial-Order Reduction for Model Checking Software. In: POPL 2005, pp. 110–121 (2005)Google Scholar
  9. 9.
    Ganai, M.K., Gupta, A.: Accelerating High-Level Bounded Model Checking. In: ICCAD 2006, pp. 794–801 (2006)Google Scholar
  10. 10.
    Havelund, K.: Using Runtime Analysis to Guide Model Checking of Java Programs. In: Havelund, K., Penix, J., Visser, W. (eds.) SPIN 2000. LNCS, vol. 1885, pp. 245–264. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  11. 11.
    Herlihy, M.P., Wing, J.M.: Linearizability: A Correctness Condition for Concurrent Objects. ACM Trans. Program. Lang. Syst. 12, 463–492 (1990)CrossRefGoogle Scholar
  12. 12.
  13. 13.
    Joint CAV/ISSTA special event on specification, verification, and testing of concurrent software,
  14. 14.
  15. 15.
    Yices: An SMT solver,
  16. 16.
  17. 17.
    Kahlon, V., Wang, C.: Universal Causality Graphs: A Precise Happens-Before Model for Detecting Bugs in Concurrent Programs. In: Touili, T., Cook, B., Jackson, P. (eds.) CAV 2010. LNCS, vol. 6174, pp. 434–449. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  18. 18.
    Lamport, L.: Time, Clocks, and the Ordering of Events in a Distributed System. Commun. ACM 21(7) (1978)Google Scholar
  19. 19.
    Moskewicz, M.W., Madigan, C.F., Zhao, Y., Zhang, L., Malik, S.: Chaff: Engineering An Efficient SAT Solver. In: DAC 2001, New York, NY, USA, pp. 530–535 (2001)Google Scholar
  20. 20.
    Musuvathi, M., Qadeer, S., Ball, T., Basler, G., Nainar, P.A., Neamtiu, I.: Finding and Reproducing Heisenbugs in Concurrent Programs. In: OSDI 2008, pp. 267–280 (2008)Google Scholar
  21. 21.
    Nieuwenhuis, R., Oliveras, A., Tinelli, C.: Solving SAT and SAT Modulo Theories: From an Abstract Davis–Putnam–Logemann–Loveland Procedure to DPLL(T). J. ACM 53, 937–977 (2006)MathSciNetCrossRefGoogle Scholar
  22. 22.
    Papadimitriou, C.H.: The Serializability of Concurrent Database Updates. J. ACM 26(4), 631–653 (1979)MathSciNetzbMATHCrossRefGoogle Scholar
  23. 23.
    von Praun, C., Gross, T.R.: Static Detection of Atomicity Violations in Object-Oriented Programs. Object Technology 3(6) (2004)Google Scholar
  24. 24.
    Said, M., Wang, C., Sakalla, K., Yang, Z.: Generating Data Race Witnesses by an SMT-Based Analysis. In: NFMS (2011)Google Scholar
  25. 25.
    Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., Anderson, T.: Eraser: A Dynamic Data Race Detector for Multithreaded Programs. ACM Trans. Comput. Syst. 15(4), 391–411 (1997)CrossRefGoogle Scholar
  26. 26.
    Serbănută, T.F., Chen, F., Rosu, G.: Maximal Causal Models for Multithreaded Systems. Tech. Rep. UIUCDCS-R-2008-3017, UIUCGoogle Scholar
  27. 27.
    Sinha, A., Malik, S.: Runtime Checking of Serializability in Software Transactional Memory. In: IPDPS, pp. 1–12 (2010)Google Scholar
  28. 28.
    Sinha, A., Malik, S., Wang, C., Gupta, A.: Predictive Analysis for Detecting Serializability Errors through Trace Segmentation. In: MEMOCODE (2011)Google Scholar
  29. 29.
    Sinha, N., Wang, C.: Staged Concurrent Program Analysis. In: Foundations of Software Engineering, FSE (2010)Google Scholar
  30. 30.
    Sinha, N., Wang, C.: On interference abstractions. In: POPL 2011, pp. 423–434 (2011)Google Scholar
  31. 31.
  32. 32.
    Wang, C., Chaudhuri, S., Gupta, A., Yang, Y.: Symbolic Pruning of Concurrent Program Executions. In: Foundations of Software Engineering (FSE), pp. 23–32 (2009)Google Scholar
  33. 33.
    Wang, C., Limaye, R., Ganai, M., Gupta, A.: Trace-Based Symbolic Analysis for Atomicity Violations. In: Esparza, J., Majumdar, R. (eds.) TACAS 2010. LNCS, vol. 6015, pp. 328–342. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  34. 34.
    Wang, C., Kundu, S., Ganai, M.K., Gupta, A.: Symbolic Predictive Analysis for Concurrent Programs. In: Cavalcanti, A., Dams, D.R. (eds.) FM 2009. LNCS, vol. 5850, pp. 256–272. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  35. 35.
    Wang, C., Yang, Z., Kahlon, V., Gupta, A.: Peephole Partial Order Reduction. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 382–396. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  36. 36.
    Yang, Y., Chen, X., Gopalakrishnan, G.: Inspect: A Runtime Model Checker for Multithreaded C Programs. Tech. Rep. UUCS-08-004, University of Utah (2008)Google Scholar
  37. 37.
    Yi, J., Sadowski, C., Flanagan, C.: SideTrack: Generalizing Dynamic Atomicity Analysis. In: PADTAD, pp. 1–10 (2009)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Arnab Sinha
    • 1
  • Sharad Malik
    • 1
  • Chao Wang
    • 2
  • Aarti Gupta
    • 3
  1. 1.Princeton UniversityUSA
  2. 2.Virginia Polytechnic InstituteUSA
  3. 3.NEC Laboratories AmericaUSA

Personalised recommendations