paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Verifying Invariants of Lock-Free Data Structures with Rely-Guarantee and Refinement Types

用 Rely-Guarantee 与精化类型验证无锁数据结构的不变式
TOPLAS 39(3)2017匹配度 2/10 · 该论文属于形式化验证与精化类型领域,但与用户当前关注的 PL 与 AI/LLM 交叉方向(Agentic 程序静态分析、LLM 辅助验证、浮点/贝叶斯程序分析)几乎没有关联;且未涉及机器学习系统、LLM 或工业落地案例。引用 13 inbox
Colin S. Gordon, Michael D. Ernst, Dan Grossman, Matthew J. Parkinson
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出将 Rely-Guarantee 推理应用于引用,并用精化类型在未验证与完全验证之间验证无锁数据结构不变式。

细粒度并发数据结构的不变式验证困难,因为其他线程的干扰可能发生在任意时刻。本文提出将 Rely-Guarantee 推理应用于并发环境中的引用,从而在不验证整个程序的情况下界定线程干扰,并保持数据结构不变式。该方法位于简单类型系统与现代并发程序逻辑之间,避免封装并发数据结构实现,且能与未验证的命令式代码安全交互。作者用两个实现进行案例研究:一个公理化的 Coq 领域特定语言,以及一个 Liquid Haskell 库;并比较了交互式证明(Coq)与可自动消解的依赖精化类型(Liquid Haskell)两种验证方式。结果表明该方法具有广泛适用性,并提供介于未验证代码与完全验证之间的中间点。

问题
细粒度并发数据结构的不变式难以验证,因为其他线程的干扰可能随时发生,且通常需要验证整个程序或封装实现。
方法
将 Rely-Guarantee 推理应用于并发引用,结合精化类型,在不验证整个程序的前提下限制线程干扰并保持不变式,且支持与未验证的命令式代码交互。
评估
通过 Coq 中的公理化 DSL 和 Liquid Haskell 库实现该方法,并用案例研究比较交互式 Coq 证明与可自动消解的依赖精化类型验证。
原文摘要(Abstract)

Verifying invariants of fine-grained concurrent data structures is challenging, because interference from other threads may occur at any time. We propose a new way of proving invariants of fine-grained concurrent data structures: applying rely-guarantee reasoning to references in the concurrent setting. Rely-guarantee applied to references can verify bounds on thread interference without requiring a whole program to be verified. This article provides three new results. First, it provides a new approach to preserving invariants and restricting usage of concurrent data structures. Our approach targets a space between simple type systems and modern concurrent program logics, offering an intermediate point between unverified code and full verification. Furthermore, it avoids sealing concurrent data structure implementations and can interact safely with unverified imperative code. Second, we demonstrate the approach’s broad applicability through a series of case studies, using two implementations: an axiomatic C oq domain-specific language and a library for Liquid Haskell. Third, these two implementations allow us to compare and contrast verifications by interactive proof (C oq ) and a weaker form that can be expressed using automatically-discharged dependent refinement types (Liquid Haskell).

链接与引用

DOI 原文 · DBLP

BibTeX
@article{GordonEGP17,
  title = {Verifying Invariants of Lock-Free Data Structures with Rely-Guarantee and Refinement Types},
  author = {Colin S. Gordon and Michael D. Ernst and Dan Grossman and Matthew J. Parkinson},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {39},
  number = {3},
  year = {2017},
  doi = {10.1145/3064850}
}