paperbot · PL 论文追踪

全部论文 待读 收藏

P2 RefinedRust: A Type System for High-Assurance Verification of Rust Programs

RefinedRust:面向 Rust 程序高保障验证的类型系统
PLDI 8(PLDI)2024匹配度 3/10 · 该论文属于形式化验证与精化类型系统,与用户关注的 AI→PL(用 LLM/Agent 改进静态分析/形式化验证)方向仅间接相关;但论文本身不涉及 LLM/Agent、ML/Agentic 程序静态分析、浮点程序分析或贝叶斯程序分析,因此匹配度有限。引用 55 inbox
Lennard Gäher, Michael Sammler, Ralf Jung, Robbert Krebbers, Derek Dreyer
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出在 Coq 中证明可靠的精化类型系统,支持 safe 与 unsafe Rust 代码的基础性半自动功能正确性验证。

Rust 基于所有权的类型系统静态保证内存安全,适合安全关键系统,但现有自动演绎验证工具既不产生可在证明助手中检查的基础证明,也仅限 safe 代码,而实际程序常在关键 API 中使用 unsafe。RefinedRust 是一个在 Coq 中证明可靠的精化类型系统,目标是对 safe 与 unsafe Rust 代码进行基础性半自动功能正确性验证。其原型工具将带注解的 Rust 代码翻译为 Coq 内嵌的 Rust 模型,再借助 Coq 中的分离逻辑自动化检查其是否满足类型系统;所有证明均由 Coq 检查,故自动化与类型系统本身无需被信任。作者通过验证一个涉及复杂 unsafe 指针操作推理的 Rust Vec 变体实现来评估其有效性。

问题
现有 Rust 演绎验证工具不产生可由通用证明助手检查的基础证明,且仅支持 safe 片段,而真实 Rust 程序在关键 API 中大量使用 unsafe 代码。
方法
提出 RefinedRust 精化类型系统并在 Coq 中证明其可靠性;原型工具将带注解的 Rust 代码翻译为 Coq 内嵌的 Rust 模型,再用 Coq 中的分离逻辑自动化检查其是否满足类型系统。
评估
通过验证一个涉及复杂 unsafe 指针操作推理的 Rust Vec 变体实现,评估 RefinedRust 的有效性;所有生成的证明均由 Coq 检查。
原文摘要(Abstract)

Rust is a modern systems programming language whose ownership-based type system statically guarantees memory safety, making it particularly well-suited to the domain of safety-critical systems. In recent years, a wellspring of automated deductive verification tools have emerged for establishing functional correctness of Rust code. However, none of the previous tools produce foundational proofs (machine-checkable in a generalpurpose proof assistant), and all of them are restricted to the safe fragment of Rust. This is a problem because the vast majority of Rust programs make use of unsafe code at critical points, such as in the implementation of widely-used APIs. We propose RefinedRust , a refinement type system—proven sound in the Coq proof assistant—with the goal of establishing foundational semi-automated functional correctness verification of both safe and unsafe Rust code. We have developed a prototype verification tool implementing RefinedRust. Our tool translates Rust code (with user annotations) into a model of Rust embedded in Coq, and then checks its adherence to the RefinedRust type system using separation logic automation in Coq. All proofs generated by RefinedRust are checked by the Coq proof assistant, so the automation and type system do not have to be trusted. We evaluate the effectiveness of RefinedRust by verifying a variant of Rust’s Vec implementation that involves intricate reasoning about unsafe pointer-manipulating code.

链接与引用

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

BibTeX
@article{GaherSJKD24,
  title = {RefinedRust: A Type System for High-Assurance Verification of Rust Programs},
  author = {Lennard Gäher and Michael Sammler and Ralf Jung and Robbert Krebbers and Derek Dreyer},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {PLDI},
  year = {2024},
  doi = {10.1145/3656422}
}