paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Endangered by the Language But Saved by the Compiler: Robust Safety via Semantic Back-Translation

被语言危及,被编译器拯救:通过语义反向翻译实现鲁棒安全
POPL 10(POPL)2026匹配度 2/10 · 论文属于纯程序语言形式化验证与编译安全方向(分离逻辑、语义反向翻译、Rocq 机械化),未涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析,与用户关注的核心 AI+PL 交叉方向无直接关联。引用 0 inbox
Niklas Mück, Aïna Linn Georges, Derek Dreyer, Deepak Garg, Michael Sammler
crossref: 2026-09-10

AI 速览

一句话:借助 Reckon 分离逻辑与语义反向翻译,将类 C 程序编译到 capability 机器,保证鲁棒安全。

程序常由可信与不可信组件链接,可信组件需在任意不可信代码下保持鲁棒安全。已有封装机制多针对高级或低级语言,尚未在 C 这类不安全语言中实现。本文针对代表性类 C 语言 Rec,将其编译到类 CHERI 的 capability 机器 Cap,以加固编译器获得鲁棒安全。为形式化这一优势,作者提出 Reckon:一种验证 Rec 程序鲁棒安全的分离逻辑;它在 Rec 的不安全语义下不可靠,但在程序经编译加固并链接 Cap 上不可信代码后可靠。证明的关键是一种新的语义反向翻译技术,基于 DimSum 多语言语义框架形式化。所有结果均在 Rocq 中机器化。

问题
如何在本身不安全的类 C 语言中实现鲁棒安全,使可信组件与任意不可信代码链接时仍保持安全行为。
方法
将 Rec 程序经加固编译器编译到类 CHERI 的 capability 机器 Cap,提出分离逻辑 Reckon 验证鲁棒安全,并用基于 DimSum 的语义反向翻译证明其可靠性。
评估
形式化与机器化验证:在 Rocq 证明助手中证明 Reckon 的可靠性及语义反向翻译技术,展示编译加固后 Reckon 对 Rec 程序的可靠性。
原文摘要(Abstract)

It is common for programmers to assemble their programs from a combination of trusted and untrusted components. In this context, a trusted program component is said to be robustly safe if it behaves safely when linked against arbitrary untrusted code. Prior work has shown how various encapsulation mechanisms (in both high- and low-level languages) can be used to protect code so that it is robustly safe, but none of the existing work has explored how robust safety can be achieved in a patently unsafe language like C. In this paper, we show how to bring robust safety to a simple yet representative C-like language we call Rec . Although Rec (like C) is inherently “dangerous” and thus not robustly safe, we can “save” Rec programs via compilation to Cap , a CHERI-like capability machine . To formalize the benefits of such a hardening compiler , we develop Reckon, a separation logic for verifying robust safety of Rec programs. Reckon is not sound under Rec ’s unsafe, C-like semantics, but it is sound when Rec programs are hardened via compilation and linked against untrusted code running on Cap . As a crucial step in proving soundness of Reckon, we introduce a novel technique of semantic back-translation , which we formalize by building on the DimSum framework for multi-language semantics. All our results are mechanized in the Rocq prover.

链接与引用

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

BibTeX
@article{MuckGDGS26,
  title = {Endangered by the Language But Saved by the Compiler: Robust Safety via Semantic Back-Translation},
  author = {Niklas Mück and Aïna Linn Georges and Derek Dreyer and Deepak Garg and Michael Sammler},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {POPL},
  year = {2026},
  doi = {10.1145/3776682}
}