paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Linear capabilities for fully abstract compilation of separation-logic-verified code

用于分离逻辑验证代码完全抽象编译的线性能力
ICFP 3(ICFP)2019匹配度 2/10 · 论文属于程序验证与编译领域,涉及分离逻辑和完全抽象编译,但不涉及 LLM/Agent、静态分析在机器学习系统或 Agentic 程序中的应用,也不涉及浮点程序分析或贝叶斯程序分析,与用户当前核心交叉方向不匹配。引用 18 inbox
Thomas Van Strydonck, Frank Piessens, Dominique Devriese
crossref: 2026-09-10

AI 速览

一句话:提出以线性能力在运行时表示分离逻辑资源,并构造完全抽象编译器,从而在验证代码与不可信模块边界动态检查契约。

分离逻辑能对命令式程序进行模块化静态验证,但在已验证模块与不可信模块的边界上动态检查其契约很困难,尤其要防止已验证模块的外部调用访问其当前拥有的内存资源。本文提出利用能力(capabilities)进行动态契约检查,并特别采用硬件强制不可复制的线性能力。作者将方法形式化为一个完全抽象编译器:从静态验证的源语言编译到支持线性能力的目标语言。核心思想是,用线性能力在运行时表示空间分离逻辑谓词描述的内存资源;编译器由分离逻辑证明指导,根据源程序证明决定如何把内存访问编译为线性能力访问。完全抽象性保证编译后的已验证模块可与不可信目标模块交互,如同它们也由已验证代码编译而来。

问题
在已验证模块与不可信模块的边界上,动态检查分离逻辑契约很困难,尤其需要防止已验证模块的外部调用访问其拥有的内存资源。
方法
利用硬件强制不可复制的线性能力表示分离逻辑谓词所描述的内存资源,并构造由分离逻辑证明指导的完全抽象编译器,从验证源语言编译到支持线性能力的目标语言。
评估
通过形式化定义编译器并证明其完全抽象性来评估;该性质保证编译后的已验证模块与不可信目标模块的交互如同由已验证代码编译而来。
原文摘要(Abstract)

Separation logic is a powerful program logic for the static modular verification of imperative programs. However, dynamic checking of separation logic contracts on the boundaries between verified and untrusted modules is hard, because it requires one to enforce (among other things) that outcalls from a verified to an untrusted module do not access memory resources currently owned by the verified module. This paper proposes an approach to dynamic contract checking by relying on support for capabilities, a well-studied form of unforgeable memory pointers that enables fine-grained, efficient memory access control. More specifically, we rely on a form of capabilities called linear capabilities for which the hardware enforces that they cannot be copied. We formalize our approach as a fully abstract compiler from a statically verified source language to an unverified target language with support for linear capabilities. The key insight behind our compiler is that memory resources described by spatial separation logic predicates can be represented at run time by linear capabilities. The compiler is separation-logic-proof-directed: it uses the separation logic proof of the source program to determine how memory accesses in the source program should be compiled to linear capability accesses in the target program. The full abstraction property of the compiler essentially guarantees that compiled verified modules can interact with untrusted target language modules as if they were compiled from verified code as well.

链接与引用

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

BibTeX
@article{paperbot588,
  title = {Linear capabilities for fully abstract compilation of separation-logic-verified code},
  author = {Thomas Van Strydonck and Frank Piessens and Dominique Devriese},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {3},
  number = {ICFP},
  year = {2019},
  doi = {10.1145/3341688}
}