Skip to main content
QUICK REVIEW

[论文解读] Foundational VeriFast: Pragmatic Certification of Verification Tool Results through Hinted Mirroring

Bart Jacobs|arXiv (Cornell University)|Jan 20, 2026
Formal Methods in Verification被引用 0
一句话总结

本文提出 Foundational VeriFast,为 Rust 的 VeriFast 结果通过 Hinted Mirroring 进行认证奠定基础,通过 Rocq 证明脚本来证明正确性,并讨论所提认证方法的健全性。

ABSTRACT

VeriFast is a leading tool for the modular formal verification of correctness properties of single-threaded and multi-threaded C and Rust programs. It verifies a program by symbolically executing each function in isolation, exploiting user-annotated preconditions, postconditions, and loop invariants written in a form of separation logic, and using a separation logic-based symbolic representation of memory. However, the tool itself, written in roughly 30K lines of OCaml code, has not been formally verified. Therefore, bugs in the tool could cause it to falsely report the correctness of the input program. We here report on an early result extending VeriFast to emit, upon successful verification of a Rust program, a Rocq proof script that proves correctness of the program with respect to a Rocq-encoded axiomatic semantics of Rust. This significantly enhances VeriFast's applicability in safety-critical domains. We apply hinted mirroring: we record key information from VeriFast's symbolic execution run, and use it to direct a replay of the run in Rocq.

研究动机与目标

  • 需要基础性验证以防止工具错误导致的 Rust 程序误报的动机。
  • 将 Hinted Mirroring 作为务实的方法来认证 VeriFast 的验证结果。
  • 演示生成 Rocq 证明脚本以证明 VeriFast 结果相对于 Rocq 编码的 Rust 语义的正确性。
  • 讨论所提出的认证方法的健全性与局限性。
  • 概述面向更广 Rust 功能支持和更充分基础性验证的未来工作。

提出的方法

  • 描述 VeriFast 针对 Rust 的符号执行与分离逻辑及其内存表示为堆块。
  • 引入一个工作流,在成功验证后,VeriFast 发出一个包含主体(bodies)、前置条件(preds)、规格(specs)和符号化执行树(symex_trees)的 Rocq 证明脚本。
  • 定义 symex_trees 如何编码 ConsumeChunk 提示,以引导 Rocq 基于符号执行的回放与 VeriFast 的步骤相匹配。
  • 给出一个健全性框架,在 Rocq 的 VF MIR 公理化 AxSem 下证明 bodies_are_correct 的正确性。
  • 比较 VeriFast 自动步骤的行为并解释通过 Hint 的自动步骤与匹配的明确镜像。

实验结果

研究问题

  • RQ1是否可以通过 Hinted Mirroring 的 Rocq 基础框架对 VeriFast 在 Rust 上的验证结果进行认证?
  • RQ2SymEx 组件相对 AxSem 及其底层 VeriFast 堆模型的健全性范围是什么?
  • RQ3在将更多 Rust 特性与 VeriFast 能力整合到 Foundational VeriFast 时还存在哪些挑战?
  • RQ4VeriFast 的自动步骤与 SMT 推理如何转化为 Rocq 提示与可验证的证明脚本?
  • RQ5依赖公理化语义进行基础认证的局限性与潜在风险是什么?

主要发现

  • 本文展示了一个概念验证:一个经 VeriFast 验证的 Rust 程序可以发出一个 Rocq 证明脚本,在 Rocq 编码的 Rust 语义下证明正确性。
  • Foundational VeriFast 使用 Hinted Mirroring,通过 symex_trees 与 ConsumeChunk 提示来引导基于 Rocq 的 VeriFast 符号执行回放。
  • 健全性证明将基于 Rocq 的 SymEx 与 VF MIR 的公理语义 AxSem 联系起来,在给定假设下验证认证方法的正确性。
  • 该方法突出了 VeriFast 自动化步骤与 Rocq 的提示驱动验证之间的差异,提供了一个显式的翻译层。
  • 工作还讨论了需要支持更多 Rust 特性和 VeriFast 能力以及对 AxSem 本身进行验证的局限性。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。