paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Covering All the Bases: Type-Based Verification of Test Input Generators

覆盖所有情况:测试输入生成器的基于类型验证
PLDI 7(PLDI)2023匹配度 3/10 · 论文属于程序语言与形式化验证中的精化类型/静态分析工作,与用户对静态分析和验证的兴趣有边缘关联;但它不涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析,也不是将 AI 用于程序分析,因此不匹配核心研究方向。引用 7 inbox
Zhe Zhou, Ashish Mishra, Benjamin Delaware, Suresh Jagannathan
crossref: 2026-09-10

AI 速览

一句话:提出基于精化类型与 must 式欠近似推理的验证方法,确保测试输入生成器覆盖所有可接受输入。

在基于性质的测试(PBT)中,输入生成器应能产生满足函数输入类型与生成器约束的全部可接受元素,但验证其覆盖性通常依赖手工检查和事后运行分析,易错且难以扩展。本文提出一种基于精化类型的验证过程,用于验证测试输入生成器的覆盖性;其核心是将“must 风格”的欠近似推理嵌入类型系统,使类型刻画表达式保证产生的值集合,而非通常的可能产生值集合。作者在支持高阶过程与归纳数据类型的核心语言中形式化了 coverage types,并通过详细评估研究论证了方法的实用性。

问题
如何自动验证 PBT 测试输入生成器是否覆盖所有满足输入类型与生成器约束的可接受元素;现有手工检查与事后分析易错且难以扩展到复杂生成器。
方法
提出基于精化类型的覆盖验证过程,将 must 风格的欠近似推理嵌入类型系统,使类型表示表达式保证可产生的值集合,并在支持高阶过程与归纳数据类型的核心语言中形式化 coverage types。
评估
作者通过详细评估研究来证明所提方法在验证测试输入生成器覆盖性方面的实用性。
原文摘要(Abstract)

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 producingallacceptable 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 thiscoveragerequirement. 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 valuesguaranteedto be produced by the expression, rather than the typical formulation that uses types to represent the set of values an expressionmayproduce. Beyond formalizing the notion ofcoverage typesin 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.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot1949,
  title = {Covering All the Bases: Type-Based Verification of Test Input Generators},
  author = {Zhe Zhou and Ashish Mishra and Benjamin Delaware and Suresh Jagannathan},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {PLDI},
  year = {2023},
  doi = {10.1145/3591271}
}