QuickCheck: a lightweight tool for random testing of Haskell programs
ICFP '00 Proceedings of the fifth ACM SIGPLAN international conference on Functional programming
Functional Implementations of Continuous Modeled Animation
PLILP '98/ALP '98 Proceedings of the 10th International Symposium on Principles of Declarative Programming
Generalizing generalized tries
Journal of Functional Programming
Infinite sets that admit fast exhaustive search
LICS '07 Proceedings of the 22nd Annual IEEE Symposium on Logic in Computer Science
Smallcheck and lazy smallcheck: automatic exhaustive testing for small values
Proceedings of the first ACM SIGPLAN symposium on Haskell
Testing polymorphic properties
ESOP'10 Proceedings of the 19th European conference on Programming Languages and Systems
Hi-index | 0.00 |
Although quantification over functions in QuickCheck properties has been supported from the beginning, displaying and shrinking them as counter examples has not. The reason is that in general, functions are infinite objects, which means that there is no sensible show function for them, and shrinking an infinite object within a finite number of steps seems impossible. This paper presents a general technique with which functions as counter examples can be shrunk to finite objects, which can then be displayed to the user. The approach turns out to be practically usable, which is shown by a number of examples. The two main limitations are that higher-order functions cannot be dealt with, and it is hard to deal with terms that contain functions as subterms.