Implementation and Application of Functional Languages

Volume 7257 of the series Lecture Notes in Computer Science pp 69-84

Lazy Generation of Canonical Test Programs

  • Jason S. ReichAffiliated withDepartment of Computer Science, University of York
  • , Matthew NaylorAffiliated withDepartment of Computer Science, University of York
  • , Colin RuncimanAffiliated withDepartment of Computer Science, University of York

* Final gross prices may vary according to local VAT.

Get Access


Property-based testing can be a highly effective form of lightweight verification, but it relies critically on the method used to generate test cases. If we wish to test properties of compilers and related tools we need a generator for source programs as test cases.

We describe experiments generating functional programs in a core first-order language with algebraic data types. Candidate programs are generated freely over a syntactic representation with positional names. Static conditions for program validity and canonical representatives of large equivalence classes are defined separately. The technique is used to investigate the correctness properties of a program optimisation and two language implementations.


automated testing Small Check lightweight verification compiler correctness search-based software engineering