skip to main content
research-article

Smallcheck and lazy smallcheck: automatic exhaustive testing for small values

Published:25 September 2008Publication History
Skip Abstract Section

Abstract

This paper describes two Haskell libraries for property-based testing. Following the lead of QuickCheck, these testing libraries SmallCheck and Lazy SmallCheck also use type-based generators to obtain test-sets of finite values for which properties are checked, and report any counter-examples found. But instead of using a sample of randomly generated values they test properties for all values up to some limiting depth, progressively increasing this limit. The paper explains the design and implementation of both libraries and evaluates them in comparison with each other and with QuickCheck.

Skip Supplemental Material Section

Supplemental Material

Video

References

  1. Sergio Antoy, Rachid Echahed, and Michael Hanus. A needed narrowing strategy. In POPL'94, pages 268--279, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Lennart Augustsson. Overloaded booleans. http://augustss.blogspot.com/, 2007.Google ScholarGoogle Scholar
  3. Richard S. Bird. Introduction to Functional Programming Using Haskell. Prentice-Hall, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Jan Christiansen and Sebastian Fischer. Easycheck - test data for free. In FLOPS'08, pages 322--336. LNCS 4989, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. K. Claessen, C. Runciman, O. Chitil, R. J. M. Hughes, and M. Wallace. Testing and tracing lazy functional programs using QuickCheck and Hat. In AFP'02, pages 59--99. Springer LNCS 2638, 2002.Google ScholarGoogle Scholar
  6. Koen Claessen and John Hughes. QuickCheck: A lightweight tool for random testing of Haskell programs. In ICFP'00, pages 268--279. ACM SIGPLAN, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Andy Gill and Colin Runciman. Haskell program coverage. In Haskell'07, pages 1--12. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Michael Hanus. Curry: An Integrated Functional Logic Language. Language report, available online at http://www.informatik.uni-kiel.de/~curry,/report.html, March 2006.Google ScholarGoogle Scholar
  9. Graham Hutton. The countdown problem. Journal of Functional Programming, 12(6):609--616, November 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Daniel Jackson. Software abstractions: logic, language and analysis. The MIT Press, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Pieter W. M. Koopman, Artem Alimarine, Jan Tretmans, and Marinus J. Plasmeijer. Gast: Generic automated software testing. In IFL'02, pages 84--100. LNCS 2670, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Fredrik Lindblad. Property directed generation of first-order test data. In TFP'07, volume 8, pages 105--123. Intellect, 2008.Google ScholarGoogle Scholar
  13. John W. Lloyd. Programming in an integrated functional and logic language. Journal of Functional and Logic Programming, 1999 (3).Google ScholarGoogle Scholar
  14. Wolfgang Lux. The Munster Curry Compiler. http://danae.uni-muenster.de/~lux/curry/, 2003.Google ScholarGoogle Scholar
  15. Neil Mitchell and Stefan O'Rear. Derive - project home page. http://www.cs.york.ac.uk/~ndm/derive/, March 2007.Google ScholarGoogle Scholar
  16. Neil Mitchell and Colin Runciman. A static checker for safe pattern matching in Haskell. In TFP'05, volume 6, pages 15--30. Intellect, 2007.Google ScholarGoogle Scholar
  17. Matthew Naylor and Colin Runciman. The Reduceron: Widening the von Neumann bottleneck for graph reduction using an FPGA. In IFL'07, page to appear. LNCS, 2008.Google ScholarGoogle Scholar
  18. Matthew Naylor and Colin Runciman. Finding inputs that reach a target expression. In SCAM'07, pages 133--142. IEEE Computer Society, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Chris Okasaki. Red-black trees in a functional setting. Journal of Functional Programming, 9(4): 471--477, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Simon Peyton Jones. The Implementation of Functional Programming Languages. Computer Science. Prentice-Hall, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Simon Peyton Jones, Alastair Reid, Fergus Henderson, Tony Hoare, and Simon Marlow. A semantics for imprecise exceptions. In PLDI'99, pages 25--36. ACM, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. D. A. Turner. A new implementation technique for applicative languages. Software - Practice and Experience, 9(1):31--49, 1979.Google ScholarGoogle Scholar

Index Terms

  1. Smallcheck and lazy smallcheck: automatic exhaustive testing for small values

      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 SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 44, Issue 2
        HASKELL '08
        February 2009
        126 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1543134
        Issue’s Table of Contents
        • cover image ACM Conferences
          Haskell '08: Proceedings of the first ACM SIGPLAN symposium on Haskell
          September 2008
          134 pages
          ISBN:9781605580647
          DOI:10.1145/1411286
          • Program Chair:
          • Andy Gill

        Copyright © 2008 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 25 September 2008

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!