paperbot · PL 论文追踪

全部论文 待读 收藏

P2 CN: Verifying Systems C Code with Separation-Logic Refinement Types

CN:用分离逻辑精化类型验证系统 C 代码
POPL 7(POPL)2023匹配度 4/10 · 该论文属于程序验证/类型系统(分离逻辑精化类型)并包含 pKVM 工业落地,与“AI→PL”中的形式化验证方向有领域邻近性;但它不涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析,不属于用户当前主攻的交叉方向。引用 23 inbox
Christopher Pulte, Dhruv C. Makwana, Thomas Sewell, Kayvan Memarian, Peter Sewell, Neel Krishnaswami
crossref: 2026-09-10

AI 速览

一句话:设计并实现 CN——面向系统 C 代码的分离逻辑精化类型系统,并验证 pKVM 组件。

系统软件验证项目与常规开发之间仍存在鸿沟,主要挑战在于处理真实系统代码及其语义的复杂性,以及验证工具的可用性。为此,作者设计并实现 CN:一种面向 C 系统软件的分离逻辑精化类型系统,建立在真实的 ISO C 语义上。CN 将精化类型检查归约为可判定的命题逻辑推理,使用一等资源支持指针别名与指针算术,支持迭代分离合取的资源推断,并通过限制规约中 ghost 变量的语法形式保证其可推断。作者形式化了类型系统关键部分并证明类型检查可靠性,还用 CN 验证了 Google pKVM hypervisor 的一个实质组件,展示了可用性。

问题
验证项目所用方法与常规系统软件开发之间存在鸿沟,尤其是处理真实 C 系统代码的复杂语义以及提升验证可用性。
方法
设计并实现 CN 分离逻辑精化类型系统,基于真实 ISO C 语义,将精化类型检查归约为可判定命题逻辑,并用一等资源与资源推断处理指针和迭代分离合取。
评估
形式化类型系统关键部分并证明类型检查可靠性,并通过验证 Google pKVM hypervisor 的实质组件评估可用性。
原文摘要(Abstract)

Despite significant progress in the verification of hypervisors, operating systems, and compilers, and in verification tooling, there exists a wide gap between the approaches used in verification projects and conventional development of systems software. We see two main challenges in bringing these closer together: verification handling the complexity of code and semantics of conventional systems software, and verification usability. We describe an experiment in verification tool design aimed at addressing some aspects of both: we design and implement CN, a separation-logic refinement type system for C systems software, aimed at predictable proof automation, based on a realistic semantics of ISO C. CN reduces refinement typing to decidable propositional logic reasoning, uses first-class resources to support pointer aliasing and pointer arithmetic, features resource inference for iterated separating conjunction, and uses a novel syntactic restriction of ghost variables in specifications to guarantee their successful inference. We implement CN and formalise key aspects of the type system, including a soundness proof of type checking. To demonstrate the usability of CN we use it to verify a substantial component of Google's pKVM hypervisor for Android.

链接与引用

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

BibTeX
@article{paperbot2075,
  title = {CN: Verifying Systems C Code with Separation-Logic Refinement Types},
  author = {Christopher Pulte and Dhruv C. Makwana and Thomas Sewell and Kayvan Memarian and Peter Sewell and Neel Krishnaswami},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {POPL},
  year = {2023},
  doi = {10.1145/3571194}
}