A promise checked is a promise kept: inspection testing

Author:

Breitner Joachim1

Affiliation:

1. University of Pennsylvania, USA

Abstract

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.

Funder

National Science Foundation

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference25 articles.

1. Lennart Augustsson. 2008. djinn: Generate Haskell code from a type. http://hackage.haskell.org/package/djinn. (2008). Lennart Augustsson. 2008. djinn: Generate Haskell code from a type. http://hackage.haskell.org/package/djinn. (2008).

2. Joachim Breitner. 2014. list-fusion-probe: testing list fusion for success. http://hackage.haskell.org/package/list-fusion-probe. (2014). Joachim Breitner. 2014. list-fusion-probe: testing list fusion for success. http://hackage.haskell.org/package/list-fusion-probe. (2014).

3. Joachim Breitner. 2018. ghc-justdoit: A magic typeclass that just does it. http://hackage.haskell.org/package/ghc-justdoit. (2018). Joachim Breitner. 2018. ghc-justdoit: A magic typeclass that just does it. http://hackage.haskell.org/package/ghc-justdoit. (2018).

4. Manuel M. T. Chakravarty Gabriele Keller Simon L. Peyton Jones and Simon Marlow. 2005. Associated types with class. In POPL. ACM. Manuel M. T. Chakravarty Gabriele Keller Simon L. Peyton Jones and Simon Marlow. 2005. Associated types with class. In POPL . ACM.

5. Koen Claessen and John Hughes. 2000. QuickCheck: a lightweight tool for random testing of Haskell programs. In ICFP. ACM. Koen Claessen and John Hughes. 2000. QuickCheck: a lightweight tool for random testing of Haskell programs. In ICFP . ACM.

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3