Complete the Cycle: Reachability Types with Expressive Cyclic References
Haotian Deng, Siyuan He, Songlin Jia, Yuyan Bao, Tiark Rompf
摘要
Local reasoning about programs that combine aliasing and mutable state is a longstanding challenge. Existing approaches – ownership systems, linear and affine types, uniqueness types, and lexical effect tracking – impose global restrictions such as uniqueness or linearity, or rely on shallow syntactic analyses. These designs fall short with higher-order functions and shared mutable state. Reachability Types (RT) track aliasing and separation in higher-order programs, ensuring runtime safety and non-interference. However, RT systems face three key limitations: (1) they prohibit cyclic references, ruling out non-terminating computations and fixed-point combinators; (2) they require deep tracking, where a qualifier must include all transitively reachable locations, reducing precision and hindering optimizations like fine-grained parallelism; and (3) referent qualifier invariance prevents referents from escaping their allocation contexts, making reference factories inexpressible. In this work, we address these limitations by extending RT with three mechanisms that enhance expressiveness. First, we introduce cyclic references, enabling recursive patterns to be encoded directly through the store. Second, we adopt shallow qualifier tracking, decoupling references from their transitively reachable values. Finally, we introduce an escaping rule with reference subtyping, allowing referent qualifiers to outlive their allocation context. These extensions are formalized in the F < : ∘ -calculus with a mechanized proof of type soundness, and case studies illustrate expressiveness through fixpoint combinators, non-interfering parallelism, and escaping read-only references.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Graph IRs for Impure Higher-Order Languages: Making Aggressive Optimizations Affordable with Precise Effect Dependencies 引用了 Reachability types: tracking aliasing and separation in higher-order functional programs
- Graph IRs for Impure Higher-Order Languages: Making Aggressive Optimizations Affordable with Precise Effect Dependencies 引用了 Modeling Reachability Types with Logical Relations: Semantic Type Soundness, Termination, Effect Safety, and Equational Theory
- Modeling Reachability Types with Logical Relations: Semantic Type Soundness, Termination, Effect Safety, and Equational Theory 引用了 Graph IRs for Impure Higher-Order Languages: Making Aggressive Optimizations Affordable with Precise Effect Dependencies
- Type, Ability, and Effect Systems: Perspectives on Purity, Semantics, and Expressiveness 引用了 Reachability types: tracking aliasing and separation in higher-order functional programs
- Type, Ability, and Effect Systems: Perspectives on Purity, Semantics, and Expressiveness 引用了 Escape with Your Self: Sound and Expressive Bidirectional Typing with Avoidance for Reachability Types
- Modeling Reachability Types with Logical Relations: Semantic Type Soundness, Termination, Effect Safety, and Equational Theory 引用了 Reachability types: tracking aliasing and separation in higher-order functional programs
- Modeling Reachability Types with Logical Relations: Semantic Type Soundness, Termination, Effect Safety, and Equational Theory 引用了 Escape with Your Self: Sound and Expressive Bidirectional Typing with Avoidance for Reachability Types
- Escape with Your Self: Sound and Expressive Bidirectional Typing with Avoidance for Reachability Types 引用了 Modeling Reachability Types with Logical Relations: Semantic Type Soundness, Termination, Effect Safety, and Equational Theory
- Escape with Your Self: Sound and Expressive Bidirectional Typing with Avoidance for Reachability Types 引用了 Reachability types: tracking aliasing and separation in higher-order functional programs
- Reference Capabilities for Flexible Memory Management 引用了 A flexible type system for fearless concurrency
- When Lifetimes Liberate: A Type System for Arenas with Higher-Order Reachability Tracking 引用了 A flexible type system for fearless concurrency
- When Lifetimes Liberate: A Type System for Arenas with Higher-Order Reachability Tracking 引用了 Graph IRs for Impure Higher-Order Languages: Making Aggressive Optimizations Affordable with Precise Effect Dependencies
- When Lifetimes Liberate: A Type System for Arenas with Higher-Order Reachability Tracking 引用了 Reachability types: tracking aliasing and separation in higher-order functional programs
- When Lifetimes Liberate: A Type System for Arenas with Higher-Order Reachability Tracking 引用了 Modeling Reachability Types with Logical Relations: Semantic Type Soundness, Termination, Effect Safety, and Equational Theory
- When Lifetimes Liberate: A Type System for Arenas with Higher-Order Reachability Tracking 引用了 Escape with Your Self: Sound and Expressive Bidirectional Typing with Avoidance for Reachability Types
- When Lifetimes Liberate: A Type System for Arenas with Higher-Order Reachability Tracking 引用了 Reference Capabilities for Flexible Memory Management
引用它的顶会 Paper4
- 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 次引用
- Escape with Your Self: Sound and Expressive Bidirectional Typing with Avoidance for Reachability TypesSonglin Jia, Guannan Wei, Siyuan He, Yuyan Bao 等PLDI 2026 · 1 次引用
- Type, Ability, and Effect Systems: Perspectives on Purity, Semantics, and ExpressivenessYuyan Bao, Tiark RompfOOPSLA 2026
- When Lifetimes Liberate: A Type System for Arenas with Higher-Order Reachability TrackingSiyuan He, Songlin Jia, Yuyan Bao, Tiark RompfOOPSLA 2026
它引用的 Paper10
- A separation logic for effect handlersPaulo Emílio de Vilhena, François PottierPOPL 2021 · 24 次引用
- 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
- Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic ProgramsGuannan Wei, Oliver Bracevac, Songlin Jia, Yuyan Bao 等POPL 2024 · 12 次引用
- Reachability Types, Traces and Full AbstractionBenedict Bunting, Andrzej S. MurawskiLICS 2025 · 2 次引用
- Qualifying System F<: Some Terms and Conditions May ApplyEdward Lee, Yaoyu Zhao, Ondrej Lhoták, James You 等OOPSLA 2024 · 2 次引用
- Soundly Handling LinearityWenhao Tang, Daniel Hillerström, Sam Lindley, J. Garrett MorrisPOPL 2024 · 8 次引用
- A High-Level Separation Logic for Heap Space under Garbage CollectionAlexandre Moine, Arthur Charguéraud, François PottierPOPL 2023
