paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Realistic Realizability: Specifying ABIs You Can Count On

现实的可实现性:规约可信赖的 ABI
OOPSLA 8(OOPSLA2)2024匹配度 2/10 · 该论文属于形式语义与程序验证,讨论 ABI 的可实现性模型和库演进,但与用户核心关注的 LLM/Agent 与静态分析、形式化验证交叉,以及浮点程序分析、贝叶斯程序分析均无直接关联。仅在 PL/形式化方法上有边缘相关性,且不涉及 AI 或 Agentic 程序。引用 9 inbox
Andrew Wagner, Zachary Eisbach, Amal Ahmed
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出用可实现性模型形式化定义语言的 ABI,将高层抽象类型与底层代码相连,并首次形式化库演进。

ABI 规定了语言在其目标平台上的互操作规则(数据布局、调用约定等),编译器、库与外部函数接口都依赖它,但 ABI 通常以散文形式描述,其表达力与安全性长期停滞,远落后于源语言类型系统的演进。本文提出一种更丰富、更语义化的 ABI 愿景,并给出用可实现性模型(realizability model)形式化规约 ABI 的方法论,从而把高层抽象类型与笨重但行为良好的底层代码联系起来。作者以函数式源语言的 ABI 相对于类 C 目标语言中引用计数实现的规约为案例研究,其关键技术贡献是一个基于图的分离逻辑模型,借助受混合逻辑(hybrid logic)启发的模态刻画引用计数资源的所有权与可访问性。文中还展示不同设计决策如何被解释进语义 ABI,并首次形式化了 Swift ABI 的特色之一——库演进。

问题
ABI 目前多以散文形式规定,缺乏表达力与安全性方面的进展,而编译器、库与 FFI 都依赖它,因此需要一种能形式化规约 ABI 以保证互操作与安全执行的方法。
方法
提出以可实现性模型形式化定义「语义 ABI」的方法论,并设计了一个基于图的分离逻辑模型,用受混合逻辑启发的模态刻画引用计数资源的所有权与可访问性。
评估
通过将函数式源语言的 ABI 对应到类 C 目标语言中引用计数实现的案例研究来验证方法,展示不同设计决策可被解释进语义 ABI,并首次给出库演进的形式化。
原文摘要(Abstract)

The Application Binary Interface (ABI) for a language defines the interoperability rules for its target platforms, including data layout and calling conventions, such that compliance with the rules ensures “safe” execution and perhaps certain resource usage guarantees. These rules are relied upon by compilers, libraries, and foreign- function interfaces. Unfortunately, ABIs are typically specified in prose, and while type systems for source languages have evolved, ABIs have comparatively stalled, lacking advancements in expressivity and safety. We propose a vision for richer, semantic ABIs to improve interoperability and library integration, supported by a methodology for formally specifying ABIs using realizability models. These semantic ABIs connect abstract, high-level types to unwieldy, but well-behaved, low-level code. We illustrate our approach with a case study formalizing the ABI of a functional source language in terms of a reference-counting implementation in a C-like target language. A key contribution supporting this case study is a graph-based model of separation logic that captures the ownership and accessibility of reference-counted resources using modalities inspired by hybrid logic. To highlight the flexibility of our methodology, we show how various design decisions can be interpreted into the semantic ABI. Finally, we provide the first formalization of library evolution, a distinguishing feature of Swift’s ABI.

链接与引用

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

BibTeX
@article{WagnerE024,
  title = {Realistic Realizability: Specifying ABIs You Can Count On},
  author = {Andrew Wagner and Zachary Eisbach and Amal Ahmed},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {OOPSLA2},
  year = {2024},
  doi = {10.1145/3689755}
}