paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Mechanised Hypersafety Proofs about Structured Data

结构化数据的机械化 Hypersafety 证明
PLDI 8(PLDI)2024匹配度 3/10 · 论文属于程序验证与定理证明方向,关注结构化数据/张量操作的关系分离逻辑与 Coq 机械化,与用户核心关注的静态分析、LLM/Agent 交叉、浮点程序分析和贝叶斯程序分析无直接交集;仅结构化数据/张量验证可能与 ML 系统验证有很弱的间接关联。引用 12 inbox
Vladimir Gladshtein, Qiyuan Zhao, Willow Ahrens, Saman Amarasinghe, Ilya Sergey
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:提出 LGTM:参数化 Hypersafety 关系分离逻辑,并在 Coq 中机械化验证结构化数据操作。

数组等结构化数据常利用重复或稀疏等结构性质获得高效表示,但其操作多由带复杂不变式的循环组成,正确性形式化验证困难。论文观察到结构化数据操作规约可表述为 Hypersafety 性质,即关联 k 个程序轨迹的谓词。作者提出 LGTM,一种 Hoare 风格的关系分离逻辑,支持参数化 Hypersafety 规约,使程序组件数量 k 可依赖程序变量。LGTM 以 Coq 基础嵌入实现,机械化其规则、元理论与可靠性证明,并提供领域专用策略库以自动化推理。作者对 13 个案例(含压缩数组计算与多种稀疏张量高效操作)进行了规约与机器化正确性证明,证明脚本简短且复用度高。

问题
如何形式化验证利用重复、稀疏等结构性质的结构化数据操作;此类操作常含多个循环和复杂不变式,传统方法难以刻画多程序轨迹间的关系。
方法
提出 LGTM,一种 Hoare 风格关系分离逻辑,支持参数化 Hypersafety 规约;将其作为基础嵌入实现于 Coq,机械化规则、元理论与可靠性证明,并提供领域专用策略库自动化推理。
评估
在 Coq 中机器化验证 13 个案例,包括压缩数组计算和多种稀疏张量的高效操作,证明脚本简短且具有高复用度。
原文摘要(Abstract)

Arrays are a fundamental abstraction to represent collections of data. It is often possible to exploit structural properties of the data stored in an array ( e.g ., repetition or sparsity) to develop a specialised representation optimised for space efficiency. Formally reasoning about correctness of manipulations with such structured data is challenging, as they are often composed of multiple loops with non-trivial invariants. In this work, we observe that specifications for structured data manipulations can be phrased as hypersafety properties, i.e ., predicates that relate traces of k programs. To turn this observation into an effective verification methodology, we developed the Logic for Graceful Tensor Manipulation (LGTM), a new Hoare-style relational separation logic for specifying and verifying computations over structured data. The key enabling idea of LGTM is that of parametrised hypersafety specifications that allow the number k of the program components to depend on the program variables . We implemented LGTM as a foundational embedding into Coq, mechanising its rules, meta-theory, and the proof of soundness. Furthermore, we developed a library of domain-specific tactics that automate computer-aided hypersafety reasoning, resulting in pleasantly short proof scripts that enjoy a high degree of reuse. We argue for the effectiveness of relational reasoning about structured data in LGTM by specifying and mechanically proving correctness of 13 case studies including computations on compressed arrays and efficient operations over multiple kinds of sparse tensors.

链接与引用

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

BibTeX
@article{GladshteinZAAS24,
  title = {Mechanised Hypersafety Proofs about Structured Data},
  author = {Vladimir Gladshtein and Qiyuan Zhao and Willow Ahrens and Saman Amarasinghe and Ilya Sergey},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {PLDI},
  year = {2024},
  doi = {10.1145/3656403}
}