skip to main content
10.1145/1806596.1806635acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

MemSAT: checking axiomatic specifications of memory models

Authors Info & Claims
Published:05 June 2010Publication History

ABSTRACT

Memory models are hard to reason about due to their complexity, which stems from the need to strike a balance between ease-of-programming and allowing compiler and hardware optimizations. In this paper, we present an automated tool, MemSAT, that helps in debugging and reasoning about memory models. Given an axiomatic specification of a memory model and a multi-threaded test program containing assertions, MemSAT outputs a trace of the program in which both the assertions and the memory model axioms are satisfied, if one can be found. The tool is fully automatic and is based on a SAT solver. If it cannot find a trace, it outputs a minimal subset of the memory model and program constraints that are unsatisfiable. We used MemSAT to check several existing memory models against their published test cases, including the current Java Memory Model by Manson et al. and a revised version of it by Sevcik and Aspinall. We found subtle discrepancies between what was expected and the actual results of test programs.

References

  1. S. V. Adve and K. Gharachorloo. Shared memory consistency models: A tutorial. Computer, 29(12):66--76, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. D. Aspinall and J. Sevcik. Formalising Java's data race free guarantee. In TPHOLs '07, pages 22--37, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. D. Aspinall and J. Sevcík. Java memory model examples: good, bad and ugly. In VAMP '07, Lisbon, Portugal, September 2007.Google ScholarGoogle Scholar
  4. S. Burckhardt, R. Alur, and M. M. K. Martin. CheckFence: checking consistency of concurrent data types on relaxed memory models. In PLDI '07, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S. Burckhardt and M. Musuvathi. Effective program verification for relaxed memory models. In CAV '08, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Causality test cases for the Java Memory Model. http://www.cs.umd.edu/~pugh/java/memoryModel/CausalityTestCases.html.Google ScholarGoogle Scholar
  7. A. De, A. Roychoudhury, and D. D'Souza. Java memory model aware software validation. In PASTE '08, 2008.Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. Dill. The Murφ verification system. In CAV '96, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. Dolby, M. Vaziri, and F. Tip. Finding bugs efficiently with a SAT solver. In FSE '07, pages 195--204, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. N. Eén and N. Sörensson. An extensible SAT-solver. In SAT'03, 2003.Google ScholarGoogle Scholar
  11. G. Gopalakrishnan, Y. Yang, and H. Sivaraj. QB or Not QB: An efficient execution verification tool for memory orderings. In CAV '04, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  12. J. Gosling, B. Joy, and G. Steele. The Java Specification Language. Addison-Wesley, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Isabelle Theorem Prover. http://isabelle.in.tum.de/.Google ScholarGoogle Scholar
  14. D. Jackson. Software Abstractions: logic, language and analysis. MIT Press, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. JSR--133: Java memory model and thread specification revision. http://www.cs.umd.edu/~pugh/java/memoryModel.Google ScholarGoogle Scholar
  16. L. Lamport. How to make a multiprocessor computer that correctly executes multiprocess program. IEEE Trans. Comput., 28(9), 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. J.-W. Maessen, Arvind, and X. Shen. Improving the Java Memory Model using CRF. In OOPSLA '00, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. Manson. The Java memory model. PhD thesis, University of Maryland, College Park, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. Manson, W. Pugh, and S. V. Adve. The Java memory model. In POPL '05, pages 378--391, New York, NY, USA, 2005. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. NemosFinder. http://www.cs.utah.edu/formal_verification/.Google ScholarGoogle Scholar
  21. W. Pugh. Fixing the Java memory model. In Java Grande '99, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. A. Roychoudhury and T. Mitra. Specifying multithreaded Java semantics for program verification. In ICSE '02, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. V. A. Saraswat, R. Jagadeesan, M. Michael, and C. von Praun. A theory of memory models. In PPoPP '07, pages 161--172, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. S. Sarkar, P. Sewell, F. Z. Nardelli, S. Owens, T. Ridge, T. Braibant, M. O Myreen, and J. Alglave. The semantics of x86-CC multiprocessor machine code. In POPL '09, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. Sevcík and D. Aspinall. On validity of program transformations in the Java memory model. In ECOOP '08, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. E. Torlak. A constraint solver for software engineering: finding models and cores of large relational specifications. PhD thesis, MIT, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. E. Torlak, F. S.-H. Chang, and D. Jackson. Finding minimal unsatisfiable cores of declarative specifications. In FM '08, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. E. Torlak and D. Jackson. Kodkod: A relational model finder. In TACAS '07, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Watson libraries for analysis (WALA). http://wala.sourceforge.net.Google ScholarGoogle Scholar
  30. The XSB logic programming system. http://xsb.sourceforge.net.Google ScholarGoogle Scholar
  31. Y. Yang, G. Gopalakrishnan, and G. Lindstrom. Analyzing the CRF Java memory model. In APSEC '01, 2001.Google ScholarGoogle ScholarCross RefCross Ref
  32. Y. Yang, G. Gopalakrishnan, and G. Lindstrom. Specifying Java thread semantics using a uniform memory model. In JGI '02, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Y. Yang, G. Gopalakrishnan, G. Lindstrom, and K. Slind. Analyzing the Intel Itanium memory ordering rules using logic programming and SAT. In CHARME '03, 2003.Google ScholarGoogle ScholarCross RefCross Ref
  34. Y. Yang, G. Gopalakrishnan, G. Lindstrom, and K. Slind. Nemos: a framework for axiomatic and executable specifications of memory consistency models. In IPDPS '04, pages 26--30, 2004.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. MemSAT: checking axiomatic specifications of 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
                • Published in

                  cover image ACM Conferences
                  PLDI '10: Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation
                  June 2010
                  514 pages
                  ISBN:9781450300193
                  DOI:10.1145/1806596
                  • cover image ACM SIGPLAN Notices
                    ACM SIGPLAN Notices  Volume 45, Issue 6
                    PLDI '10
                    June 2010
                    496 pages
                    ISSN:0362-1340
                    EISSN:1558-1160
                    DOI:10.1145/1809028
                    Issue’s Table of Contents

                  Copyright © 2010 ACM

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 5 June 2010

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • research-article

                  Acceptance Rates

                  Overall Acceptance Rate406of2,067submissions,20%

                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!