Skip to main content

Symbolic Test Case Generation for Primitive Recursive Functions

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 3395))

Abstract

We present a method for the automatic generation of test cases for HOL formulae containing primitive recursive predicates. These test cases can be used for the animation of specifications as well as for black-box testing of external programs.

Our method is two-staged: first, the original formula is partitioned into test cases by transformation into a Horn-clause normal form (HCNF). Second, the test cases are analyzed for instances with constant terms satisfying the premises of the clauses. Particular emphasis is put on the control of test hypotheses and test hierarchies to avoid intractability. We applied our method to several examples, including AVL-trees and the red-black tree implementation in the standard library from SML/NJ.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. QCheck/SML: http://contrapunctus.net/league/haques/qcheck/

  2. SML of New Jersey: http://www.smlnj.org/

  3. Adelson-Velskiĭ, G.M., Landis, E.M.: An algorithm for the organization of information. Soviet Mathematics Doklady 3, 1259–1263 (1962)

    Google Scholar 

  4. Bayer, R.: Symmetric binary B-trees: Data structure and maintenance algorithms. Acta Informatica 1(4), 290–306 (1972)

    Article  MathSciNet  MATH  Google Scholar 

  5. Biere, A., Cimatti, A., Clarke, E., Strichman, O., Zhu, Y.: Bounded Model Checking. In: Computers Advance, vol. 58 (2003)

    Google Scholar 

  6. Brucker, A.D., Wolff, B.: A proposal for a formal OCL semantics in Isabelle/HOL. In: Carreño, V.A., Muñoz, C.A., Tahar, S. (eds.) TPHOLs 2002. LNCS, vol. 2410, pp. 99–114. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  7. Brucker, A.D., Wolff, B.: A case study of a formalized security architecture. In: Arts, T., Fokkink, W. (eds.) FMICS 2003, Roros. Electronic Notes in Theoretical Computer Science, vol. 80. Elsevier Science Publishers, Amsterdam (2003)

    Google Scholar 

  8. Claessen, K., Hughes, J.: QuickCheck: a lightweight tool for random testing of Haskell programs. In: Proceedings of the fifth ACM SIGPLAN international conference on Functional programming, pp. 268–279. ACM Press, New York (2000)

    Chapter  Google Scholar 

  9. Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proceedings of the 4th ACM SIGACT-SIGPLAN symposium on Principles of programming languages, pp. 238–252. ACM Press, New York (1977)

    Google Scholar 

  10. DAgostino, M., Gabbay, D., Hähnle, R., Posegga, J. (eds.): Handbook of Tableau Methods. Kluwer, Dordrecht (1996)

    Google Scholar 

  11. Dahl, O.-J., Dijkstra, E.W., Hoare, C.A.R.: Structured Programming. In: A.P.I.C. Studies in Data Processing, vol. 8. Academic Press, London (1972)

    Google Scholar 

  12. Dick, J., Faivre, A.: Automating the generation and sequencing of test cases from model-based specications. In: Larsen, P.G., Woodcock, J.C.P. (eds.) FME 1993. LNCS, vol. 670, pp. 268–284. Springer, Heidelberg (1993)

    Chapter  Google Scholar 

  13. Gaudel, M.-C.: Testing can be formal, too. In: Mosses, P.D., Schwartzbach, M.I., Nielsen, M. (eds.) CAAP 1995, FASE 1995, and TAPSOFT 1995. LNCS, vol. 915, pp. 82–96. Springer, Heidelberg (1995)

    Chapter  Google Scholar 

  14. Hayashi, S.: Towards the animation of proofs—testing proofs by examples. Theoretical Computer Science 272(1-2), 177–195 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  15. Huber, F., Schätz, B., Schmidt, A., Spies, K.: AutoFocus - a tool for distributed systems specification. In: Jonsson, B., Parrow, J. (eds.) FTRTFT 1996. LNCS, vol. 1135, pp. 467–470. Springer, Heidelberg (1996)

    Chapter  Google Scholar 

  16. Kimmig, A.: Red-black trees of smlnj. Studienarbeit, Universität Freiburg (2003)

    Google Scholar 

  17. Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL — A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002)

    MATH  Google Scholar 

  18. Pretschner, A.: Classical search strategies for test case generation with constraint logic programming. In: Brinksma, E., Tretmans, J. (eds.) Proc. Formal approaches to testing of software, pp. 47–60. BRICS (2001)

    Google Scholar 

  19. Slind, K., Hurd, J.: Applications of polytypism in theorem proving. In: Basin, D., Wolff, B. (eds.) TPHOLs 2003. LNCS, vol. 2758, pp. 103–119. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  20. Visser, W., Păsăreanu, C.S., Khurshid, S.: Test input generation with Java PathFinder. SIGSOFT Softw. Eng. Notes 29(4), 97–107 (2004)

    Article  Google Scholar 

  21. Zhu, H., Hall, P.A., May, J.H.R.: Software unit test coverage and adequacy. ACM Computing Surveys 29(4), 366–427 (1997)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 IFIP International Federation for Information Processing

About this paper

Cite this paper

Brucker, A.D., Wolff, B. (2005). Symbolic Test Case Generation for Primitive Recursive Functions. In: Grabowski, J., Nielsen, B. (eds) Formal Approaches to Software Testing. FATES 2004. Lecture Notes in Computer Science, vol 3395. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-31848-4_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-31848-4_2

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-25109-5

  • Online ISBN: 978-3-540-31848-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics