Keep your laziness in check

Keep your laziness in check
复制标题

控制你的懒惰

DOI:
10.1145/3236797
复制
发表时间:
2018
影响因子:
--
通讯作者:
Lampropoulos, Leonidas
Lampropoulos, Leonidas
中科院分区:
--
文献类型:
--
作者:
Foner, Kenneth;Zhang, Hengchu;Lampropoulos, Leonidas

文献摘要

参考文献

被引文献

相似文献

我们将介绍一个基于属性的随机测试框架,用于观察、指定和测试Haskell函数的严格性。严格性传统上被认为是一个非函数属性;通过具体化对数据结构的需求,Haskell可以对它们进行操作和检查,从而允许将其作为一个属性进行测试。测试严格性要求我们1)精确地指定函数的严格性,2)有效地观察数据结构的评估,3)正确地生成具有随机严格性的函数。我们解决了这三个挑战,设计了一个有效的通用框架,用于精确的动态严格性测试。AptCheck可以指定和测试任何Haskell函数的严格性-包括高阶函数-只需要一个常数的开销因子,并且不需要在Haskell标准代数数据类型上测试函数的样板。我们提供了一个富有表现力的,但低级别的规范语言作为基础上,建立未来的更高级别的abstractions.We展示了我们的库的一个不平凡的应用程序,开发一个正确的规范的数据结构,其属性本质上依赖于微妙的使用懒惰:冈崎的常数时间纯函数队列。
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.
简单高效的纯功能队列和双端队列
DOI: 10.1017/s0956796800001489
发表时间: 1995
影响因子: 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
乘积的真实总和
DOI: 10.1145/2633628.2633634
发表时间: 2014
影响因子: 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
QuickSpec:使用测试猜测正式规格
DOI: 10.1007/978-3-642-13977-2_3
发表时间: 2010
期刊: The Lancet
影响因子: --
作者:
Koen Claessen;Nicholas Smallbone;John Hughes
通讯作者: John Hughes