paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Fulminate: Testing CN Separation-Logic Specifications in C

Fulminate:在 C 中测试 CN 分离逻辑规约
POPL 9(POPL)2025匹配度 3/10 · 该论文属于形式化验证/分离逻辑的运行时测试工作,与静态分析和程序验证领域有邻接,且兼具理论形式化与工业案例(hypervisor allocator),符合部分研究品味;但它不涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析等用户当前核心交叉方向,因此匹配度有限。引用 4 inbox
Rini Banerjee, Kayvan Memarian, Dhruv Makwana, Christopher Pulte, Neel Krishnaswami, Peter Sewell
crossref: 2026-09-10

AI 速览

一句话:提出 Fulminate,将带 CN 分离逻辑前后条件的 C 代码翻译为运行时检查代码,实现所有权测试。

分离逻辑已成为形式化刻画与推理命令式程序所有权模式的重要工具,既用于纸笔证明,也支撑工业静态分析与多个证明工具。然而,在具体执行中对分离逻辑规约进行程序测试的工作却很少。分离逻辑公式带有对堆分割的隐式量化及其他存在量化,直接求值通常难以在合理时间内完成。本文观察到,CN 证明工具为获得可预测证明自动化而采用的受限分离逻辑片段,同时具有自然且可读的计算解释,因而可在运行时测试中实际使用。作者据此设计并实现了从 C + CN 源码到 C 源码的翻译器 Fulminate,为带有 CN 前后条件的 C 代码插入所有权检查与所有权转移检查,并在非平凡示例上进行了演示,包括某生产级 hypervisor 中的分配器。作者还形式化了其运行时所有权测试方案,在一个小型类 C 语言语义中展示并证明了具体化的 ghost state 如何正确刻画所有权传递。

问题
分离逻辑规约广泛用于静态分析与证明,但缺乏在具体执行中对其进行程序测试的工作;且分离逻辑公式因隐含堆分割量化而难以高效求值。
方法
利用 CN 工具所采用的受限分离逻辑片段具有自然计算解释这一观察,设计 C + CN 源到 C 源的翻译器 Fulminate,为带 CN 前后条件的 C 代码插入所有权检查与所有权转移检查,并在小 C 类语言语义中形式化该运行时所有权测试方案。
评估
在非平凡示例上演示翻译与检查,包括某生产级 hypervisor 的分配器;并形式化证明具体化 ghost state 正确刻画所有权传递。
原文摘要(Abstract)

Separation logic has become an important tool for formally capturing and reasoning about the ownership patterns of imperative programs, originally for paper proof, and now the foundation for industrial static analyses and multiple proof tools. However, there has been very little work on program testing of separationlogic specifications in concrete execution. At first sight, separation-logic formulas are hard to evaluate in reasonable time, with their implicit quantification over heap splittings, and other explicit existentials. In this paper we observe that a restricted fragment of separation logic, adopted in the CN proof tool to enable predictable proof automation, also has a natural and readable computational interpretation, that makes it practically usable in runtime testing. We discuss various design issues and develop this as a C + CN source to C source translation, Fulminate. This adds checks – including ownership checks and ownership transfer – for C code annotated with CN pre- and post-conditions; we demonstrate this on nontrivial examples, including the allocator from a production hypervisor. We formalise our runtime ownership testing scheme, showing (and proving) how its reified ghost state correctly captures ownership passing, in a semantics for a small C-like language.

链接与引用

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

BibTeX
@article{BanerjeeMMPKS25,
  title = {Fulminate: Testing CN Separation-Logic Specifications in C},
  author = {Rini Banerjee and Kayvan Memarian and Dhruv Makwana and Christopher Pulte and Neel Krishnaswami and Peter Sewell},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {POPL},
  year = {2025},
  doi = {10.1145/3704879}
}