Lune

PLDI2023Top-tier venue

Garbage-Collection Safety for Region-Based Type-Polymorphic Programs

Martin Elsman

Abstract

Region inference offers a mechanism to reduce (and sometimes entirely remove) the need for reference-tracing garbage collection by inferring where to insert allocation and deallocation instructions in a program at compile time. When the mechanism is combined with techniques for reference-tracing garbage collection, which is helpful in general to support programs with very dynamic memory behaviours, it turns out that region-inference is complementary to adding generations to a reference-tracing collector. However, region-inference and the associated region-representation analyses that make such a memory management strategy perform well in practice are complex, both from a theoretical point-of-view and from an implementation point-of-view. In this paper, we demonstrate a soundness problem with existing theoretical developments, which have to do with ensuring that, even for higher-order polymorphic programs, no dangling-pointers appear during a reference-tracing collection. This problem has materialised as a practical soundness problem in a real implementation based on region inference. As a solution, we present a modified, yet simple, region type-system that captures garbage-collection effects, even for polymorphic higher-order code, and outline how region inference and region-representation analyses are adapted to the new type system. The new type system allows for associating simpler region type-schemes with functions, compared to original work, makes it possible to combine region-based memory management with partly tag-free reference-tracing (and generational) garbage-collection, and repairs previously derived work that is based on the erroneous published results.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Explicit Effects and Effect Constraints in ReML cites Parallelism in a Region Inference Context
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Explicit Effects and Effect Constraints in ReMLMartin ElsmanPOPL 2024 · 4 citations
  2. Parallelism in a Region Inference ContextMartin Elsman, Troels HenriksenPLDI 2023 · 2 citations

Related papers

  1. When Lifetimes Liberate: A Type System for Arenas with Higher-Order Reachability TrackingSiyuan He, Songlin Jia, Yuyan Bao, Tiark RompfOOPSLA 2026
  2. Sound garbage collection for C using pointer provenanceSubarno Banerjee, David Devecsery, Peter M. Chen, Satish NarayanasamyOOPSLA 2020 · 4 citations
  3. Fully-Automatic Type Inference for Borrows with LifetimesWilliam Brandon, Benjamin Driscoll, Frank Dai, Jonathan Ragan-Kelley et al.OOPSLA 2026
  4. A Lightweight Type-and-Effect System for Invalidation Safety: Tracking Permanent and Temporary Invalidation with Constraint-Based Subtype InferenceCunyuan Gao, Lionel ParreauxOOPSLA 2025 · 4 citations
  5. Aliasing Limits on Translating C to Safe RustMehmet Emre, Peter Boyland, Aesha Parekh, Ryan Schroeder et al.OOPSLA 2023 · 32 citations
Dusk over the sea between two cliffs drawn in fine vertical lines