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