skip to main content
research-article

The virtues of conflict: analysing modern concurrency

Published:27 February 2016Publication History
Skip Abstract Section

Abstract

Modern shared memory multiprocessors permit reordering of memory operations for performance reasons. These reorderings are often a source of subtle bugs in programs written for such architectures. Traditional approaches to verify weak memory programs often rely on interleaving semantics, which is prone to state space explosion, and thus severely limits the scalability of the analysis. In recent times, there has been a renewed interest in modelling dynamic executions of weak memory programs using partial orders. However, such an approach typically requires ad-hoc mechanisms to correctly capture the data and control-flow choices/conflicts present in real-world programs. In this work, we propose a novel, conflict-aware, composable, truly concurrent semantics for programs written using C/C++ for modern weak memory architectures. We exploit our symbolic semantics based on general event structures to build an efficient decision procedure that detects assertion violations in bounded multi-threaded programs. Using a large, representative set of benchmarks, we show that our conflict-aware semantics outperforms the state-of-the-art partial-order based approaches.

Skip Supplemental Material Section

Supplemental Material

References

  1. Debate'90: An electronic discussion on true concurrency. In Vaughan Pratt, Doron A. Peled, and Gerard J. Holzmann, editors, DIMACS Workshop on Partial Order Methods in Verification, 1997.Google ScholarGoogle Scholar
  2. Parosh Aziz Abdulla, Stavros Aronis, Mohamed Faouzi Atig, Bengt Jonsson, Carl Leonardsson, and Konstantinos F. Sagonas. Stateless model checking for TSO and PSO. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), 2015.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Parosh Aziz Abdulla, Mohamed Faouzi Atig, Yu-Fang Chen, Carl Leonardsson, and Ahmed Rezine. Counter-example guided fence insertion under TSO. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Parosh Aziz Abdulla, Mohamed Faouzi Atig, Yu-Fang Chen, Carl Leonardsson, and Ahmed Rezine. Memorax, a precise and sound tool for automatic fence insertion under TSO. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Sarita V. Adve and Kourosh Gharachorloo. Shared memory consistency models: A tutorial. Computer, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Alfred V. Aho, M. R. Garey, and Jeffrey D. Ullman. The transitive reduction of a directed graph. SIAM Journal of Computing, 1972.Google ScholarGoogle ScholarCross RefCross Ref
  7. Jade Alglave, Daniel Kroening, Vincent Nimal, and Daniel Poetzl. Don't sit on the fence -- A static analysis approach to automatic fence insertion. In International Conference on Computer Aided Verification (CAV), 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Jade Alglave, Daniel Kroening, Vincent Nimal, and Michael Tautschnig. Software verification for weak memory via program transformation. In European Conference on Programming Languages and Systems (ESOP), 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Jade Alglave, Daniel Kroening, and Michael Tautschnig. Partial orders for efficient bounded model checking of concurrent software. In International Conference on Computer Aided Verification (CAV), 2013.Google ScholarGoogle ScholarCross RefCross Ref
  10. Jade Alglave, Luc Maranget, Susmit Sarkar, and Peter Sewell. Litmus: Running tests against hardware. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Jade Alglave, Luc Maranget, Susmit Sarkar, and Peter Sewell. Fences in weak memory models (extended version). Formal Methods in System Design, 40(2), 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Mohamed Faouzi Atig, Ahmed Bouajjani, Sebastian Burckhardt, and Madanlal Musuvathi. On the verification problem for weak memory models. In Symposium on Principles of Programming Languages (POPL), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Mohamed Faouzi Atig, Ahmed Bouajjani, Sebastian Burckhardt, and Madanlal Musuvathi. What's decidable about weak memory models? In European Conference on Programming Languages and Systems (ESOP), 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Mark Batty, Kayvan Memarian, Kyndylan Nienhuis, Jean Pichon-Pharabod, and Peter Sewell. The problem of programming language concurrency semantics. In European Conference on Programming Languages and Systems (ESOP), 2015.Google ScholarGoogle ScholarCross RefCross Ref
  15. Mark Batty, Scott Owens, Susmit Sarkar, Peter Sewell, and Tjark Weber. Mathematizing C++ concurrency. In Symposium on Principles of Programming Languages (POPL), January 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Dirk Beyer. Software verification and verifiable witnesses (report on SV-COMP 2015). In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), 2015.Google ScholarGoogle Scholar
  17. Ahmed Bouajjani, Egor Derevenetc, and Roland Meyer. Checking and enforcing robustness against TSO. In European Conference on Programming Languages and Systems (ESOP), 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Howard Bowman and Rodolfo Gomez. Concurrency Theory: Calculi an Automata for Modelling Untimed and Timed Concurrent Systems. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Sebastian Burckhardt, Rajeev Alur, and Milo M. K. Martin. Check-Fence: Checking consistency of concurrent data types on relaxed memory models. In Programming Language Design and Implementation (PLDI), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Edmund Clarke, Armin Biere, Richard Raimi, and Yunshan Zhu. Bounded model checking using satisfiability solving. Formal Methods in System Design, July 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Edmund Clarke, Daniel Kroening, and Flavio Lerda. A tool for checking ANSI-C programs. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), 2004.Google ScholarGoogle ScholarCross RefCross Ref
  22. Edmund Clarke, Daniel Kroening, and Karen Yorav. Behavioral consistency of C and Verilog programs using bounded model checking. In Design Automation Conference, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Carla P. Gomes, Henry Kautz, Ashish Sabharwal, and Bart Selman. Chapter 2, satisfiability solvers. In Handbook of Knowledge Representation. 2008.Google ScholarGoogle ScholarCross RefCross Ref
  24. Saurabh Joshi and Daniel Kroening. Property-driven fence insertion using reorder bounded model checking. In International Symposium on Formal Methods (FM), LNCS, 2015.Google ScholarGoogle ScholarCross RefCross Ref
  25. Hadi Katebi, Karem A. Sakallah, and João P. Marques-Silva. Empirical study of the anatomy of modern SAT solvers. In Theory and Application of Satisfiability Testing (SAT), 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Michael Kuperstein, Martin Vechev, and Eran Yahav. Partial-coherence abstractions for relaxed memory models. SIGPLAN Notices, June 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Leslie Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Transaction on Computing, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Jaejin Lee, Samuel P. Midkiff, and David A. Padua. Concurrent static single assignment form and constant propagation for explicitly parallel programs. In Languages and Compilers for Parallel Computing, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Alexander Linden and Pierre Wolper. A verification-based approach to memory fence insertion in PSO memory systems. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS), 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Feng Liu, Nayden Nedev, Nedyalko Prisadnikov, Martin Vechev, and Eran Yahav. Dynamic synthesis for relaxed memory models. In Programming Language Design and Implementation (PLDI), 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Steven S. Muchnick. Advanced Compiler Design and Implementation. San Francisco, CA, USA, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Vaughan Pratt. Modeling concurrency with partial orders. International Journal of Parallel Program, (1), February 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. A. W. Roscoe. The Theory and Practice of Concurrency. Prentice-Hall International Series in Computer Science. 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. A. W. Roscoe. Understanding Concurrent Systems. 1st edition, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Pradeep Sindhu, Michel Cekleov, and Jean-Marc Frailong. Formal specification of memory models. Technical Report CSL-91-11, Xerox, 1991.Google ScholarGoogle Scholar
  36. SPARC International, Inc. The SPARC Architecture Manual: Version 8. Upper Saddle River, NJ, USA, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Rob J. van Glabbeek and Frits W. Vaandrager. Bundle event structures and CCSP. In International Conference on Concurrency Theory (CONCUR), 2003.Google ScholarGoogle Scholar
  38. Glynn Winskel. Event structure semantics for CCS and related languages. In International Colloquium on Automata, Languages and Programming (ICALP), 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Glynn Winskel. Event structures. In Advances in Petri Nets, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Richard N. Zucker and Jean loup Baer. A performance study of memory consistency models. In International Symposium on Computer Architecture, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. The virtues of conflict: analysing modern concurrency

    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

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 51, Issue 8
      PPoPP '16
      August 2016
      405 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/3016078
      Issue’s Table of Contents
      • cover image ACM Conferences
        PPoPP '16: Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming
        February 2016
        420 pages
        ISBN:9781450340922
        DOI:10.1145/2851141

      Copyright © 2016 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 27 February 2016

      Check for updates

      Qualifiers

      • research-article
    • Article Metrics

      • Downloads (Last 12 months)7
      • Downloads (Last 6 weeks)2

      Other Metrics

    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!