skip to main content
research-article

Dynamic partial order reduction for relaxed memory models

Published:03 June 2015Publication History
Skip Abstract Section

Abstract

Under a relaxed memory model such as TSO or PSO, a concurrent program running on a shared-memory multiprocessor may observe two types of nondeterminism: the nondeterminism in thread scheduling and the nondeterminism in store buffering. Although there is a large body of work on mitigating the scheduling nondeterminism during runtime verification, methods for soundly mitigating the store buffering nondeterminism are lacking. We propose a new dynamic partial order reduction (POR) algorithm for verifying concurrent programs under TSO and PSO. Our method relies on modeling both types of nondeterminism in a unified framework, which allows us to extend existing POR techniques to TSO and PSO without overhauling the verification algorithm. In addition to sound POR, we also propose a buffer-bounding method for more aggressively reducing the state space. We have implemented our new methods in a stateless model checking tool and demonstrated their effectiveness on a set of multithreaded C benchmarks.

References

  1. P. A. Abdulla, S. Aronis, B. Jonsson, and K. F. Sagonas. Optimal dynamic partial order reduction. In ACM Symposium on Principles of Programming Languages, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. P. A. Abdulla, S. Aronis, M. F. Atig, B. Jonsson, C. Leonardsson, and K. F. Sagonas. Stateless model checking for TSO and PSO. In International Conference on Tools and Algorithms for Construction and Analysis of Systems, pages 353–367, 2015.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S. V. Adve and K. Gharachorloo. Shared memory consistency models: A tutorial. IEEE Computer, 29(12):66–76, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. Alglave, D. Kroening, V. Nimal, and M. Tautschnig. Software verification for weak memory via program transformation. In European Symposium on Programming, pages 512–532, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. Alglave, D. Kroening, and M. Tautschnig. Partial orders for efficient bounded model checking of concurrent software. In International Conference on Computer Aided Verification, pages 141–157, 2013.Google ScholarGoogle ScholarCross RefCross Ref
  6. M. F. Atig, A. Bouajjani, S. Burckhardt, and M. Musuvathi. On the verification problem for weak memory models. In ACM Symposium on Principles of Programming Languages, pages 7–18, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. F. Atig, A. Bouajjani, S. Burckhardt, and M. Musuvathi. What’s decidable about weak memory models? In European Symposium on Programming, pages 26–46, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. M. F. Atig, A. Bouajjani, and G. Parlato. Context-bounded analysis of TSO systems. In From Programs to Systems. The Systems perspective in Computing - ETAPS Workshop, pages 21–38, 2014.Google ScholarGoogle ScholarCross RefCross Ref
  9. S. Burckhardt and M. Musuvathi. Effective program verification for relaxed memory models. In International Conference on Computer Aided Verification, pages 107–120, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. S. Burckhardt, R. Alur, and M. M. K. Martin. CheckFence: checking consistency of concurrent data types on relaxed memory models. In ACM Conference on Programming Language Design and Implementation, pages 12–21, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. S. Burckhardt, P. Kothari, M. Musuvathi, and S. Nagarakatte. A randomized scheduler with probabilistic guarantees of finding bugs. In Architectural Support for Programming Languages and Operating Systems, pages 167–178, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. Burnim, K. Sen, and C. Stergiou. Testing concurrent programs on relaxed memory models. In International Symposium on Software Testing and Analysis, pages 122–132, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. F. Cantin, M. H. Lipasti, and J. E. Smith. The complexity of verifying memory coherence. In ACM Symposium on Parallelism in Algorithms and Architectures, pages 254–255, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. E. M. Clarke, O. Grumberg, and D. A. Peled. Model Checking. MIT Press, Cambridge, MA, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. K. E. Coons, M. Musuvathi, and K. S. McKinley. Bounded partialorder reduction. In ACM Conference on Object Oriented Programming, Systems, Languages, and Applications, pages 833–848, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C. Flanagan and P. Godefroid. Dynamic partial-order reduction for model checking software. In ACM Symposium on Principles of Programming Languages, pages 110–121, 2005. ISBN 1-58113-830-X. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. P. Godefroid. Partial-Order Methods for the Verification of Concurrent Systems: An Approach to the State-Explosion Problem. Springer-Verlag New York, Inc., Secaucus, NJ, USA, 1996. ISBN 3540607617. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. P. Godefroid. Model checking for programming languages using VeriSoft. In ACM Symposium on Principles of Programming Languages, pages 174–186, 1997. ISBN 0-89791-853-3. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. G. J. Holzmann. The Spin model checker. IEEE Transactions on Software Engineering, 23:279–295, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. V. Kahlon, C. Wang, and A. Gupta. Monotonic partial order reduction: An optimal symbolic partial order reduction technique. In International Conference on Computer Aided Verification, pages 398–413, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. M. Kusano and C. Wang. Assertion guided abstraction: a cooperative optimization for dynamic partial order reduction. In International Conference On Automated Software Engineering, pages 175–186, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Transactions on Computers, 100(9):690–691, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. A. Linden and P. Wolper. An automata-based symbolic approach for verifying programs on relaxed memory models. In International SPIN Workshop on Model Checking Software, pages 212–226, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. A. Linden and P. Wolper. A verification-based approach to memory fence insertion in relaxed memory systems. In International SPIN Workshop on Model Checking Software, pages 144–160, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. Lu, S. Park, and Y. Zhou. Detecting concurrency bugs from the perspectives of synchronization intentions. IEEE Transactions on Parallel and Distributed Systtems, 23(6):1060–1072, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. A. Mazurkiewicz. Trace theory. In Advances in Petri Nets 1986, Part II on Petri Nets: Applications and Relationships to Other Models of Concurrency, pages 279–324, 1987. ISBN 0-387-17906-2.Google ScholarGoogle Scholar
  27. M. Musuvathi and S. Qadeer. Iterative context bounding for systematic testing of multithreaded programs. In ACM Conference on Programming Language Design and Implementation, pages 446–455, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. S. Nagarakatte, S. Burckhardt, M. M. K. Martin, and M. Musuvathi. Multicore acceleration of priority-based schedulers for concurrency bug detection. In ACM Conference on Programming Language Design and Implementation, pages 543–554, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. B. Norris and B. Demsky. CDSchecker: checking concurrent data structures written with C/C++ atomics. In ACM Conference on Object Oriented Programming, Systems, Languages, and Applications, pages 131–150, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. S. Owens, S. Sarkar, and P. Sewell. A better x86 memory model: x86-TSO. In International Conference on Theorem Proving in Higher Order Logics, pages 391–407, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. D. Peled. Combining partial order reductions with on-the-fly modelchecking. In International Conference on Computer Aided Verification, pages 377–390, 1994. ISBN 3-540-58179-0. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. S. Qadeer and J. Rehof. Context-bounded model checking of concurrent software. In International Conference on Tools and Algorithms for Construction and Analysis of Systems, pages 93–107, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. P. Sewell, S. Sarkar, S. Owens, F. Z. Nardelli, and M. O. Myreen. X86-TSO: A rigorous and usable programmer’s model for x86 multiprocessors. Commun. ACM, 53(7):89–97, July 2010. ISSN 0001-0782. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. A. Sinha, S. Malik, C. Wang, and A. Gupta. Predicting serializability violations: SMT-based search vs. DPOR-based search. In Haifa Verification Conference, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. N. Sinha and C. Wang. On interference abstractions. In ACM Symposium on Principles of Programming Languages, pages 423–434, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. SV-COMP. 2014 software verification competition. URL: http://svcomp.sosy-lab.org/2014/, 2014.Google ScholarGoogle Scholar
  37. C. Wang, Y. Yang, A. Gupta, and G. Gopalakrishnan. Dynamic model checking with property driven pruning to detect race conditions. In International Symposium on Automated Technology for Verification and Analysis, pages 126–140, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. C. Wang, Z. Yang, V. Kahlon, and A. Gupta. Peephole partial order reduction. In International Conference on Tools and Algorithms for Construction and Analysis of Systems, pages 382–396, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. C. Wang, S. Chaudhuri, A. Gupta, and Y. Yang. Symbolic pruning of concurrent program executions. In ACM SIGSOFT Symposium on Foundations of Software Engineering, pages 23–32, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. D. L. Weaver and T. Gremond. The SPARC architecture manual. PTR Prentice Hall Englewood Cliffs, NJ 07632, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Y. Yang, G. Gopalakrishnan, G. Lindstrom, and K. Slind. Nemos: A framework for axiomatic and executable specifications of memory consistency models. In International Parallel and Distributed Processing Symposium, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  42. Y. Yang, G. Gopalakrishnan, and G. Lindstrom. UMM: an operational memory model specification framework with integrated model checking capability. Concurrency - Practice and Experience, 17(5-6):465– 487, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Y. Yang, X. Chen, G. Gopalakrishnan, and R. M. Kirby. Efficient stateful dynamic partial order reduction. In International Workshop on Model Checking Software, pages 288–305, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Dynamic partial order reduction for relaxed memory models

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in

              Full Access

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader
              About Cookies On This Site

              We use cookies to ensure that we give you the best experience on our website.

              Learn more

              Got it!