paperbot · PL 论文追踪

全部论文 待读 收藏

P2 PropProof: Free Model-Checking Harnesses from PBT

PropProof:从 PBT 免费生成模型检测验证框架
FSE Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2023匹配度 4/10 · 论文属于程序验证/模型检测自动化,将 Rust 属性测试 harness 自动转换为 Kani harness,与用户对形式化验证/静态分析的广义兴趣有一定关联;但它不涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析,未命中用户当前核心的 PL↔AI 交叉问题。引用 2 inbox
Yoshiki Takashima
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:PropProof 自动将 Rust 属性测试框架转换为 Kani 模型检测验证框架,实现低干预的形式化验证。

Rust 开发者常用属性测试(PBT)检查函数正确性,但随机测试只能发现缺陷,无法给出形式化正确性保证。Kani Rust Verifier 虽可基于验证框架进行形式化验证,却要求开发者手写 Kani harness,并需规避内存占用过高、超时等模型检测特有陷阱。本文提出 PropProof,一个自动把 PBT harness 转换为 Kani harness 的库,使已有属性测试可直接用于形式化验证;为此作者设计了若干数据结构模型以优化 Kani 验证框架的性能。该库在 AWS 开发、下载量近 4000 万的 protocol-buffer 库中发现并修复了 2 个问题,并已用于其 CI。基于 42 个来自排名靠前的开源 Rust 库的 PBT harness 的评估表明,PropProof 能让用户以最小人工干预,对现有代码中的复杂用户自定义属性启用 Kani 验证。

问题
PBT 依赖随机测试,仅能发现缺陷而无形式化正确性保证;而手写 Kani 验证框架不仅费时,还需避开高内存与超时等模型检测陷阱。
方法
提出 PropProof 库,自动将 Rust 的 PBT harness 转换为 Kani 验证 harness,并设计专用的数据结构模型来提升验证性能。
评估
在来自顶级开源 Rust 库的 42 个 PBT harness 上评估,并在 AWS 的 protocol-buffer 库中发现并修复 2 个问题、集成到 CI,证明能以最小人工干预验证复杂用户属性。
原文摘要(Abstract)

Property-based testing (PBT) is often used by Rust developers to test functional correctness properties of their code. Since PBT uses randomized testing, its guarantees are limited: it can detect bugs but provides no formal guarantees of correctness. The Kani Rust Verifier uses the CProver verification framework to verify Rust code, given a specification in a Kani verification harness. However, developers must manually write Kani harnesses while avoiding model-checking-specific pitfalls like large memory usage or timeouts. We introduce , a library that automatically converts PBT harnesses into Kani harnesses which can be formally validated using Kani. We discuss the data-structure models we developed in order to optimize performance of these Kani verification harnesses. Using this library, we identified and fixed 2 issues in , an AWS-developed protocol-buffer library with nearly 40 million downloads. is being used in ’s CI. Our evaluation on 42 PBT harnesses from top-ranked open-source Rust libraries demonstrates enabling the use of Kani to verify complex, user-defined properties on existing code with minimal user intervention.

链接与引用

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

BibTeX
@inproceedings{Takashima23,
  title = {PropProof: Free Model-Checking Harnesses from PBT},
  author = {Yoshiki Takashima},
  booktitle = {FSE},
  year = {2023},
  doi = {10.1145/3611643.3613863}
}