skip to main content
10.1145/1295014.1295039acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
Article

Directed test generation using symbolic grammars

Published:03 September 2007Publication History

ABSTRACT

We present CESI, an algorithm that combines exhaustive enumeration of test inputs from a structured domain with symbolic execution driven test generation. CESI is a hybrid of two predominant techniques: specification-based enumerative test generation (which exhaustively generates all possible inputs satisfying some constraint) and symbolic directed test generation (which explores program paths based on symbolic path constraint solving). We target programs whose valid inputs are determined by some context free grammar. We introduce symbolic grammars, where the original tokens are replaced with symbolic constants, that link enumerative grammar-based input generation with symbolic directed testing. Symbolic grammars abstract the concrete input syntax, thus reducing the set of input strings that must be enumerated exhaustively. For each enumerated input string, which may contain symbolic constants, symbolic execution based test generation instantiates the constants based on program execution paths. The "template" generated by enumerating valid strings reduces the burden on the symbolic execution to generate syntactically valid inputs and hence exercise interesting code paths. Together, symbolic grammars provide a link between exhaustive enumeration of valid inputs and execution-directed symbolic test generation. In preliminary experiments, CESI is better than if both enumerative and symbolic techniques are used alone.

References

  1. Cve-2003-0466. 2003.Google ScholarGoogle Scholar
  2. Cve-2006-5994. 2006.Google ScholarGoogle Scholar
  3. M. Berkelaar, J. Dirks, K. Eikland, and P. Notebaert. lp_solve 5.5.0.10. 2007.Google ScholarGoogle Scholar
  4. C. Boyapati, S. Khurshid, and D. Marinov. Korat: automated testing based on java predicates. In ISSTA, pages 123--133, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C. Cadar, V. Ganesh, P. M. Pawlowski, D. L. Dill, and D. R. Engler. Exe: automatically generating inputs of death. In ACM CCS, pages 322--335. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. L. Clarke. A system to generate test data and symbolically execute programs. IEEE Trans. Software Eng., 2:215--222, 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. D. Coppit and J. Lian. yagg: an easy-to-use generator for structured test inputs. In ASE, pages 356--359. ACM, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. Godefroid, N. Klarlund, and K. Sen. Dart: directed automated random testing. In PLDI, pages 213--223. ACM, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. B. Goodenough and S. L. Gerhart. Toward a theory of test data selection. IEEE Trans. Software Eng., 1(2):156--173, 1975.Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. S. C. Johnson. Yacc -- yet another compiler-compiler. Computer Science Tehnical Report, (32), 1975.Google ScholarGoogle Scholar
  11. S. Khurshid and D. Marinov. Testera: Specification-based testing of java programs using sat. Autom. Softw. Eng., 11(4):403--434, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. C. King. Symbolic execution and program testing. Commun. ACM, 19(7):385--394, 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. R. Lämmel and W. Schulte. Controllable combinatorial coverage in grammar-based testing. In TestCom, volume 3964 of Lecture Notes in Computer Science, pages 19--38. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. E. Lesk and E. Schmidt. Lex -- a lexical analyser generator. Computer Science Tehnical Report, (39), 1975.Google ScholarGoogle Scholar
  15. P. M. Maurer. Generating test data with enhanced context-free grammars. IEEE Software, 7(4):50--55, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. K. Sen, D. Marinov, and G. Agha. Cute: a concolic unit testing engine for c. In ESEC/SIGSOFT FSE, pages 263--272. ACM, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. W. Visser, C. S. Pasareanu, and S. Khurshid. Test input generation with java pathfinder. In ISSTA, pages 97--107. ACM, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Directed test generation using symbolic grammars

    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
      ESEC-FSE companion '07: The 6th Joint Meeting on European software engineering conference and the ACM SIGSOFT symposium on the foundations of software engineering: companion papers
      September 2007
      189 pages
      ISBN:9781595938121
      DOI:10.1145/1295014

      Copyright © 2007 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: 3 September 2007

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate112of543submissions,21%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader