Skip to main content
QUICK REVIEW

[论文解读] Misquoted No More: Securely Extracting F* Programs with IO

Cezar-Constantin Andrici, Abigail Pribisova|arXiv (Cornell University)|Feb 23, 2026
Security and Verification in ComputingComputer Science被引用 0
一句话总结

本文提出 SEIO⋆,一个形式化验证的提取框架,将 IO 启用的 F⋆ 程序安全地提取到深嵌入中,同时在任意未验证上下文下提供鲁棒的安全保障(RrHP),并通过关系化引述来最小化翻译验证。

ABSTRACT

Shallow embeddings that use monads to represent effects are popular in proof-oriented languages because they are convenient for formal verification. Once shallowly embedded programs are verified, they are often extracted to mainstream languages like OCaml or C and linked into larger codebases. The extraction process is not fully verified because it often involves quotation -- turning the shallowly embedded program into a deeply embedded one -- and verifying quotation remains a major open challenge. Instead, some prior work obtains formal correctness guarantees using translation validation to certify individual extraction results. We build on this idea, but limit the use of translation validation to a first extraction step that we call relational quotation and that uses a metaprogram to construct a typing derivation for the given shallowly embedded program. This metaprogram is simple, since the typing derivation follows the structure of the original program. Once we validate, syntactically, that the typing derivation is valid for the original program, we pass it to a verified syntax-generation function that produces code guaranteed to be semantically related to the original program. We apply this general idea to build SEIO*, a framework for extracting shallowly embedded F* programs with IO to a deeply embedded lambda-calculus while providing formal secure compilation guarantees. Using two cross-language logical relations, we devise a machine-checked proof in F* that SEIO* guarantees Robust Relational Hyperproperty Preservation (RrHP), a very strong secure compilation criterion that implies full abstraction as well as preservation of trace properties and hyperproperties against arbitrary adversarial contexts. This goes beyond the state of the art in verified and certifying extraction, which so far has focused on correctness rather than security.

研究动机与目标

  • 为提取的 F⋆ IO 程序提供形式化的安全保障,即使与未验证代码连接时也成立。
  • 在提取过程中通过使用关系化引述来最小化对翻译验证的依赖。
  • 开发一个从 IO⋆ 到具有 IO 原语的深嵌入 λio 的经过验证的提取路径。
  • 证明 SEIO⋆ 满足鲁棒关系超性质保持(RrHP),意味着完全抽象性与跟踪/超性质的保持。
  • 通过 F⋆ 的机器可检证明产物展示实际可实现性。

提出的方法

  • 引入关系化引述,以在 F⋆ 中为一个浅层嵌入的 IO⋆ 程序生成类型派生。
  • 定义带有轨迹产生语义和两种跨语言逻辑关系的 IO⋆ 与 λio。
  • 提供一个纯粹的 F⋆ 函数,在给定类型派生后构造相应的 λio 程序。
  • 使用元编程(Meta-F⋆)来生成并验证来自浅层 IO⋆ 程序的类型派生。
  • 通过在 F⋆ 中的机器可检证明,证明 SEIO⋆ 满足鲁棒关系超性质保持(RrHP)。

实验结果

研究问题

  • RQ1如何在确保对任意上下文的安全性属性的前提下,将 IO⋆ 程序提取到深嵌入 λio?
  • RQ2关系化引述是否能降低 Certified Extraction 框架对翻译验证的依赖?
  • RQ3可以为提取的 IO 代码实现哪些形式化保证(如 RrHP),以及它们与完全抽象性之间的关系?
  • RQ4如何用基于 F⋆ 的机器可检证明产物来认证提取过程及其安全属性?

主要发现

  • SEIO⋆ 能将 IO⋆ 程序提取到 λio,具备形式化的安全编译保证。
  • 关系化引述生成一个类型派生,将浅层 IO⋆ 程序与其深嵌嵌连起来,而无需完整的翻译验证。
  • 两个跨语言逻辑关系将 IO⋆ 与 λio 联系起来,并支持对安全属性的机器可检证明。
  • 该框架实现了鲁棒关系超性质保持(RrHP),意味着对对抗性上下文的完全抽象性以及跟踪属性和超性质的保持。
  • 一个在 F⋆ 中的产物提供了对 SEIO⋆ 的 RrHP 的机器可检证明,包含广泛的定义和证明。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。