paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A Safe Low-Level Language for Computer Algebra and Its Formally Verified Compiler

一种用于计算机代数的安全低级语言及其形式验证编译器
ICFP 8(ICFP)2024匹配度 3/10 · 论文属于编程语言与形式化验证方向,涉及 Coq 证明和 CompCert 编译器,与用户对形式化验证的兴趣有边缘重合;但它不涉及 LLM/Agent、静态分析、浮点程序分析或贝叶斯程序分析,目标场景是计算机代数底层库,因此与核心研究方向匹配度较低。引用 2 inbox
Guillaume Melquiond, Josué Moreau
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出一种介于 C 与 Rust 之间、面向计算机代数底层库的安全低级语言,并用 Coq 证明其安全性及基于 CompCert 的编译器语义保持。

计算机代数系统依赖 GMP、BLAS/LAPACK 等底层库,这些库通常用 C、Fortran 和汇编编写,大量使用数组与指针,安全和演绎验证困难。本文提出一种介于 C 与 Rust 之间的低级语言,专为计算机代数底层库设计,既保持低层效率又便于程序验证。作者基于 CompCert 实现了该语言编译器,并在 Coq 中形式化证明了语言安全性和编译器语义保持性。该语言尚未覆盖所有特性,但展示了设计领域特定语言及其形式验证编译器所需的关键步骤。

问题
计算机代数底层库(如 GMP、BLAS/LAPACK)通常用 C、Fortran 或汇编编写,大量使用数组与指针,既难以保证内存安全,也不易进行演绎验证。
方法
作者设计了一种介于 C 与 Rust 之间的安全低级语言,并基于 CompCert 构建编译器;语言安全性和编译器的语义保持性均在 Coq 中形式化证明。
评估
评估方式主要是机器化证明:在 Coq 中证明语言安全性与编译器语义保持性,并以计算密集型计算机代数库为设计目标说明其适用性。
原文摘要(Abstract)

This article describes a programming language for writing low-level libraries for computer algebra systems. Such libraries (GMP, BLAS/LAPACK, etc) are usually written in C, Fortran, and Assembly, and make heavy use of arrays and pointers. The proposed language, halfway between C and Rust, is designed to be safe and to ease the deductive verification of programs, while being low-level enough to be suitable for this kind of computationally intensive applications. This article also describes a compiler for this language, based on CompCert. The safety of the language has been formally proved using the Coq proof assistant, and so has the property of semantics preservation for the compiler. While the language is not yet feature-complete, this article shows what it entails to design a new domain-specific programming language along its formally verified compiler.

链接与引用

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

BibTeX
@article{MelquiondM24,
  title = {A Safe Low-Level Language for Computer Algebra and Its Formally Verified Compiler},
  author = {Guillaume Melquiond and Josué Moreau},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {ICFP},
  year = {2024},
  doi = {10.1145/3674629}
}