paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Trustworthy Runtime Verification via Bisimulation (Experience Report)

通过互模拟实现可信的运行时验证(经验报告)
ICFP 7(ICFP)2023匹配度 3/10 · 论文属于程序验证与编译器正确性方向,使用互模拟和 SMT 做运行时验证代码的正确性证明,与形式化验证有间接关联;但它不涉及 LLM/Agent、静态分析在 ML/Agentic 程序中的应用,也不涉及浮点或贝叶斯程序分析,因此与用户当前核心研究方向匹配度较低。引用 6 inbox
Ryan G. Scott, Mike Dodds, Ivan Perez, Alwyn E. Goodloe, Robert Dockins
crossref: 2026-09-10

AI 速览

一句话:CopilotVerifier 为 Copilot 编译器输出的 C 监视器生成与源语义互模拟的正确性证明。

在安全攸关系统中使用运行时验证时,监视器代码本身的正确性至关重要。Copilot 框架通过从 Haskell 嵌入式 DSL 自动生成 C 监视器程序来实现这一目标,但人工审计者很难确信编译后的监视器不会崩溃,且其行为符合 Copilot 语义。本文提出 CopilotVerifier,它与 Copilot 编译器并行运行,为编译输出生成正确性证明。该证明表明:给定 Copilot 监视器与其编译形式在等价输入上产生等价输出,并且二者要么在相同情形下崩溃,要么都不会崩溃。证明以互模拟的形式给出,并被分解为一组验证条件;实现借助两项 SMT 支持的技术——面向 LLVM 的 Crucible 符号执行库与 What4 求解器接口库。结果表明,在现有工具之上构建即可用适中代价显著提升编译器保证,为实现能被人工审计者信服的形式化保证论证这一最终目标铺平了道路。

问题
安全攸关领域的运行时验证要求人工审计者确信 Copilot 自动生成的 C 监视器代码既不会意外崩溃,又符合 Copilot 的源级语义,而这种确信难以建立。
方法
CopilotVerifier 与 Copilot 编译器协同工作,为编译产物生成正确性证明:将源监视器与编译后代码的输出等价性与崩溃一致性表述为互模拟,分解为验证条件,并基于 LLVM 符号执行库 Crucible 与求解器接口库 What4 进行 SMT 求解。
评估
以经验报告形式介绍原型工具,展示在现有工具基础上以适中代价即可大幅提升编译器保证;摘要未给出具体基准数据。
原文摘要(Abstract)

When runtime verification is used to monitor safety-critical systems, it is essential that monitoring code behaves correctly. The Copilot runtime verification framework pursues this goal by automatically generating C monitor programs from a high-level DSL embedded in Haskell. In safety-critical domains, every piece of deployed code must be accompanied by an assurance argument that is convincing to human auditors. However, it is difficult for auditors to determine with confidence that a compiled monitor cannot crash and implements the behavior required by the Copilot semantics. In this paper we describe CopilotVerifier, which runs alongside the Copilot compiler, generating a proof of correctness for the compiled output. The proof establishes that a given Copilot monitor and its compiled form produce equivalent outputs on equivalent inputs, and that they either crash in identical circumstances or cannot crash. The proof takes the form of a bisimulation broken down into a set of verification conditions. We leverage two pieces of SMT-backed technology: the Crucible symbolic execution library for LLVM and the What4 solver interface library. Our results demonstrate that dramatically increased compiler assurance can be achieved at moderate cost by building on existing tools. This paves the way to our ultimate goal of generating formal assurance arguments that are convincing to human auditors.

链接与引用

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

BibTeX
@article{paperbot1921,
  title = {Trustworthy Runtime Verification via Bisimulation (Experience Report)},
  author = {Ryan G. Scott and Mike Dodds and Ivan Perez and Alwyn E. Goodloe and Robert Dockins},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {ICFP},
  year = {2023},
  doi = {10.1145/3607841}
}