paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Will It Fit? Verifying Heap Space Bounds of Concurrent Programs under Garbage Collection

装得下吗?验证垃圾回收下并发程序的堆空间上界
TOPLAS 47(1)2025匹配度 2/10 · 该论文属于程序验证与分离逻辑,关注并发程序在追踪式 GC 下的堆空间上界,与用户核心方向(PL→AI、AI→PL、浮点程序分析、贝叶斯程序分析及其与 LLM 的交叉)没有直接关联。虽在形式化验证与 PL 理论/工程实现上有一定交集,但不涉及 LLM/Agent、静态分析工具改进或用户列出的具体交叉主题。引用 1 inbox
Alexandre Moine, Arthur Charguéraud, François Pottier
crossref: 2026-09-10

AI 速览

一句话:提出 IrisFit 分离逻辑,用空间信用在 Coq 中验证带追踪 GC 的并发程序最坏情况堆空间上界及安全/活性。

论文研究带追踪垃圾回收的并发 call-by-value 语言中,如何验证最坏情况堆空间上界。作者指出,GC 与程序步骤任意交错时,休眠线程持有的根对象可能阻止大量内存回收。为此引入可阻塞分配、轮询点与保护区:轮询点由编译器自动插入,保护区由程序员标注且禁止插入轮询点。核心贡献是 IrisFit——带空间信用(space credits)的分离逻辑,其规则可利用保护区推导堆空间界。IrisFit 在 Coq 中基于 Iris 机械化,并证明安全性(不崩溃且不超限)与活性(轮询点充分时分配在有限时间内满足)。案例研究包括依赖保护区的 Treiber 栈。

问题
带追踪垃圾回收的并发程序中,GC 与程序步骤任意交错会使休眠线程持有的根对象阻碍内存回收,导致难以界定最坏情况堆空间。
方法
提出 IrisFit:在 Iris 分离逻辑上带空间信用的程序逻辑,并设计可阻塞分配、编译器插入轮询点、程序员标注保护区等机制;在 Coq 中机械化。
评估
在 Coq 中形式化并证明安全性与活性,并通过若干案例研究验证,包括依赖保护区的 Treiber 栈。
原文摘要(Abstract)

We present IrisFit, a Separation Logic with space credits for reasoning about heap space in a concurrent call-by-value language equipped with tracing garbage collection and shared mutable state. We point out a fundamental difficulty in the analysis of the worst-case heap space complexity of concurrent programs in the presence of tracing garbage collection: If garbage collection phases and program steps can be arbitrarily interleaved, then there exist undesirable scenarios where a root held by a sleeping thread prevents a possibly large amount of memory from being freed. To remedy this problem and eliminate such undesirable scenarios, we propose several language features, namely possibly-blocking memory allocation, polling points, and protected sections. Polling points are meant to be automatically inserted by the compiler; protected sections are delimited by the programmer and represent regions where no polling points must be inserted. The heart of our contribution is IrisFit, a novel program logic that can establish worst-case heap space complexity bounds and whose reasoning rules can take advantage of the presence of protected sections. IrisFit is formalized inside the Coq proof assistant, on top of the Iris Separation Logic framework. We prove that IrisFit offers both a safety guarantee—programs cannot crash and cannot exceed a heap space limit—and a liveness guarantee—provided enough polling points have been inserted, every memory allocation request is satisfied in bounded time. We illustrate the use of IrisFit via several case studies, including a version of Treiber’s stack whose worst-case behavior relies on the presence of protected sections.

链接与引用

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

BibTeX
@article{MoineCP25,
  title = {Will It Fit? Verifying Heap Space Bounds of Concurrent Programs under Garbage Collection},
  author = {Alexandre Moine and Arthur Charguéraud and François Pottier},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {47},
  number = {1},
  year = {2025},
  doi = {10.1145/3716312}
}