Shrinking and showing functions (Functional pearl)
Paper i proceeding, 2012

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.

quickcheck

testing

counter example

Författare

Koen Lindström Claessen

Chalmers, Data- och informationsteknik, Programvaruteknik

SIGPLAN Notices (ACM Special Interest Group on Programming Languages)

0362-1340 (ISSN)

Vol. 47 73-80

Ämneskategorier

Data- och informationsvetenskap

DOI

10.1145/2430532.2364516

ISBN

978-145031574-6