Test input generators are an important part of property-based testing (PBT) frameworks. Because PBT is intended to test deep semantic and structural properties of a program, the outputs produced by these generators can be complex data structures, constrained to satisfy properties the developer believes is most relevant to testing the function of interest. An important feature expected of these generators is that they be capable of producing all acceptable elements that satisfy the function's input type and generator-provided constraints. However, it is not readily apparent how we might validate whether a particular generator's output satisfies this coverage requirement. Typically, developers must rely on manual inspection and post-mortem analysis of test runs to determine if the generator is providing sufficient coverage; these approaches are error-prone and difficult to scale as generators become more complex. To address this important concern, we present a new refinement type-based verification procedure for validating the coverage provided by input test generators, based on a novel interpretation of types that embeds ``must-style'' underapproximate reasoning principles as a fundamental part of the type system. The types associated with expressions now capture the set of values guaranteed to be produced by the expression, rather than the typical formulation that uses types to represent the set of values an expression may produce. Beyond formalizing the notion of coverage types in the context of a rich core language with higher-order procedures and inductive datatypes, we also present a detailed evaluation study to justify the utility of our ideas.


翻译:测试输入生成器是基于属性测试(PBT)框架的重要组成部分。由于PBT旨在检验程序的深层语义与结构属性,这些生成器产生的输出可能是复杂的数据结构,且需满足开发者认为与测试目标函数最相关的约束条件。对这些生成器的一个关键期望是,它们应当能够生成所有满足函数输入类型和生成器约束条件的合法元素。然而,如何验证特定生成器的输出是否满足这一覆盖要求并非显而易见。通常,开发者需依赖人工检查与测试运行的事后分析来判断生成器是否提供足够覆盖;随着生成器日益复杂,这些方法易出错且难以扩展。为解决这一重要问题,我们提出了一种新的基于精化类型的验证过程,用于验证输入测试生成器提供的覆盖能力。该方法基于一种新颖的类型解释,将“必须风格”的下近似推理原则作为类型系统的基本组成部分。与通常用类型表示表达式可能产生的值集不同,现在与表达式关联的类型捕获了该表达式保证产生的值集。除了在包含高阶过程和归纳数据类型丰富核心语言中形式化覆盖类型的概念外,我们还通过详细的评估研究验证了所提思想的实用性。

0
下载
关闭预览

相关内容

生成器是一次生成一个值的特殊类型函数。可以将其视为可恢复函数。调用该函数将返回一个可用于生成连续 x 值的生成【Generator】,简单的说就是在函数的执行过程中,yield语句会把你需要的值返回给调用生成器的地方,然后退出函数,下一次调用生成器函数的时候又从上次中断的地方开始执行,而生成器内的所有变量参数都会被保存下来供下一次使用。
49篇ICLR2020高分「图机器学习GML」接受论文及代码
专知会员服务
62+阅读 · 2020年1月18日
论文浅尝 | Neural-Symbolic Models for Logical Queries on KG
开放知识图谱
0+阅读 · 2022年10月31日
GNN 新基准!Long Range Graph Benchmark
图与推荐
0+阅读 · 2022年10月18日
一文带你浏览Graph Transformers
极市平台
1+阅读 · 2022年7月12日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
R工程化—Rest API 之plumber包
R语言中文社区
11+阅读 · 2018年12月25日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
MoCoGAN 分解运动和内容的视频生成
CreateAMind
18+阅读 · 2017年10月21日
Generative Adversarial Text to Image Synthesis论文解读
统计学习与视觉计算组
13+阅读 · 2017年6月9日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2013年12月31日
国家自然科学基金
1+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2010年12月31日
Towards Reasoning in Large Language Models: A Survey
Arxiv
0+阅读 · 2023年5月26日
Knowledge Embedding Based Graph Convolutional Network
Arxiv
24+阅读 · 2021年4月23日
Arxiv
12+阅读 · 2019年3月14日
VIP会员
最新内容
《基于强化学习的自动化红队测试》
专知会员服务
3+阅读 · 7月23日
伊朗不对称防空战略的演进
专知会员服务
4+阅读 · 7月23日
对抗环境下超视距目标打击的情报支援
专知会员服务
10+阅读 · 7月22日
《无人机对海面作战影响评估》
专知会员服务
15+阅读 · 7月21日
印度精确打击与指挥架构的断层
专知会员服务
7+阅读 · 7月20日
相关VIP内容
49篇ICLR2020高分「图机器学习GML」接受论文及代码
专知会员服务
62+阅读 · 2020年1月18日
相关资讯
论文浅尝 | Neural-Symbolic Models for Logical Queries on KG
开放知识图谱
0+阅读 · 2022年10月31日
GNN 新基准!Long Range Graph Benchmark
图与推荐
0+阅读 · 2022年10月18日
一文带你浏览Graph Transformers
极市平台
1+阅读 · 2022年7月12日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
R工程化—Rest API 之plumber包
R语言中文社区
11+阅读 · 2018年12月25日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
MoCoGAN 分解运动和内容的视频生成
CreateAMind
18+阅读 · 2017年10月21日
Generative Adversarial Text to Image Synthesis论文解读
统计学习与视觉计算组
13+阅读 · 2017年6月9日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2013年12月31日
国家自然科学基金
1+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2010年12月31日
Top
微信扫码咨询专知VIP会员