Keep your laziness in check
Keep your laziness in check
复制标题
控制你的懒惰
DOI:
10.1145/3236797
复制
发表时间:
2018
影响因子:
--
通讯作者:
Lampropoulos, Leonidas
中科院分区:
文献类型:
--
作者:
Foner, Kenneth;Zhang, Hengchu;Lampropoulos, Leonidas
We introduce StrictCheck: a property-based random testing framework for observing, specifying, and testing the strictness of Haskell functions. Strictness is traditionally considered a non-functional property; StrictCheck allows it to be tested as if it were one, by reifying demands on data structures so they can be manipulated and examined within Haskell.Testing strictness requires us to 1) precisely specify the strictness of functions, 2) efficiently observe the evaluation of data structures, and 3) correctly generate functions with random strictness. We tackle all three of these challenges, designing an efficient generic framework for precise dynamic strictness testing. StrictCheck can specify and test the strictness of any Haskell function---including higher-order ones---with only a constant factor of overhead, and requires no boilerplate for testing functions on Haskell-standard algebraic data types. We provide an expressive but low-level specification language as a foundation upon which to build future higher-level abstractions.We demonstrate a non-trivial application of our library, developing a correct specification of a data structure whose properties intrinsically rely on subtle use of laziness: Okasaki's constant-time purely functional queue.
登录
查看更多内容
影响因子:
1.1
作者:
Chris Okasaki
通讯作者:
Chris Okasaki
DOI:
10.1007/978-3-540-27764-4_6
发表时间:
2004
期刊:
Comparative biochemistry and physiology. Toxicology & pharmacology : CBP
影响因子:
--
作者:
Nils Anders Danielsson;Patrik Jansson
通讯作者:
Patrik Jansson
影响因子:
1.1
作者:
Edsko de Vries;Andres Löh
通讯作者:
Andres Löh
DOI:
--
发表时间:
1991
期刊:
Conference on Functional Programming Languages and Computer Architecture
影响因子:
--
作者:
E. Meijer;M. Fokkinga;R. Paterson
通讯作者:
R. Paterson
DOI:
10.1007/978-3-642-13977-2_3
发表时间:
2010
期刊:
The Lancet
影响因子:
--
作者:
Koen Claessen;Nicholas Smallbone;John Hughes
通讯作者:
John Hughes