跳到正文
返回论文列表
cs.SE提交于 已译

LLM 编写基于属性测试有效性的多领域研究

A Multi-Domain Study on the Effectiveness of LLMs at Writing Property-Based Tests

M M Abid Naziri · Feiran Qin · Khush Patel · Marcelo d'Amorim

中文摘要

基于属性的测试(property-based test, PBT)通过在大量生成输入上检查程序属性来验证程序,但编写一个 PBT 需要属性、有效输入生成器和判定器(oracle)。基于 LLM 的 PBT 编写工具能同时产出这三者,但此前仅在 Python 库上评估。研究 Proptest-AI 与 Agentic-PBT 两个工具在五个领域十个程序上的泛化能力:深度学习库、数据库、系统软件、编译器、LLM 推理引擎。多数程序使用各自语言的文本输入,如查询、配置和程序。在 Opus 5 下,Agentic-PBT 在十个程序中的七个上覆盖分支多于 Proptest-AI;在 GLM-5.3-Flash 下则在全部十个上更多。领域专用模糊测试器在编译器和 PostgreSQL 上覆盖更多,在 PyTorch 上少于 Agentic-PBT。共提交 180 份缺陷报告,其中 44 份与模型知识截止后他人提交的报告重复;维护者确认了其余中的 65 份,覆盖全部五个领域,并修复 23 份。总结出构建与评估此类编写工具的经验:可观测性低会损害其表现;成熟模糊测试器配合 LLM 编写的属性,可检查各功能是否按文档所述行为运行。

关键要点

  1. 01此前 LLM 编写 PBT 仅在 Python 库上评估,缺少跨领域泛化证据。
  2. 02在五个领域十个程序上对比 Proptest-AI 与 Agentic-PBT 的分支覆盖表现。
  3. 03Agentic-PBT 在 Opus 5 下十个程序中七个覆盖更多,GLM-5.3-Flash 下全部十个更多。
  4. 04提交 180 份缺陷报告,维护者确认 65 份、修复 23 份,覆盖全部五个领域。
  5. 05低可观测性会损害此类工具;成熟模糊测试器可配合 LLM 属性验证文档行为。

解读

尚无解读。

原始英文摘要

arXiv:2610.34487v2 Announce Type: replace Abstract: A property-based test (PBT) checks a property of a program on many generated inputs, but writing one takes a property, a generator of valid inputs, and an oracle. LLM-based PBT writers produce all three, yet they have been evaluated only on Python libraries. We study how two of them, Proptest-AI and Agentic-PBT, generalize to ten programs in five domains: deep learning libraries, databases, system software, compilers, and LLM serving engines. Most of these programs take text in their own language, such as queries, configurations, and programs. Agentic-PBT covers more branches than Proptest-AI on seven of the ten programs with Opus 5 and on all ten with GLM-5.3-Flash. Domain-specific fuzzers cover more of the compilers and of PostgreSQL and less of PyTorch than Agentic-PBT. We filed 180 bug reports, 44 of which duplicate reports that others filed after the models' knowledge cutoffs; maintainers have confirmed 65 of the others, in all five domains, and fixed 23. We draw lessons for building and evaluating such writers: low observability hurts them, and mature fuzzers paired with LLM-written properties could check that each feature behaves as documented.

同方向论文 · cs.SE

查看全部 →

反向发现 · 这篇论文相关的工具与提示词

去交叉发现 →

关联工具 · 3

The Decoder79

Anthropic 用 Claude 自动验证现有代码的正确性

Anthropic 与 Theorem 让 Claude 为 123 个开源库生成约 1.8 亿行形式化证明代码,并通过 Rocq 自动检查。Claude 在验证过程中发现数百个缺陷,其中包括一个潜伏十余年的逻辑错误;但证明仅适用于特定处理器架构、单线程程序和低于 64 MB 的输入,单次证明最高消耗数亿 tokens,且正式验证不等于完全无错误。

推荐理由:实验展示了 Claude 自动生成形式化证明并发现隐蔽缺陷的方式,也明确了验证范围与计算成本限制。

Hacker News · 首页77

Anthropic 与 Theorem 用 Claude 大规模验证开源软件

Anthropic 与 Theorem 使用 Claude 对 123 个 OSS-Fuzz 开源库的 239 个入口完成 RISC-V 汇编级形式证明,覆盖少于 64 MB 的输入,并在过程中发现和修复数百个 bug。

推荐理由:文章用大规模 RISC-V 证明实验展示了 LLM 辅助形式化验证的成本、复用方式与适用边界。

GitHub Blog · AI & ML67

GitHub Security Lab 发布 Taskflow Agent:实现 AI 驱动的自动化模糊测试

GitHub Security Lab 发布 Fuzzing Taskflow,这是一个基于 LLM Agent 的 C/C++ 项目自动化模糊测试管道。只需指定一个 GitHub 仓库,Agent 会自动完成入口点识别、构建系统分析、模糊测试用例生成、AFL++ 运行、覆盖率分析、用例优化和漏洞报告编写。

推荐理由:原文详细给出了自动化模糊测试的完整工作流程,包括覆盖率反馈循环、结构感知变异和语料库演进等具体机制,读者可据此迁移到自己的安全测试中。