paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Modular, Fully-abstract Compilation by Approximate Back-translation

通过近似反向翻译实现模块化的完全抽象编译
LMCS vol.Volume 13, Issue 42017匹配度 2/10 · 论文属于编译器完全抽象与 Coq 机械化证明的形式化验证工作,虽与形式化验证/证明工程沾边,但不涉及 LLM/Agent、静态分析、浮点程序分析或贝叶斯程序分析,与用户当前核心方向没有直接关联。引用 31 inbox
Dominique Devriese, Marco Patrignani, Frank Piessens, Steven Keuchel
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:提出只需构造近似反向翻译的通用技术,使源语言无法嵌入目标语言时仍能证明编译器完全抽象。

编译器完全抽象(full abstraction)能保证目标语言攻击者的能力不超过源语言攻击者,具有重要安全价值,但其证明通常很复杂。常见证明技术是把目标层程序上下文反向翻译为行为等价的源层上下文,然而当源语言不足以嵌入目标语言的编码时(例如从 STLC 编译到 ULC,源语言缺少递归类型)该技术失效。本文提出只需构造近似反向翻译即可:该翻译在一定步数内是精确的,超出后则是保守的,即生成的上下文可能在原上下文不发散时发散,但反之不成立。作者基于非对称的跨语言逻辑关系,并创新性地使用 step-indexing 来刻画上下文与其近似反向翻译之间的关系,给出了通用的完全抽象证明技术。该技术在 STLC 到 ULC 的编译器上得到演示,可轻松扩展到模块化编译等常见模式,并且据作者所知是首个在 Coq 中完全机器化的编译器完全抽象证明。

问题
研究在源语言表达能力不足、无法嵌入目标语言编码(如 STLC 缺少递归类型)的情况下,如何证明编译器的完全抽象性。
方法
提出近似反向翻译:在给定步数内精确、超出后保守(可能发散但不反之),并结合非对称跨语言逻辑关系与 step-indexing 刻画上下文与其近似反向翻译的关系。
评估
在 STLC 到 ULC 的编译器上实例化并完成证明,展示其可扩展到模块化编译等模式,且证明已在 Coq 中完全机器化。
原文摘要(Abstract)

A compiler is fully-abstract if the compilation from source language programs to target language programs reflects and preserves behavioural equivalence. Such compilers have important security benefits, as they limit the power of an attacker interacting with the program in the target language to that of an attacker interacting with the program in the source language. Proving compiler full-abstraction is, however, rather complicated. A common proof technique is based on the back-translation of target-level program contexts to behaviourally-equivalent source-level contexts. However, constructing such a back- translation is problematic when the source language is not strong enough to embed an encoding of the target language. For instance, when compiling from STLC to ULC, the lack of recursive types in the former prevents such a back-translation. We propose a general and elegant solution for this problem. The key insight is that it suffices to construct an approximate back-translation. The approximation is only accurate up to a certain number of steps and conservative beyond that, in the sense that the context generated by the back-translation may diverge when the original would not, but not vice versa. Based on this insight, we describe a general technique for proving compiler full-abstraction and demonstrate it on a compiler from STLC to ULC. The proof uses asymmetric cross-language logical relations and makes innovative use of step-indexing to express the relation between a context and its approximate back-translation. The proof extends easily to common compiler patterns such as modular compilation and it, to the best of our knowledge, it is the first compiler full abstraction proof to have been fully mechanised in Coq. We believe this proof technique can scale to challenging settings and enable simpler, more scalable proofs of compiler full-abstraction.

链接与引用

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

BibTeX
@article{DevriesePPK17,
  title = {Modular, Fully-abstract Compilation by Approximate Back-translation},
  author = {Dominique Devriese and Marco Patrignani and Frank Piessens and Steven Keuchel},
  journal = {Logical Methods in Computer Science},
  volume = {Volume 13, Issue 4},
  year = {2017},
  doi = {10.23638/lmcs-13(4:2)2017}
}