paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Pointer life cycle types for lock-free data structures with memory reclamation

带内存回收的无锁数据结构的指针生命周期类型
POPL 4(POPL)2019匹配度 2/10 · 论文属于类型系统与程序验证,面向无锁数据结构的 SMR 内存安全管理,不涉及 LLM/Agent、机器学习系统、浮点程序分析或贝叶斯程序分析,因此与用户画像中的核心交叉方向不匹配。虽然包含形式化与自动化验证实现,但应用领域距离当前研究主线较远。引用 7 inbox
Roland Meyer, Sebastian Wolff
crossref: 2026-09-10

AI 速览

一句话:提出指针生命周期类型系统,检查无锁数据结构对 SMR 内存的安全管理,并自动推断类型与不变量以验证线性一致。

该论文关注使用安全内存回收(SMR)算法手动管理内存的无锁数据结构验证。其核心是提出一种指针生命周期类型系统,检查程序是否正确管理受 SMR 保护的指针;若类型检查通过,便可忽略 SMR 并在垃圾回收语义下验证程序。类型系统不追踪形状信息而保持轻量,依赖不变量注解和具有天使语义的 ghost 变量 angels 来断言保护;SMR 算法作为类型系统参数。作者给出二次时间类型推断算法,并通过保持天使语义的源到源翻译,将不变量检查交给现成验证工具自动完成。实验对文献中多种链表和集合实现,分别使用 hazard pointer 与 epoch-based reclamation 进行线性化验证,许多例子首次自动验证,较已有工具提速最多两个数量级。

问题
如何验证手动依赖安全内存回收(SMR)的无锁数据结构,尤其是正确处理指针生命周期并证明线性化,而无需在验证中显式建模 SMR。
方法
提出参数化于 SMR 规范的指针生命周期类型系统,用 angels/ghost 变量表达保护不变量;给出二次时间类型推断,并通过源到源翻译将不变量检查编译到现成验证工具。
评估
对文献中的多种链表和集合实现,分别使用 hazard pointers 与 epoch-based reclamation,自动验证线性化;部分例子首次自动验证,较竞争者最高提速两个数量级。
原文摘要(Abstract)

We consider the verification of lock-free data structures that manually manage their memory with the help of a safe memory reclamation (SMR) algorithm. Our first contribution is a type system that checks whether a program properly manages its memory. If the type check succeeds, it is safe to ignore the SMR algorithm and consider the program under garbage collection. Intuitively, our types track the protection of pointers as guaranteed by the SMR algorithm. There are two design decisions. The type system does not track any shape information, which makes it extremely lightweight. Instead, we rely on invariant annotations that postulate a protection by the SMR. To this end, we introduce angels, ghost variables with an angelic semantics. Moreover, the SMR algorithm is not hard-coded but a parameter of the type system definition. To achieve this, we rely on a recent specification language for SMR algorithms. Our second contribution is to automate the type inference and the invariant check. For the type inference, we show a quadratic-time algorithm. For the invariant check, we give a source-to-source translation that links our programs to off-the-shelf verification tools. It compiles away the angelic semantics. This allows us to infer appropriate annotations automatically in a guess-and-check manner. To demonstrate the effectiveness of our type-based verification approach, we check linearizability for various list and set implementations from the literature with both hazard pointers and epoch-based memory reclamation. For many of the examples, this is the first time they are verified automatically. For the ones where there is a competitor, we obtain a speed-up of up to two orders of magnitude.

链接与引用

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

BibTeX
@article{paperbot550,
  title = {Pointer life cycle types for lock-free data structures with memory reclamation},
  author = {Roland Meyer and Sebastian Wolff},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {4},
  number = {POPL},
  year = {2019},
  doi = {10.1145/3371136}
}