Escape with Your Self: Sound and Expressive Bidirectional Typing with Avoidance for Reachability Types
Songlin Jia, Guannan Wei, Siyuan He, Yuyan Bao, Tiark Rompf
摘要
Reasoning about programs in the presence of mutation and aliasing is notoriously difficult. Rust has popu-larized lifetime-based ownership tracking in systems programming, but its “shared XOR mutable” model is fundamentally at odds with higher-level functional programming. Reachability types offer an alternative: they enable safe sharing and escape of mutable data by tracking which resources each expression’s result can reach. To track internal reachability within complex object graphs, reachability types adopt self-references that let components refer to enclosing resources from inside, just like this pointers in OO languages. While natural for declaratively typing escaping data, self-references complicate subtyping and furthermore type inference: variance restricts where self-references may appear, yet useful type conversions must allow them to vary in controlled ways, which in turn imposes constraints on inference. As an undesirable result, prior works require programmers to insert term-level coercions for even just avoidance —avoiding ill-scoped names in types. With all prior works being declarative, we investigate algorithmic reachability types in this work. We introduce a refined subtyping relation that permits more flexible usages of self-references. We further develop a sound and decidable bidirectional typing algorithm, implemented and verified in Lean. The algorithm automatically avoids ill-scoped names in types, and infers qualifiers via a lightweight unification mechanism. As a step towards practical reachability programming, we show that the system is capable of tracking diverse reachability patterns without explicit coercions in complex Church-encoded datatypes.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper5
- 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 次
- Typestate via Revocable CapabilitiesSonglin Jia, Craig Liu, Siyuan He, Haotian Deng 等PLDI 2026
- 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
它引用的顶会 Paper11
- MLstruct: principal type inference in a Boolean algebra of structural typesLionel Parreaux, Chun Yin ChauOOPSLA 2022 · 被引用 31 次
- Reachability types: tracking aliasing and separation in higher-order functional programsYuyan Bao, Guannan Wei, Oliver Bracevac, Yuxuan Jiang 等OOPSLA 2021 · 被引用 19 次
- Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic ProgramsGuannan Wei, Oliver Bracevac, Songlin Jia, Yuyan Bao 等POPL 2024 · 被引用 12 次
- Greedy Implicit Bounded QuantificationChen Cui, Shengyi Jiang, Bruno C. d. S. OliveiraOOPSLA 2023 · 被引用 9 次
- Recursive Subtyping for AllLitao Zhou, Yaoda Zhou, Bruno C. d. S. OliveiraPOPL 2023 · 被引用 8 次
相关 Paper
- Flux: Liquid Types for RustNico Lehmann, Adam T. Geller, Niki Vazou, Ranjit JhalaPLDI 2023 · 被引用 29 次
- Thrust: A Prophecy-Based Refinement Type System for RustHiromi Ogawa, Taro Sekiyama, Hiroshi UnnoPLDI 2025
- Reachability Types, Traces and Full AbstractionBenedict Bunting, Andrzej S. MurawskiLICS 2025 · 被引用 2 次
- From Linearity to BorrowingAndrew Wagner, Olek Gierczak, Brianna Marshall, John M. Li 等OOPSLA 2025 · 被引用 1 次
- Solving constrained Horn clauses modulo algebraic data types and recursive functionsHari Govind V. K., Sharon Shoham, Arie GurfinkelPOPL 2022 · 被引用 26 次
