paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic Programs

多态可达性类型:在高阶泛型程序中跟踪新鲜性、别名与分离
POPL 8(POPL)2024匹配度 1/10 · 论文研究高阶泛型程序的多态可达性类型系统及其 Coq 形式化证明,属于 PL/类型论基础工作;但用户画像的核心是 PL 与 LLM/Agent 交叉、静态分析、浮点程序分析或贝叶斯程序分析,本文未涉及这些方向,也未面向 ML/Agentic 程序提供分析工具或 benchmark。引用 12 inbox
Guannan Wei, Oliver Bračevac, Songlin Jia, Yuyan Bao, Tiark Rompf
crossref: 2026-09-10

AI 速览

一句话:提出多态可达性类型系统,用新鲜性限定符与轻量/有界多态健全跟踪高阶泛型程序中的生命周期、别名与分离。

Rust 的成功促使许多语言在类型系统中加入子结构特征,以跟踪生命周期和共享;但将相关技术迁移到需与函数式及类型级抽象交互的高阶语言并不容易。已有 reachability types 可扩展到高阶单态场景,然而在 λ* 上朴素加入类型多态或精确可达性多态会导致不可靠。本文重新设计可达性跟踪,引入 freshness qualifier 表示求值中可达集可能增长的变量,并只跟踪单步可达变量、必要时再计算传递闭包,从而保留可由替换精化的已知变量可达链。基于此提出 λ◆-演算(精确的轻量、无量词可达性多态)与 F<:◆-演算(对类型和可达性限定符的有界参数多态),在 Coq 中证明类型可靠性与分离保持性,并讨论安全能力编程、效应系统扩展及与 Scala capture types 的比较。

问题
如何在高阶泛型语言中健全、精确且参数化地结合可达性跟踪与类型多态,以支持生命周期、别名和分离推理;已有 λ* 的朴素多态扩展不可靠。
方法
重新设计可达性跟踪,引入 freshness qualifier 并仅跟踪单步可达变量,必要时计算传递闭包;构建 λ◆ 与 F<:◆ 多态可达性类型系统。
评估
在 Coq 中机器化证明类型可靠性和分离保持性,并通过应用示例、效应扩展讨论及与 Scala capture types 比较进行评估。
原文摘要(Abstract)

Fueled by the success of Rust, many programming languages are adding substructural features to their type systems. The promise of tracking properties such as lifetimes and sharing is tremendous, not just for low-level memory management, but also for controlling higher-level resources and capabilities. But so are the difficulties in adapting successful techniques from Rust to higher-level languages, where they need to interact with other advanced features, especially various flavors of functional and type-level abstraction. What would it take to bring full-fidelity reasoning about lifetimes and sharing to mainstream languages? Reachability types are a recent proposal that has shown promise in scaling to higher-order but monomorphic settings, tracking aliasing and separation on top of a substrate inspired by separation logic. However, naive extensions on top of the prior reachability type system λ * with type polymorphism and/or precise reachability polymorphism are unsound, making λ * unsuitable for adoption in real languages. Combining reachability and type polymorphism that is precise, sound, and parametric remains an open challenge. This paper presents a rethinking of the design of reachability tracking and proposes new polymorphic reachability type systems. We introduce a new freshness qualifier to indicate variables whose reachability sets may grow during evaluation steps. The new system tracks variables reachable in a single step and computes transitive closures only when necessary, thus preserving chains of reachability over known variables that can be refined using substitution. These ideas yield the simply-typed λ ◆ -calculus with precise lightweight, i.e. , quantifier-free, reachability polymorphism, and the F < : ◆ -calculus with bounded parametric polymorphism over types and reachability qualifiers, paving the way for making true tracking of lifetimes and sharing practical for mainstream languages. We prove type soundness and the preservation of separation property in Coq. We discuss various applications ( e.g. , safe capability programming), possible effect system extensions, and compare our system with Scala’s capture types.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2590,
  title = {Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic Programs},
  author = {Guannan Wei and Oliver Bračevac and Songlin Jia and Yuyan Bao and Tiark Rompf},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {POPL},
  year = {2024},
  doi = {10.1145/3632856}
}