Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2983990.2984025acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Maximal causality reduction for TSO and PSO

Published: 19 October 2016 Publication History

Abstract

Verifying concurrent programs is challenging due to the exponentially large thread interleaving space. The problem is exacerbated by relaxed memory models such as Total Store Order (TSO) and Partial Store Order (PSO) which further explode the interleaving space by reordering instructions. A recent advance, Maximal Causality Reduction (MCR), has shown great promise to improve verification effectiveness by maximally reducing redundant explorations. However, the original MCR only works for the Sequential Consistency (SC) memory model, but not for TSO and PSO. In this paper, we develop novel extensions to MCR by solving two key problems under TSO and PSO: 1) generating interleavings that can reach new states by encoding the operational semantics of TSO and PSO with first-order logical constraints and solving them with SMT solvers, and 2) enforcing TSO and PSO interleavings by developing novel replay algorithms that allow executions out of the program order. We show that our approach successfully enables MCR to effectively explore TSO and PSO interleavings. We have compared our approach with a recent Dynamic Partial Order Reduction (DPOR) algorithm for TSO and PSO and a SAT-based stateless model checking approach. Our results show that our approach is much more effective than the other approaches for both state-space exploration and bug finding – on average it explores 5-10X fewer executions and finds many bugs that the other tools cannot find.

References

[1]
ASM bytecode analysis framework. http://asm.ow2.org/.
[2]
A real-world bug caused by relaxed consistency. http: //stackoverflow.com/questions/16159203/.
[3]
P. Abdulla, S. Aronis, B. Jonsson, and K. Sagonas. Optimal dynamic partial order reduction. In Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2014.
[4]
P. A. Abdulla, S. Aronis, M. F. Atig, B. Jonsson, C. Leonardsson, and K. F. Sagonas. Stateless model checking for TSO and PSO. CoRR, 2015.
[5]
S. V. Adve and K. Gharachorloo. Shared memory consistency models: A tutorial. computer, 29(12):66–76, 1996.
[6]
M. F. Atig, A. Bouajjani, S. Burckhardt, and M. Musuvathi. On the verification problem for weak memory models. In Proceedings of the 37th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2010.
[7]
M. F. Atig, A. Bouajjani, S. Burckhardt, and M. Musuvathi. What’s decidable about weak memory models? In Programming Languages and Systems, pages 26–46. Springer, 2012.
[8]
S. Burckhardt, R. Alur, and M. M. K. Martin. Checkfence: Checking consistency of concurrent data types on relaxed memory models. In Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation, 2007.
[9]
S. Burckhardt, P. Kothari, M. Musuvathi, and S. Nagarakatte. A randomized scheduler with probabilistic guarantees of finding bugs. In Proceedings of the Fifteenth Edition of ASPLOS on Architectural Support for Programming Languages and Operating Systems, 2010.
[10]
S. Burckhardt and M. Musuvathi. Effective program verification for relaxed memory models. In Computer Aided Verification, pages 107–120. Springer, 2008.
[11]
J. Burnim, K. Sen, and C. Stergiou. Testing concurrent programs on relaxed memory models. In Proceedings of the 2011 International Symposium on Software Testing and Analysis, pages 122–132. ACM, 2011.
[12]
E. M. Clarke, O. Grumberg, and D. Peled. Model checking. MIT press, 1999.
[13]
K. E. Coons, M. Musuvathi, and K. S. Mckinley. Bounded partial-order reduction. In In Proceedings of the 2013 Annual ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 833–848, 2013.
[14]
L. De Moura and N. Bjørner. Z3: An efficient SMT solver. In Tools and Algorithms for the Construction and Analysis of Systems, pages 337–340. Springer, 2008.
[15]
B. Demsky and P. Lam. SATCheck: SAT-directed stateless model checking for SC and TSO. In Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications. ACM, 2015.
[16]
C. Flanagan and P. Godefroid. Dynamic partial-order reduction for model checking software. In Proceedings of the 32Nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2005.
[17]
P. Godefroid. Model checking for programming languages using verisoft. In Proceedings of the 24th ACM SIGPLANSIGACT symposium on Principles of programming languages. ACM, 1997.
[18]
P. Godefroid. Software model checking: The VeriSoft approach. Formal Methods in System Design, 2005.
[19]
P. Godefroid, J. van Leeuwen, J. Hartmanis, G. Goos, and P. Wolper. Partial-order methods for the verification of concurrent systems: an approach to the state-explosion problem, volume 1032. Springer Heidelberg, 1996.
[20]
G. J. Holzmann. The SPIN model checker: Primer and reference manual, volume 1003. Addison-Wesley Reading, 2004.
[21]
J. Huang. Stateless model checking concurrent programs with maximal causality reduction. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, 2015.
[22]
J. Huang, P. O. Meredith, and G. Rosu. Maximal sound predictive race detection with control flow abstraction. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, 2014.
[23]
S. International. The SPARC Architecture Manual: Version 8. 1992.
[24]
L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess programs. Computers, IEEE Transactions on, 100(9):690–691, 1979.
[25]
A. Linden and P. Wolper. An automata-based symbolic approach for verifying programs on relaxed memory models. In Proceedings of the 17th International SPIN Conference on Model Checking Software, SPIN’10, 2010.
[26]
A. Linden and P. Wolper. A verification-based approach to memory fence insertion in relaxed memory systems. In Proceedings of the 18th International SPIN Conference on Model Checking Software, 2011.
[27]
S. Lu, W. Jiang, and Y. Zhou. A study of interleaving coverage criteria. In Joint European Software Engineering Conference and ACM SIGSOFT Symposium on Foundations of Software Engineering, pages 533–536, 2007.
[28]
J. Manson, W. Pugh, and S. V. Adve. The java memory model. In Proceedings of the 32Nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, 2005.
[29]
A. Mazurkiewicz. Trace theory. In Petri nets: applications and relationships to other models of concurrency, pages 278–324. Springer, 1986.
[30]
T. Mitra, A. Roychoudhury, and Q. Shen. Impact of Java Memory Model on Out-of-Order Multiprocessors. In Proceedings of the 13th International Conference on Parallel Architectures and Compilation Techniques, PACT, 2004.
[31]
M. Musuvathi and S. Qadeer. Partial-order reduction for context-bounded state exploration. Technical report, MSRTR-2007-12, Microsoft Research, 2007.
[32]
M. Musuvathi, S. Qadeer, T. Ball, G. Basler, P. A. Nainar, and I. Neamtiu. Finding and reproducing heisenbugs in concurrent programs. In OSDI, volume 8, pages 267–280, 2008.
[33]
S. Owens, S. Sarkar, P. Sewell, and A. Better. x86 Memory Model: x86-TSO. In Proceedings of the 22nd International Conference on Theorem Proving in Higher Order Logics, 2009.
[34]
A. Roychoudhury. Formal reasoning about hardware and software memory models. In Proceedings of the 4th International Conference on Formal Engineering Methods: Formal Methods and Software Engineering, ICFEM, 2002.
[35]
T. F. ¸Serbănu¸tă, F. Chen, and G. Ro¸su. Maximal causal models for sequentially consistent systems. In Runtime Verification, pages 136–150. Springer, 2013.
[36]
E. Torlak, M. Vaziri, and J. Dolby. MemSAT: Checking Axiomatic Specifications of Memory Models. In Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation, 2010.
[37]
Y. Yang, X. Chen, G. Gopalakrishnan, and R. M. Kirby. Efficient stateful dynamic partial order reduction. In Proceedings of the 15th International Workshop on Model Checking Software, SPIN, 2008.
[38]
N. Zhang, M. Kusano, and C. Wang. Dynamic partial order reduction for relaxed memory models. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, 2015.

Cited By

View all
  • (2022)Model checking for a multi-execution memory modelProceedings of the ACM on Programming Languages10.1145/35633156:OOPSLA2(758-785)Online publication date: 31-Oct-2022
  • (2022)Modeling and Verifying PSO Memory Model Using CSPMobile Networks and Applications10.1007/s11036-022-01989-527:5(2068-2083)Online publication date: 23-May-2022
  • (2021)Jaaru: efficiently model checking persistent memory programsProceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3445814.3446735(415-428)Online publication date: 19-Apr-2021
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA 2016: Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications
October 2016
915 pages
ISBN:9781450344449
DOI:10.1145/2983990
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 October 2016

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Maximal Causality Reduction
  2. Model Checking
  3. PSO
  4. TSO

Qualifiers

  • Research-article

Conference

SPLASH '16
Sponsor:

Acceptance Rates

Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)15
  • Downloads (Last 6 weeks)1
Reflects downloads up to 01 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2022)Model checking for a multi-execution memory modelProceedings of the ACM on Programming Languages10.1145/35633156:OOPSLA2(758-785)Online publication date: 31-Oct-2022
  • (2022)Modeling and Verifying PSO Memory Model Using CSPMobile Networks and Applications10.1007/s11036-022-01989-527:5(2068-2083)Online publication date: 23-May-2022
  • (2021)Jaaru: efficiently model checking persistent memory programsProceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3445814.3446735(415-428)Online publication date: 19-Apr-2021
  • (2021)C11Tester: a race detector for C/C++ atomicsProceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3445814.3446711(630-646)Online publication date: 19-Apr-2021
  • (2021)HARS: Heuristic-Enhanced Adaptive Randomized Scheduling for Concurrency Testing2021 IEEE 21st International Conference on Software Quality, Reliability and Security (QRS)10.1109/QRS54544.2021.00033(219-230)Online publication date: Dec-2021
  • (2020)Persistent Owicki-Gries reasoning: a program logic for reasoning about persistent programs on Intel-x86Proceedings of the ACM on Programming Languages10.1145/34282194:OOPSLA(1-28)Online publication date: 13-Nov-2020
  • (2020)Symbolic verification of message passing interface programsProceedings of the ACM/IEEE 42nd International Conference on Software Engineering10.1145/3377811.3380419(1248-1260)Online publication date: 27-Jun-2020
  • (2020)HMCProceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3373376.3378480(1157-1171)Online publication date: 9-Mar-2020
  • (2020)Interactive debugging of concurrent programs under relaxed memory modelsProceedings of the 18th ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3368826.3377910(68-80)Online publication date: 22-Feb-2020
  • (2019)Effective lock handling in stateless model checkingProceedings of the ACM on Programming Languages10.1145/33605993:OOPSLA(1-26)Online publication date: 10-Oct-2019
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media