CPL - Chalmers Publication Library

Shrinking and showing functions (Functional pearl)

Författare och institution:
Koen Claessen (Institutionen för data- och informationsteknik (Chalmers))
Publicerad i:
2012 ACM SIGPLAN Haskell Symposium, Haskell 2012. Copenhagen, 13 September 2012, 47 ( 12 ) s. 73-80
ISBN:
978-145031574-6
ISSN:
0362-1340
Publikationstyp:
Konferensbidrag, refereegranskat
Publiceringsår:
2012
Språk:
engelska
Fulltextlänk:
Sammanfattning (abstract):
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.
Ämne (baseras på Högskoleverkets indelning av forskningsämnen):
NATURVETENSKAP ->
Data- och informationsvetenskap
Nyckelord:
counter example, quickcheck, testing
Postens nummer:
166072
Posten skapad:
2012-11-14 16:05
Posten ändrad:
2013-02-22 15:35

Visa i Endnote-format