skip to main content
10.1145/1401827.1401833acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Random testing and model checking: building a common framework for nondeterministic exploration

Published:21 July 2008Publication History

ABSTRACT

Two popular forms of dynamic analysis, random testing and explicit-state software model checking, are perhaps best viewed as search strategies for exploring the state spaces introduced by nondeterminism in program inputs. We present an approach that enables this nondeterminism to be expressed in the SPIN model checker's PROMELA language, and then lets users generate either model checkers or random testers from a single harness for a tested C program. Our approach makes it easy to compare model checking and random testing for models with precisely the same input ranges and probabilities and allows us to mix random testing with model checking's exhaustive exploration of non-determinism. The PROMELA language, as intended in its design, serves as a convenient notation for expressing nondeterminism and mixing random choices with nondeterministic choices. We present and discuss a comparison of random testing and model checking. The results derive from using our framework to test a C program with an effectively infinite state space, a module in JPL's next Mars rover mission. More generally, we show how the ability of the SPIN model checker to call C code can be used to extend SPIN's features, and hope to inspire others to use the same methods to implement dynamic analyses that can make use of efficient state storage, matching, and backtracking.

References

  1. http://mars.jpl.nasa.gov/msl/.Google ScholarGoogle Scholar
  2. Edmund M. Clarke, Orna Grumberg, and Doron Peled. Model Checking. MIT Press, 2000.Google ScholarGoogle Scholar
  3. Matthew B. Dwyer, Sebastian G. Elbaum, Suzette Person, and Ragul Purandare. Parallel randomized state-space search. In International Conference on Software Engineering, pages 3--12, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Matthew B. Dwyer, Suzette Person, and Sebastian Elbaum. Controlling factors in evaluating path-sensitive error detection techniques. In Foundations of Software Engineering, pages 92--104, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Michael Ernst, Jake Cockrell, William Griswold, and David Notkin. Dynamically discovering likely program invariants to support program evolution. In International Conference on Software Engineering, pages 213--224, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Alex Groce, Gerard Holzmann, and Rajeev Joshi. Randomized differential testing as a prelude to formal verification. In International Conference on Software Engineering, pages 621--631, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Alex Groce and Rajeev Joshi. Extending model checking with dynamic analysis. In International Conference on Verification, Model Checking, and Abstract Interpretation, pages 142--156, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Alex Groce and Willem Visser. Heuristics for model checking Java programs. Software Tools for Technology Transfer, 6(4): 260--276, 2004.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Richard Hamlet. Random testing. In Encyclopedia of Software Engineering, pages 970--978. Wiley, 1994.Google ScholarGoogle Scholar
  10. Richard Hamlet. When only random testing will do. In International Workshop on Random Testing, pages 1--9, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Gerard Holzmann and Rajeev Joshi. Model-driven software verification. In SPIN Workshop on Model Checking of Software, pages 76--91, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  12. Gerard J. Holzmann. The SPIN Model Checker: Primer and Reference Manual. Addison-Wesley Professional, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. William McKeeman. Differential testing for software. Digital Technical Journal of Digital Equipment Corporation, 10(1): 100--107, 1998.Google ScholarGoogle Scholar
  14. Carlos Pacheco, Shuvendu K. Lahiri, Michael D. Ernst, and Thomas Ball. Feedback-directed random test generation. In International Conference on Software Engineering, pages 75--84, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Willem Visser, Klaus Havelund, Guillaume Brat, SeungJoon Park, and Flavio Lerda. Model checking programs. Automated Software Engineering, 10(2): 203--232, April 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Willem Visser, Corina Pǎsǎreanu, and Radek Pelanek. Test input generation for Java containers using state matching. In International Symposium on Software Testing and Analysis, pages 37--48, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Random testing and model checking: building a common framework for nondeterministic exploration

    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
      WODA '08: Proceedings of the 2008 international workshop on dynamic analysis: held in conjunction with the ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2008)
      July 2008
      81 pages
      ISBN:9781605580548
      DOI:10.1145/1401827

      Copyright © 2008 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: 21 July 2008

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Upcoming Conference

      ICSE 2025

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader