skip to main content
10.1145/1706299.1706307acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Compositional may-must program analysis: unleashing the power of alternation

Published:17 January 2010Publication History

ABSTRACT

Program analysis tools typically compute two types of information: (1) may information that is true of all program executions and is used to prove the absence of bugs in the program, and (2) must information that is true of some program executions and is used to prove the existence of bugs in the program. In this paper, we propose a new algorithm, dubbed SMASH, which computes both may and must information compositionally . At each procedure boundary, may and must information is represented and stored as may and must summaries, respectively. Those summaries are computed in a demand driven manner and possibly using summaries of the opposite type. We have implemented SMASH using predicate abstraction (as in SLAM) for the may part and using dynamic test generation (as in DART) for the must part. Results of experiments with 69 Microsoft Windows 7 device drivers show that SMASH can significantly outperform may-only, must-only and non-compositional may-must algorithms. Indeed, our empirical results indicate that most complex code fragments in large programs are actually often either easy to prove irrelevant to the specific property of interest using may analysis or easy to traverse using directed testing. The fine-grained coupling and alternation of may (universal) and must (existential) summaries allows SMASH to easily navigate through these code fragments while traditional may-only, must-only or non-compositional may-must algorithms are stuck in their specific analyses.

References

  1. S. Anand, P. Godefroid, and N. Tillmann. Demand-driven compositional symbolic execution. In TACAS '08: Tools and Algorithms for the Construction and Analysis of Systems, pages 367--381, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. T. Ball, O. Kupferman, and G. Yorsh. Abstraction for falsification. In CAV '05: Computer-Aided Verification, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. T. Ball and S. K. Rajamani. Bebop: A symbolic model checker for boolean programs. In SPIN '00: International SPIN Workshop, pages 113--130, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. T. Ball and S. K. Rajamani. Automatically validating temporal safety properties of interfaces. In SPIN '01: SPIN workshop on Model checking of Software, pages 103--122, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. N. E. Beckman, A. V. Nori, S. K. Rajamani, and R. J. Simmons. Proofs from tests. In ISSTA'08: International Symposium on Software Testing and Analysis, pages 3--14, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. Beyer, T. A. Henzinger, and G. Theoduloz. Program analysis with dynamic precision adjustment. In ASE '08: Automated Software Engineering, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. W.R. Bush, J.D. Pincus, and D.J. Sielaff. A static analyzer for finding dynamic programming errors. Software Practice and Experience, 30(7):775--802, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. C. Cadar, V. Ganesh, P. M. Pawlowski, D. L. Dill, and D. R. Engler. EXE: Automatically generating inputs of death. In CCS '06: Computer and Communications Security Conference, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. B. Cook, A. Podelski, and A. Rybalchenko. Termination proofs for systems code. In PLDI '06: Programming Language Design and Implementation, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. C. Csallner and Y. Smaragdakis. Check'n Crash: Combining static checking and testing. In ICSE '05: International Conference on Software Engineering, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. M. Das, S. Lerner, and M. Seigle. ESP: Path-sensitive program verification in polynomial time. In PLDI'02: Programming Language Design and Implementation, pages 57--69, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. L. de Moura and N. Bjorner. Z3: An Efficient SMT Solver. In TACAS '08: Tools and Algorithms for the Construction and Analysis of Systems, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. I. Dillig, T. Dillig, and A. Aiken. Sound, complete and scalable path-sensitive analysis. In PLDI '08: Programming Language Design and Implementation, pages 270--280, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. P. Godefroid. Compositional dynamic test generation. In POPL '07: Principles of Programming Languages, pages 47--54, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. P. Godefroid, M. Huth, and R. Jagadeesan. Abstraction-based model checking using modal transition systems. In CONCUR '01: International Conference on Concurrency Theory, pages 426--440, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. P. Godefroid, N. Klarlund, and K. Sen. DART: Directed Automated Random Testing. In PLDI '05: Programming Language Design and Implementation, pages 213--223, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. P. Godefroid, M.Y. Levin, and D. Molnar. Active property checking. In EMSOFT '08: Annual Conference on Embedded Software, pages 207--216, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. P. Godefroid, M.Y. Levin, and D. Molnar. Automated whitebox fuzz testing. In NDSS '08: Network and Distributed Systems Security, pages 151--166, 2008.Google ScholarGoogle Scholar
  19. B. S. Gulavani, T. A. Henzinger, Y. Kannan, A. V. Nori, and S. K. Rajamani. synergy: A new algorithm for property checking. In FSE '06: Foundations of Software Engineering, pages 117--127, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. K. Gupta, T. A. Henzinger, R. Majumdar, A. Rybalchenko, and R-G. Xu. Proving non-termination. In POPL '08: Principles of Programming Languages, pages 147--158, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. A. Gurfinkel, O. Wei, and M. Chechik. Yasm: A software model checker for verification and refutation. In CAV '06: Computer-Aided Verification, pages 170--174, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. A. Gurfinkel, O. Wei, and M. Chechik. Model checking recursive programs with exact predicate abstraction. In ATVA '08: Automated Technology for Verification and Analysis, pages 95--110, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. S. Hallem, B. Chelf, Y. Xie, and D. Engler. A system and language for building system-specific static analyses. In PLDI'02: Programming Language Design and Implementation, pages 69--82, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. T. A. Henzinger, R. Jhala, R. Majumdar, and G. Sutre. Lazy abstraction. In POPL '02: Principles of Programming Languages, pages 58--70, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. Horwitz, T. Reps, and M. Sagiv. Demand interprocedural dataflow analysis. In FSE '95: Foundations of Software Engineering, pages 104--115, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Y. Kesten and A. Pnueli. Verification by augmented finitary abstraction. Information and Computation, 163(1), 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. K. L. McMillan. Interpolation and SAT--based model checking. In CAV '03: Computer-Aid Verification, pages 1--13, 2003.Google ScholarGoogle ScholarCross RefCross Ref
  28. G. C. Necula, S. McPeak, and W. Weimer. CCured: Type-safe retrofitting of legacy code. In POPL '02: Principles of Programming Languages, pages 128--139, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. A. V. Nori, S. K Rajamani, S. Tetali, and A. V. Thakur. The Yogi Project: Software property checking via static analysis and testing. In TACAS '09: Tools and Algorithms for the Construction and Analysis of Systems, pages 178--181, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. M. Sagiv, T. Reps, and R. Wilhelm. Parametric shape analysis via 3-valued logic. In POPL '99: Principles of Programming Languages, pages 105--118, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. T. Uribe. Abstraction-based Deductive-Algorithmic Verification of Reactive Systems. PhD thesis, Stanford University, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. W. Visser, C. Pasareanu, and S. Khurshid. Test input generation with java pathfinder. In ISSTA '04: International Symposium on Software Testing and Analysis, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Compositional may-must program analysis: unleashing the power of alternation

                Recommendations

                Reviews

                Prahladavaradan Sampath

                The problem of software model checking is quite simply stated: is it possible to reach a particular instruction in the program when executing it__?__ This paper is the culmination of nearly a decade of effort toward solving this problem. The commercial driver behind this effort has been to improve the quality of the basic operating system (OS) code that runs on over one billion personal computers (PCs). The early part of this decade saw a breakthrough in software model checking: abstraction refinement techniques were effectively used to solve this problem. This work is based on the use of predicate abstraction to over-approximate a program-a technique that answers the question of unreachability of a program location. The latter part of the decade saw some progress in how advances in test case generation could be used to under-approximate the program and help in refining the predicate abstraction. The essential insight is that the reachability relation induced by test cases is the counterpart to the unreachability relation used by the predicate abstraction approach to software model checking. This paper shows how memoization techniques can be effectively used to make the software model-checking procedure compositional across procedures. Another important contribution-one with pedagogical significance-is the rule-based presentation of the software model-checking procedure. The presentation is very appealing and brings out the essential ideas, without cluttering the paper with the detailed algorithmic considerations that make such a procedure work on real programs. Online Computing Reviews Service

                Access critical reviews of Computing literature here

                Become a reviewer for Computing Reviews.

                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
                  POPL '10: Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
                  January 2010
                  520 pages
                  ISBN:9781605584799
                  DOI:10.1145/1706299
                  • cover image ACM SIGPLAN Notices
                    ACM SIGPLAN Notices  Volume 45, Issue 1
                    POPL '10
                    January 2010
                    500 pages
                    ISSN:0362-1340
                    EISSN:1558-1160
                    DOI:10.1145/1707801
                    Issue’s Table of Contents

                  Copyright © 2010 ACM

                  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]

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 17 January 2010

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • research-article

                  Acceptance Rates

                  Overall Acceptance Rate824of4,130submissions,20%

                  Upcoming Conference

                  POPL '25

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader