paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Verified low-level programming embedded in F*

嵌入 F* 的经过验证的低层编程
ICFP 1(ICFP)2017匹配度 3/10 · 论文属于程序语言设计与形式化验证,提出 Low* 并证明内存安全与 C 抽取正确性,理论工程兼备;但未涉及用户核心关注的静态分析、LLM/Agent 与程序分析/形式化验证的交叉、浮点程序分析或贝叶斯程序分析,因此与当前研究画像只有较弱的领域邻近关系。引用 172 inbox
Jonathan Protzenko, Jean-Karim Zinzindohoué, Aseem Rastogi, Tahina Ramananandro, Peng Wang, Santiago Zanella-Béguelin, Antoine Delignat-Lavaud, Cătălin Hriţcu, Karthikeyan Bhargavan, Cédric Fournet, Nikhil Swamy
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:提出 Low*:将良行为 C 子集浅嵌入 F*,以类型保证内存安全并借助 F* 验证,经抽取编译到 C。

低层安全关键代码常用 C,性能高但缺少内存安全与功能正确性保证;经验证的高级语言又多依赖 GC 和隐式堆分配,难以高效。本文提出 Low*,将小型、顺序、行为良好的 C 子集浅嵌入依赖类型语言 F*。Low* 采用 CompCert 风格结构化内存模型,无 GC 或隐式堆分配,由类型系统保证内存安全;程序员可用 F* 规范,结合 SMT 与手工证明验证功能正确性。抽取时规范与证明被擦除,代码可预测地翻译为 C。作者实现 Low* 到 C 后端并证明翻译保持语义与抗侧信道性;在约 28,000 行密码算法与工具上完成验证,性能与未验证 C 密码库相当。

问题
如何在避免 GC 与隐式堆分配、保持 C 级性能和可预测内存布局的前提下,对低层安全关键代码进行内存安全与功能正确性验证?
方法
将小型顺序 C 子集浅嵌入依赖类型语言 F*,采用 CompCert 式结构化内存模型;用 F* 规范、SMT 与手工证明验证,抽取时擦除规范与证明并生成 C。
评估
实现 Low* 到 C 后端并证明翻译保持语义与抗侧信道性;在约 28,000 行密码算法、构造与工具上完成验证,性能与未验证 C 密码库相当。
原文摘要(Abstract)

We present Low*, a language for low-level programming and verification, and its application to high-assurance optimized cryptographic libraries. Low* is a shallow embedding of a small, sequential, well-behaved subset of C in F*, a dependently- typed variant of ML aimed at program verification. Departing from ML, Low* does not involve any garbage collection or implicit heap allocation; instead, it has a structured memory model à la CompCert, and it provides the control required for writing efficient low-level security-critical code. By virtue of typing, any Low* program is memory safe. In addition, the programmer can make full use of the verification power of F* to write high-level specifications and verify the functional correctness of Low* code using a combination of SMT automation and sophisticated manual proofs. At extraction time, specifications and proofs are erased, and the remaining code enjoys a predictable translation to C. We prove that this translation preserves semantics and side-channel resistance. We provide a new compiler back-end from Low* to C and, to evaluate our approach, we implement and verify various cryptographic algorithms, constructions, and tools for a total of about 28,000 lines of code. We show that our Low* code delivers performance competitive with existing (unverified) C cryptographic libraries, suggesting our approach may be applicable to larger-scale low-level software.

链接与引用

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

BibTeX
@article{ProtzenkoZRRWBD17,
  title = {Verified low-level programming embedded in F*},
  author = {Jonathan Protzenko and Jean-Karim Zinzindohoué and Aseem Rastogi and Tahina Ramananandro and Peng Wang and Santiago Zanella-Béguelin and Antoine Delignat-Lavaud and Cătălin Hriţcu and Karthikeyan Bhargavan and Cédric Fournet and Nikhil Swamy},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {1},
  number = {ICFP},
  year = {2017},
  doi = {10.1145/3110261}
}