Affiliation:
1. Chalmers University of Technology, Gothenburg, Sweden
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.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
4 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. falsify: Internal Shrinking Reimagined for Haskell;Proceedings of the 16th ACM SIGPLAN International Haskell Symposium;2023-08-30
2. Extrapolate;Proceedings of the 29th Symposium on the Implementation and Application of Functional Programming Languages;2017-08-30
3. SmartCheck;ACM SIGPLAN Notices;2015-05-11
4. Foundational Property-Based Testing;Interactive Theorem Proving;2015