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.
Supplemental Material
Available for Download
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Sarita V. Adve and Kourosh Gharachorloo. Shared memory consistency models: A tutorial. Computer, 1996. Google Scholar
Digital Library
- Alfred V. Aho, M. R. Garey, and Jeffrey D. Ullman. The transitive reduction of a directed graph. SIAM Journal of Computing, 1972.Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
- Ahmed Bouajjani, Egor Derevenetc, and Roland Meyer. Checking and enforcing robustness against TSO. In European Conference on Programming Languages and Systems (ESOP), 2013. Google Scholar
Digital Library
- Howard Bowman and Rodolfo Gomez. Concurrency Theory: Calculi an Automata for Modelling Untimed and Timed Concurrent Systems. 2005. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Edmund Clarke, Armin Biere, Richard Raimi, and Yunshan Zhu. Bounded model checking using satisfiability solving. Formal Methods in System Design, July 2001. Google Scholar
Digital Library
- 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 Scholar
Cross Ref
- Edmund Clarke, Daniel Kroening, and Karen Yorav. Behavioral consistency of C and Verilog programs using bounded model checking. In Design Automation Conference, 2003. Google Scholar
Digital Library
- Carla P. Gomes, Henry Kautz, Ashish Sabharwal, and Bart Selman. Chapter 2, satisfiability solvers. In Handbook of Knowledge Representation. 2008.Google Scholar
Cross Ref
- Saurabh Joshi and Daniel Kroening. Property-driven fence insertion using reorder bounded model checking. In International Symposium on Formal Methods (FM), LNCS, 2015.Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- Michael Kuperstein, Martin Vechev, and Eran Yahav. Partial-coherence abstractions for relaxed memory models. SIGPLAN Notices, June 2011. Google Scholar
Digital Library
- Leslie Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Transaction on Computing, 1979. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Steven S. Muchnick. Advanced Compiler Design and Implementation. San Francisco, CA, USA, 1997. Google Scholar
Digital Library
- Vaughan Pratt. Modeling concurrency with partial orders. International Journal of Parallel Program, (1), February 1986. Google Scholar
Digital Library
- A. W. Roscoe. The Theory and Practice of Concurrency. Prentice-Hall International Series in Computer Science. 1998. Google Scholar
Digital Library
- A. W. Roscoe. Understanding Concurrent Systems. 1st edition, 2010. Google Scholar
Digital Library
- Pradeep Sindhu, Michel Cekleov, and Jean-Marc Frailong. Formal specification of memory models. Technical Report CSL-91-11, Xerox, 1991.Google Scholar
- SPARC International, Inc. The SPARC Architecture Manual: Version 8. Upper Saddle River, NJ, USA, 1992. Google Scholar
Digital Library
- Rob J. van Glabbeek and Frits W. Vaandrager. Bundle event structures and CCSP. In International Conference on Concurrency Theory (CONCUR), 2003.Google Scholar
- Glynn Winskel. Event structure semantics for CCS and related languages. In International Colloquium on Automata, Languages and Programming (ICALP), 1982. Google Scholar
Digital Library
- Glynn Winskel. Event structures. In Advances in Petri Nets, 1986. Google Scholar
Digital Library
- Richard N. Zucker and Jean loup Baer. A performance study of memory consistency models. In International Symposium on Computer Architecture, 1992. Google Scholar
Digital Library
Index Terms
The virtues of conflict: analysing modern concurrency
Recommendations
The virtues of conflict: analysing modern concurrency
PPoPP '16: Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel ProgrammingModern 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 ...
Sequential verification of serializability
POPL '10Serializability is a commonly used correctness condition in concurrent programming. When a concurrent module is serializable, certain other properties of the module can be verified by considering only its sequential executions. In many cases, concurrent ...
Sequential verification of serializability
POPL '10: Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesSerializability is a commonly used correctness condition in concurrent programming. When a concurrent module is serializable, certain other properties of the module can be verified by considering only its sequential executions. In many cases, concurrent ...






Comments