A promise checked is a promise kept: inspection testing

A promise checked is a promise kept: inspection testing
复制标题

兑现承诺就是兑现承诺:检验测试

DOI:
10.1145/3242744.3242748
复制
发表时间:
2018
期刊:
Proceedings of the 11th ACM SIGPLAN International Symposium on Haskell
影响因子:
--
通讯作者:
Joachim Breitner
Joachim Breitner
中科院分区:
--
文献类型:
--
作者:
Joachim Breitner

文献摘要

参考文献

被引文献

相似文献

有时,开发人员需要确保编译器以特定方式处理其代码,这种方式只能通过检查中间或最终编译工件才能看到。这在精心设计的组合库中尤其常见,其中某些使用模式预计会触发一系列复杂的编译器优化——流融合就是一个众所周知的例子。此类库的开发人员必须手动检查构建工件并检查预期的属性。因为这太乏味了,不经常做,所以如果库代码、其依赖项或编译器的更改破坏了该属性,很可能会被忽视。缺乏自动化导致此类库的发布版本违背了其记录的承诺。这表明对新的测试范例(检查测试)的需求未被认识到,其中程序员以声明方式描述编译工件的非功能属性,并且编译器检查这些属性。我们抽象地定义了检查测试,在 Haskell 编译器 GHC 的上下文中实现它,并表明它提高了此类库的质量。
Occasionally, developers need to ensure that the compiler treats their code in a specific way that is only visible by inspecting intermediate or final compilation artifacts. This is particularly common with carefully crafted compositional libraries, where certain usage patterns are expected to trigger an intricate sequence of compiler optimizations – stream fusion is a well-known example. The developer of such a library has to manually inspect build artifacts and check for the expected properties. Because this is too tedious to do often, it will likely go unnoticed if the property is broken by a change to the library code, its dependencies or the compiler. The lack of automation has led to released versions of such libraries breaking their documented promises. This indicates that there is an unrecognized need for a new testing paradigm, inspection testing, where the programmer declaratively describes non-functional properties of an compilation artifact and the compiler checks these properties. We define inspection testing abstractly, implement it in the context of the Haskell Compiler GHC and show that it increases the quality of such libraries.
DOI: 10.1145/3236797
发表时间: 2018
影响因子: --
作者:
Foner, Kenneth;Zhang, Hengchu;Lampropoulos, Leonidas
通讯作者: Lampropoulos, Leonidas