skip to main content
article

CUTE: a concolic unit testing engine for C

Published:01 September 2005Publication History
Skip Abstract Section

Abstract

In unit testing, a program is decomposed into units which are collections of functions. A part of unit can be tested by generating inputs for a single entry function. The entry function may contain pointer arguments, in which case the inputs to the unit are memory graphs. The paper addresses the problem of automating unit testing with memory graphs as inputs. The approach used builds on previous work combining symbolic and concrete execution, and more specifically, using such a combination to generate test inputs to explore all feasible execution paths. The current work develops a method to represent and track constraints that capture the behavior of a symbolic execution of a unit with memory graphs as inputs. Moreover, an efficient constraint solver is proposed to facilitate incremental generation of such test inputs. Finally, CUTE, a tool implementing the method is described together with the results of applying CUTE to real-world examples of C code.

References

  1. T. Ball. Abstraction-guided test generation: A case study. Technical Report MSR-TR-2003-86, Microsoft Research.Google ScholarGoogle Scholar
  2. C. W. Barrett and S. Berezin. CVC Lite: A new implementation of the cooperating validity checker. In Proc. 16th International Conference on Computer Aided Verification, pages 515--518, July 2004.Google ScholarGoogle ScholarCross RefCross Ref
  3. D. Beyer, A. J. Chlipala, T. A. Henzinger, R. Jhala, and R. Majumdar. Generating Test from Counterexamples. In Proc. of the 26th ICSE, pages 326--335, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. Bird and C. Munoz. Automatic Generation of Random Self-Checking Test Cases. IBM Systems Journal, 22(3):229--245, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C. Boyapati, S. Khurshid, and D. Marinov. Korat: Automated testing based on Java predicates. In Proc. of International Symposium on Software Testing and Analysis, pages 123--133, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Cadar and D. Engler. Execution generated test cases: How to make systems code crash itself. In Proc. of SPIN Workshop, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. K. Claessen and J. Hughes. Quickcheck: A lightweight tool for random testing of Haskell programs. In Proc. of 5th ACM SIGPLAN International Conference on Functional Programming (ICFP), pages 268--279, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. C. Csallner and Y. Smaragdakis. JCrasher: an automatic robustness tester for Java. Software: Practice and Experience, 34:1025--1050, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. C. Csallner and Y. Smaragdakis. Check 'n' Crash: Combining static checking and testing. In 27th International Conference on Software Engineering, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. E. Forrester and B. P. Miller. An Empirical Study of the Robustness of Windows NT Applications Using Random Testing. In Proceedings of the 4th USENIX Windows System Symposium, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. P. Godefroid, N. Klarlund, and K. Sen. DART: Directed automated random testing. In Proc. of the ACM SIGPLAN 2005 Conference on Programming Language Design and Implementation (PLDI), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. W. Grieskamp, Y. Gurevich, W. Schulte, and M. Veanes. Generating finite state machines from abstract state machines. In Proc. International Symposium on Software Testing and Analysis, pages 112--122, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. N. Gupta, A. P. Mathur, and M. L. Soffa. Generating test data for branch coverage. In Proc. of the International Conference on Automated Software Engineering, pages 219--227, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. Khurshid, C. S. Pasareanu, and W. Visser. Generalized symbolic execution for model checking and testing. In Proc. 9th Int. Conf. on TACAS, pages 553--568, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. B. Korel. A dynamic Approach of Test Data Generation. In IEEE Conference on Software Maintenance, pages 311--317, November 1990.Google ScholarGoogle ScholarCross RefCross Ref
  16. E. Larson and T. Austin. High coverage detection of input-related security faults. In Proc. of the 12th USENIX Security Symposium (Security '03), Aug. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. lp_solve. http://groups.yahoo.com/group/lp_solve/.Google ScholarGoogle Scholar
  18. J. McCarthy and J. Painter. Correctness of a compiler for arithmetic expressions. In Proceedings of Symposia in Applied Mathematics. AMS, 1967.Google ScholarGoogle ScholarCross RefCross Ref
  19. G. C. Necula, S. McPeak, S. P. Rahul, and W. Weimer. CIL: Intermediate Language and Tools for Analysis and transformation of C Programs. In Proceedings of Conference on compiler Construction, pages 213--228, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. J. Offut and J. Hayes. A Semantic Model of Program Faults. In Proc. of ISSTA'96, pages 195--200, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. C. Pacheco and M. D. Ernst. Eclat: Automatic generation and classification of test inputs. In 19th European Conference Object-Oriented Programming, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Parasoft. Jtest manuals version 6.0. Online manual, February 2005. http://www.parasoft.com/.Google ScholarGoogle Scholar
  23. C. S. Pasareanu, M. B. Dwyer, and W. Visser. Finding feasible counter-examples when model checking abstracted java programs. In Proc. of TACAS'01, pages 284--298, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. K. Sen, D. Marinov, and G. Agha. CUTE: A concolic unit testing engine for C. Technical Report UIUCDCS-R-2005-2597, UIUC, 2005.Google ScholarGoogle ScholarCross RefCross Ref
  25. SGLIB. http://xref-tech.com/sglib/main.html.Google ScholarGoogle Scholar
  26. Valgrind. http://valgrind.org/.Google ScholarGoogle Scholar
  27. W. Visser, C. S. Pasareanu, and S. Khurshid. Test input generation with Java PathFinder. In Proc. 2004 ACM SIGSOFT International Symposium on Software Testing and Analysis, pages 97--107, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. S. Visvanathan and N. Gupta. Generating test data for functions with pointer inputs. In 17th IEEE International Conference on Automated Software Engineering, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. T. Xie, D. Marinov, and D. Notkin. Rostra: A framework for detecting redundant object-oriented unit tests. In Proc. 19th IEEE International Conference on Automated Software Engineering, pages 196--205, Sept. 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. T. Xie, D. Marinov, W. Schulte, and D. Notkin. Symstra: A framework for generating object-oriented unit tests using symbolic execution. In Proc. of the Tools and Algorithms for the Construction and Analysis of Systems, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. CUTE: a concolic unit testing engine for C

    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

    Full Access

    • Published in

      cover image ACM SIGSOFT Software Engineering Notes
      ACM SIGSOFT Software Engineering Notes  Volume 30, Issue 5
      September 2005
      462 pages
      ISSN:0163-5948
      DOI:10.1145/1095430
      Issue’s Table of Contents
      • cover image ACM Conferences
        ESEC/FSE-13: Proceedings of the 10th European software engineering conference held jointly with 13th ACM SIGSOFT international symposium on Foundations of software engineering
        September 2005
        402 pages
        ISBN:1595930140
        DOI:10.1145/1081706

      Copyright © 2005 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: 1 September 2005

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader