When Lifetimes Liberate: A Type System for Arenas with Higher-Order Reachability Tracking
Siyuan He, Songlin Jia, Yuyan Bao, Tiark Rompf
摘要
Statically enforcing safe resource management is challenging due to tensions between flexible lifetime dis-ciplines and expressive sharing patterns. Region-based systems offer lexically scoped regions under a stack discipline, wherein resources are managed in bulk. In many such systems, however, resources are second-class and can neither escape their scope nor be freely returned from functions. Ownership and linear type systems, such as Rust, offer first-class, non-lexical lifetimes with robust static guarantees, but rely on invariants that limit higher-order patterns and expressive sharing. In this work, we propose a type system that uniformly treats all heap-allocated resources under diverse lifetime, granularity, and sharing settings. Our system provides programmers with three allocation modes: (1) fresh allocation for first-class, non-lexical resources; (2) fresh allocation for second-class resources with lexically bounded lifetimes; and (3) coallocation that groups resources by shadow arenas for bulk tracking and deallocation. Regardless of mode, resources are represented uniformly at the type level, supporting generic abstraction and preserving the higher-order parametric nature of the language. Obtaining static safety in higher-order languages with flexible sharing is nontrivial. To address this, our solution builds on reachability types, and our extension adds the capability to track both individual and grouped resources, enables the expression of cyclic store structures, and allows the selective enforcing of stack lifetime discipline. These mechanisms are formalized in the A < : ∗ and A < : ∗ type systems, which are proven type safe and memory safe in Rocq.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper1
问问它们各自怎么用它它引用的顶会 Paper11
- A Grounded Conceptual Model for Ownership Types in RustWill Crichton, Gavin Gray, Shriram KrishnamurthiOOPSLA 2023 · 被引用 25 次
- Reachability types: tracking aliasing and separation in higher-order functional programsYuyan Bao, Guannan Wei, Oliver Bracevac, Yuxuan Jiang 等OOPSLA 2021 · 被引用 19 次
- Reference Capabilities for Flexible Memory ManagementEllen Arvidsson, Elias Castegren, Sylvan Clebsch, Sophia Drossopoulou 等OOPSLA 2023 · 被引用 17 次
- A flexible type system for fearless concurrencyMae Milano, Joshua Turcotti, Andrew C. MyersPLDI 2022 · 被引用 14 次
- Graph IRs for Impure Higher-Order Languages: Making Aggressive Optimizations Affordable with Precise Effect DependenciesOliver Bracevac, Guannan Wei, Songlin Jia, Supun Abeysinghe 等OOPSLA 2023 · 被引用 14 次
相关 Paper
- Escape with Your Self: Sound and Expressive Bidirectional Typing with Avoidance for Reachability TypesSonglin Jia, Guannan Wei, Siyuan He, Yuyan Bao 等PLDI 2026 · 被引用 1 次
- Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic ProgramsGuannan Wei, Oliver Bracevac, Songlin Jia, Yuyan Bao 等POPL 2024 · 被引用 12 次
- Complete the Cycle: Reachability Types with Expressive Cyclic ReferencesHaotian Deng, Siyuan He, Songlin Jia, Yuyan Bao 等OOPSLA 2025 · 被引用 3 次
- Modeling Reachability Types with Logical Relations: Semantic Type Soundness, Termination, Effect Safety, and Equational TheoryYuyan Bao, Songlin Jia, Guannan Wei, Oliver Bracevac 等OOPSLA 2025 · 被引用 3 次
- Automatic Linear Resource Bound Analysis for Rust via Prophecy PotentialsQihao Lian, Di WangOOPSLA 2025 · 被引用 1 次
