Property-Based Testing via Proof Reconstruction

Roberto Blanco, D. Miller, A. Momigliano
{"title":"Property-Based Testing via Proof Reconstruction","authors":"Roberto Blanco, D. Miller, A. Momigliano","doi":"10.1145/3354166.3354170","DOIUrl":null,"url":null,"abstract":"Property-based testing (PBT) is a technique for validating code against an executable specification by automatically generating test-data. We present a proof-theoretical reconstruction of this style of testing for relational specifications and employ the Foundational Proof Certificate framework to describe test generators. We do this by presenting certain kinds of \"proof outlines\" that can be used to describe various common generation strategies in the PBT literature, ranging from random to exhaustive, including their combination. We also address the shrinking of counterexamples as a first step towards their explanation. Once generation is accomplished, the testing phase boils down to a standard logic programming search. After illustrating our techniques on simple, first-order (algebraic) data structures, we lift it to data structures containing bindings using λ-tree syntax. The λProlog programming language is capable of performing both the generation and checking of tests. We validate this approach by tackling benchmarks in the metatheory of programming languages coming from related tools such as PLT-Redex.","PeriodicalId":182058,"journal":{"name":"Proceedings of the 21st International Symposium on Principles and Practice of Declarative Programming","volume":"25 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-09-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"9","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 21st International Symposium on Principles and Practice of Declarative Programming","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3354166.3354170","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 9

Abstract

Property-based testing (PBT) is a technique for validating code against an executable specification by automatically generating test-data. We present a proof-theoretical reconstruction of this style of testing for relational specifications and employ the Foundational Proof Certificate framework to describe test generators. We do this by presenting certain kinds of "proof outlines" that can be used to describe various common generation strategies in the PBT literature, ranging from random to exhaustive, including their combination. We also address the shrinking of counterexamples as a first step towards their explanation. Once generation is accomplished, the testing phase boils down to a standard logic programming search. After illustrating our techniques on simple, first-order (algebraic) data structures, we lift it to data structures containing bindings using λ-tree syntax. The λProlog programming language is capable of performing both the generation and checking of tests. We validate this approach by tackling benchmarks in the metatheory of programming languages coming from related tools such as PLT-Redex.
通过证明重构的基于属性的测试
基于属性的测试(PBT)是一种通过自动生成测试数据来根据可执行规范验证代码的技术。我们提出了这种类型的关系规范测试的证明理论重构,并使用基础证明证书框架来描述测试生成器。我们通过提供某些类型的“证明大纲”来做到这一点,这些“证明大纲”可用于描述PBT文献中各种常见的生成策略,范围从随机到详尽,包括它们的组合。我们还将反例的缩减作为解释反例的第一步。一旦生成完成,测试阶段就会归结为标准的逻辑编程搜索。在演示了简单的一阶(代数)数据结构技术之后,我们将其提升到使用λ-tree语法包含绑定的数据结构。λProlog编程语言能够执行测试的生成和检查。我们通过处理来自相关工具(如PLT-Redex)的编程语言元理论中的基准测试来验证这种方法。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信