Perceus: garbage free reference counting with reuse
摘要
We introduce Perceus, an algorithm for precise reference counting with reuse and specialization. Starting from a functional core language with explicit control-flow, Perceus emits precise reference counting instructions such that (cycle-free) programs are garbage free, where only live references are retained. This enables further optimizations, like reuse analysis that allows for guaranteed in-place updates at runtime. This in turn enables a novel programming paradigm that we call functional but in-place (FBIP). Much like tail-call optimization enables writing loops with regular function calls, reuse analysis enables writing in-place mutating algorithms in a purely functional way. We give a novel formalization of reference counting in a linear resource calculus, and prove that Perceus is sound and garbage free. We show evidence that Perceus, as implemented in Koka, has good performance and is competitive with other state-of-the-art memory collectors.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 12 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- The Functional Essence of Imperative Binary Search Trees 引用了 Relational compilation for performance-critical applications: extensible proof-producing translation of functional models into low-level code
- The Functional Essence of Imperative Binary Search Trees 引用了 Tail Recursion Modulo Context: An Equational Approach
引用它的顶会 Paper12
- Relational compilation for performance-critical applications: extensible proof-producing translation of functional models into low-level codeClément Pit-Claudel, Jade Philipoom, Dustin Jamner, Andres Erbsen 等PLDI 2022 · 26 次引用
- First-class names for effect handlersNingning Xie, Youyou Cong, Kazuki Ikemori, Daan LeijenOOPSLA 2022 · 11 次引用
- Coop: Memory is not a CommodityJianhao Zhang, Shihan Ma, Peihong Liu, Jinhui YuanNeurIPS 2023 · 11 次引用
- Tail Recursion Modulo Context: An Equational ApproachDaan Leijen, Anton LorenzenPOPL 2023 · 9 次引用
- The Functional Essence of Imperative Binary Search TreesAnton Lorenzen, Daan Leijen, Wouter Swierstra, Sam LindleyPLDI 2024 · 6 次引用
相关 Paper
- Fully-Automatic Type Inference for Borrows with LifetimesWilliam Brandon, Benjamin Driscoll, Frank Dai, Jonathan Ragan-Kelley 等OOPSLA 2026
- Concurrent Immediate Reference CountingJaehwang Jung, Jeonghyeon Kim, Matthew J. Parkinson, Jeehoon KangPLDI 2024 · 6 次引用
- CRGC: Fault-Recovering Actor Garbage Collection in PekkoDan Plyukhin, Gul Agha, Fabrizio MontesiPLDI 2025 · 1 次引用
- Taking Out the Toxic Trash: Recovering Precision in Mixed Flow-Sensitive Static AnalysesFabian Stemmler, Michael Schwarz, Julian Erhard, Sarah Tilscher 等PLDI 2025 · 3 次引用
- Revisiting Partial Tracing for Safe, Efficient, and Concurrent Garbage Collection in Unmanaged LanguagesJeonghyeon Kim, Jongse Park, Youngjin Kwon, Jeehoon KangPLDI 2026
