Advertisement

Reordering Control Approaches to State Explosion in Model Checking with Memory Consistency Models

  • Tatsuya Abe
  • Tomoharu Ugawa
  • Toshiyuki Maeda
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10712)

Abstract

The relaxedness of memory consistency models, which allows the reordering of instructions and their effects, intensifies the state explosion problem of software model checking. In this paper, we propose three approaches that can reduce the number of states to be visited in software model checking with memory consistency models. The proposed methods control the reordering of instructions. The first approach controls the number of reordered instructions. The second approach specifies the instructions that are reordered in advance, and prevents the other instructions from being reordered. The third approach specifies the instructions that are reordered, and preferentially explores execution traces with the reorderings. We applied these approaches to the McSPIN model checker that we have been developing, and reported the effectiveness of the approaches by examining various concurrent programs.

Keywords

Software model checking Relaxed memory consistency model State explosion Instruction reordering control Concurrent program examination 

Notes

Acknowledgments

The authors thank Gerard J. Holzmann, who has respectfully answered some questions at the SPIN forum http://spinroot.com/fluxbb/. In particular, the idea of the implementations of the exploration strategies in Sect. 4.4 is based on his comment to our questions about the exploring strategy of SPIN. The authors also thank the anonymous reviewers for several comments to improve the paper. This research partly used computational resources under Collaborative Research Program for Young Scientists provided by Academic Center for Computing and Media Studies, Kyoto University. This work was also supported by JSPS KAKENHI Grant Numbers 25330080 and 16K21335, and the Ogasawara Foundation for the Promotion of Science and Engineering in the form of an international travel grant.

References

  1. 1.
    Abdulla, P.A., Atig, M.F., Jonsson, B., Leonardsson, C.: Stateless model checking for POWER. In: Chaudhuri, S., Farzan, A. (eds.) CAV 2016. LNCS, vol. 9780, pp. 134–156. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-41540-6_8 Google Scholar
  2. 2.
    Abe, T., Maeda, T.: Model checking with user-definable memory consistency models. In: Proceedings of PGAS, short paper, pp. 225–230 (2013). https://bitbucket.org/abet/mcspin/
  3. 3.
    Abe, T., Maeda, T.: Optimization of a general model checking framework for various memory consistency models. In: Proceedings of PGAS (2014)Google Scholar
  4. 4.
    Abe, T., Maeda, T.: A general model checking framework for various memory consistency models. STTT (2017).  https://doi.org/10.1007/s10009-016-0429-y
  5. 5.
    Abe, T., Ugawa, T., Maeda, T., Matsumoto, K.: Reducing state explosion for software model checking with relaxed memory consistency models. In: Fränzle, M., Kapur, D., Zhan, N. (eds.) SETTA 2016. LNCS, vol. 9984, pp. 118–135. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-47677-3_8 CrossRefGoogle Scholar
  6. 6.
    Adve, S.V., Gharachorloo, K.: Shared memory consistency models: a tutorial. Computer 29(12), 66–76 (1996)CrossRefGoogle Scholar
  7. 7.
    Blom, S., van de Pol, J., Weber, M.: LTSmin: distributed and symbolic reachability. In: Touili, T., Cook, B., Jackson, P. (eds.) CAV 2010. LNCS, vol. 6174, pp. 354–359. Springer, Heidelberg (2010).  https://doi.org/10.1007/978-3-642-14295-6_31 CrossRefGoogle Scholar
  8. 8.
    Cavada, R., et al.: The nuXmv symbolic model checker. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 334–342. Springer, Cham (2014).  https://doi.org/10.1007/978-3-319-08867-9_22 Google Scholar
  9. 9.
    de Jonge, M., Ruys, T.C.: The SpinJa model checker. In: van de Pol, J., Weber, M. (eds.) SPIN 2010. LNCS, vol. 6349, pp. 124–128. Springer, Heidelberg (2010).  https://doi.org/10.1007/978-3-642-16164-3_9 CrossRefGoogle Scholar
  10. 10.
    Ebnenasir, A.: UPC-SPIN: a framework for the model checking of UPC programs. In: Proceedings of PGAS. ACM (2011)Google Scholar
  11. 11.
    Edelkamp, S., Lafuente, A.L., Leue, S.: Directed explicit model checking with HSF-SPIN. In: Dwyer, M. (ed.) SPIN 2001. LNCS, vol. 2057, pp. 57–79. Springer, Heidelberg (2001).  https://doi.org/10.1007/3-540-45139-0_5 CrossRefGoogle Scholar
  12. 12.
    Edelkamp, S., Schuppan, V., Bošnački, D., Wijs, A., Fehnker, A., Aljazzar, H.: Survey on directed model checking. In: Peled, D.A., Wooldridge, M.J. (eds.) MoChArt 2008. LNCS (LNAI), vol. 5348, pp. 65–89. Springer, Heidelberg (2009).  https://doi.org/10.1007/978-3-642-00431-5_5 CrossRefGoogle Scholar
  13. 13.
    Holzmann, G.J.: The SPIN Model Checker. Addison-Wesley, Boston (2003)Google Scholar
  14. 14.
    IBM Corp.: PowerPC Architechture Book, Version 2.02 (2005)Google Scholar
  15. 15.
    Intel Corp.: A Formal Specification of Intel Itanium Processor Family Memory Ordering (2002)Google Scholar
  16. 16.
    Intel Corp.: Intel 64 and IA-32 Architectures Software Developer’s Manual (2016)Google Scholar
  17. 17.
    ISO/IEC 14882:2011: Programming Language C++ (2011)Google Scholar
  18. 18.
    Jonsson, B.: State-space exploration for concurrent algorithms under weak memory orderings: (preliminary version). SIGARCH Comput. Archit. News 36(5), 65–71 (2008)CrossRefGoogle Scholar
  19. 19.
    Kroening, D., Tautschnig, M.: CBMC – C bounded model checker. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014. LNCS, vol. 8413, pp. 389–391. Springer, Heidelberg (2014).  https://doi.org/10.1007/978-3-642-54862-8_26 CrossRefGoogle Scholar
  20. 20.
    Linden, A., Wolper, P.: An automata-based symbolic approach for verifying programs on relaxed memory models. In: van de Pol, J., Weber, M. (eds.) SPIN 2010. LNCS, vol. 6349, pp. 212–226. Springer, Heidelberg (2010).  https://doi.org/10.1007/978-3-642-16164-3_16 CrossRefGoogle Scholar
  21. 21.
    McCloskey, B., Bacon, D.F., Cheng, P., Grove, D.: Staccato: a parallel and concurrent real-time compacting garbage collector for multiprocessors. Research Report RC24504, IBM (2008)Google Scholar
  22. 22.
    Oracle Corp.: The Java Language Specification. Java SE 8 edn. (2015)Google Scholar
  23. 23.
    Pizlo, F., Frampton, D., Petrank, E., Steensgaard, B.: Stopless: a real-time garbage collector for multiprocessors. In: Proceedings of ISMM, pp. 159–172 (2007)Google Scholar
  24. 24.
    Pizlo, F., Petrank, E., Steensgaard, B.: A study of concurrent real-time garbage collectors. In: Proceedings of PLDI, pp. 33–44 (2008)Google Scholar
  25. 25.
    Raynal, M.: Concurrent Programming: Algorithms, Principles, and Foundations. Springer, Heidelberg (2013).  https://doi.org/10.1007/978-3-642-32027-9 CrossRefzbMATHGoogle Scholar
  26. 26.
    Reffe, F., Edelkamp, S.: Error detection with directed symbolic model checking. In: Wing, J.M., Woodcock, J., Davies, J. (eds.) FM 1999. LNCS, vol. 1708, pp. 195–211. Springer, Heidelberg (1999).  https://doi.org/10.1007/3-540-48119-2_13 CrossRefGoogle Scholar
  27. 27.
    Senftleben, M., Schneider, K.: Specifying weak memory consistency with temporal logic. In: Proceedings of VECoS, pp. 107–122 (2016)Google Scholar
  28. 28.
    SPARC International, Inc.: The SPARC Architecture Manual, Version 9 (1994)Google Scholar
  29. 29.
    SV-COMP: The 6th International Competition on Software Verification. https://sv-comp.sosy-lab.org/
  30. 30.
    The UPC Consortium: UPC Language Specifications Version 1.3 (2013)Google Scholar
  31. 31.
    Tomasco, E., Truc Nguyen Lam, O.I., Fischer, B., Torre, S.L., Parlato, G.: Lazy sequentialization for TSO and PSO via shared memory abstractions. In: Proceedings of FMCAD, pp. 193–200 (2016)Google Scholar
  32. 32.
    Travkin, O., Mütze, A., Wehrheim, H.: SPIN as a linearizability checker under weak memory models. In: Bertacco, V., Legay, A. (eds.) HVC 2013. LNCS, vol. 8244, pp. 311–326. Springer, Cham (2013).  https://doi.org/10.1007/978-3-319-03077-7_21 CrossRefGoogle Scholar
  33. 33.
    Travkin, O., Wehrheim, H.: Verification of concurrent programs on weak memory models. In: Sampaio, A., Wang, F. (eds.) ICTAC 2016. LNCS, vol. 9965, pp. 3–24. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-46750-4_1 CrossRefGoogle Scholar
  34. 34.
    van der Berg, F.: Model checking LLVM IR using LTSmin: using relaxed memory model semantics. Master’s thesis, University of Twente (2013)Google Scholar
  35. 35.
    Yang, Y., Gopalakrishnan, G., Lindstrom, G.: UMM: an operational memory model specification framework with integrated model checking capability. Concurr. Comput. Pract. Exper. 17(5–6), 465–487 (2005)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  1. 1.STAIR LabChiba Institute of TechnologyNarashinoJapan
  2. 2.Kochi University of TechnologyKamiJapan

Personalised recommendations