paperbot · PL 论文追踪

全部论文 待读 收藏

P2 SMT2Test: From SMT Formulas to Effective Test Cases

SMT2Test:从 SMT 公式到有效测试用例
OOPSLA 8(OOPSLA2)2024匹配度 3/10 · 论文聚焦用 SMT 公式生成测试用例来测试程序验证器,属于形式验证/测试基础设施,但未涉及用户核心关注的 LLM/Agent 与静态分析/形式验证结合、浮点程序分析或贝叶斯程序分析。因此匹配度较低,仅可作为 PL/形式验证周边工作存档。引用 6 inbox
Chengyu Zhang, Zhendong Su
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出将 SMT 公式转换为程序、以可满足性作为测试预言来测试程序验证器的方法与框架。

软件测试的核心挑战之一是生成高质量输入并获取测试预言。本文提出面向程序验证器测试的新方法:将 SMT 公式作为通用测试用例生成器,把公式转换为程序,并令公式可满足性对应程序安全性质,从而以可满足性充当测试预言。作者实现了 SMT2Test,并设计中间表示以提升扩展性与模块化转换能力,目前支持转换为 Dafny 和 C 程序。评估使用 SMT 竞赛及 SMT 求解器 fuzzer 产生的公式测试 Dafny verifier 与 CPAchecker,发现并报告 14 个此前未知缺陷;它们均获确认,其中 6 个已修复。结果表明该方法有效,并有望用于测试其他编程语言基础设施。

问题
程序验证器测试难以生成高质量测试输入并构造测试预言,现有方法难以发现其深层缺陷。
方法
将 SMT 公式转换为程序,使公式可满足性对应程序安全性质,从而用可满足性作为预言;实现 SMT2Test 及中间表示,支持转换为 Dafny 和 C 程序。
评估
使用 SMT 竞赛与 SMT 求解器 fuzzer 产生的公式测试 Dafny verifier 和 CPAchecker,发现 14 个此前未知缺陷,均已确认,6 个已修复。
原文摘要(Abstract)

One of the primary challenges in software testing is generating high-quality test inputs and obtaining corresponding test oracles. This paper introduces a novel methodology to mitigate this challenge in testing program verifiers by employing SMT (Satisfiability Modulo Theories) formulas as a universal test case generator. The key idea is to transform SMT formulas into programs and link the satisfiability of the formulas with the safety property of the programs, allowing the satisfiability of the formulas to act as a test oracle for program verifiers. This method was implemented as a framework named SMT2Test , which enables the transformation of SMT formulas into Dafny and C programs. An intermediate representation was designed to augment the flexibility of this framework, streamlining the transformation for other programming languages and fostering modular transformation strategies. We evaluated the effectiveness of SMT2Test by finding defects in two program verifiers: the Dafny verifier and CPAchecker. Utilizing the SMT2Test framework with the SMT formulas from the SMT competition and SMT solver fuzzers, we discovered and reported a total of 14 previously unknown defects in these program verifiers that were not found by previous methods. After reporting, all of them have been confirmed, and 6 defects have been fixed. These findings show the effectiveness of our method and imply its potential application in testing other programming language infrastructures.

链接与引用

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

BibTeX
@article{0001024a,
  title = {SMT2Test: From SMT Formulas to Effective Test Cases},
  author = {Chengyu Zhang and Zhendong Su},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {OOPSLA2},
  year = {2024},
  doi = {10.1145/3689719}
}