paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Functional Ownership through Fractional Uniqueness

通过分数唯一性实现函数式所有权
OOPSLA 8(OOPSLA1)2024匹配度 2/10 · 论文属于函数式类型系统中的所有权/借用形式化研究,偏 PL 类型理论,与用户核心关注的 LLM/Agent 与静态分析交叉、浮点程序分析、贝叶斯程序分析均无直接关系;仅在“静态分析/形式化验证”大类上有间接关联。引用 5 inbox
Daniel Marshall, Dominic Orchard
crossref: 2026-09-10

AI 速览

一句话:将分数权限与分级类型结合,使 Rust 式所有权和借用平滑融入支持线性、分级类型的函数式类型系统。

Rust 式所有权与借用能在无需 GC 的情况下保证内存安全,但其类型系统与所有权模型在编译阶段相对分离,且如何将其基本思想融入更传统的类型系统仍缺乏简洁核心。本文提出以分数唯一性统一所有权、借用、线性与分级类型:将分数权限与 grading 结合,把唯一性视为可分级推广,从而在标准类型系统中自然导出类似 Rust 的所有权模型,并保持与线性类型和分级类型的兼容。作者进一步将该设计扩展到 Granule 语言,给出首个能平滑整合所有权与借用、线性与分级类型的方案,使函数式语言可以借鉴 Rust 等所有权框架的概念。

问题
如何在传统或函数式类型系统中平滑整合 Rust 式所有权与借用,并避免唯一性类型过于粗粒度,是本文研究问题。
方法
将分数权限与 grading 结合,把所有权视为唯一性的分级推广,并与线性、分级类型统一,进而扩展 Granule。
评估
作者通过发展这一连接并在 Granule 中落实扩展来展示设计可行性;摘要未报告实证评估。
原文摘要(Abstract)

Ownership and borrowing systems, designed to enforce safe memory management without the need for garbage collection, have been brought to the fore by the Rust programming language. Rust also aims to bring some guarantees offered by functional programming into the realm of performant systems code, but the type system is largely separate from the ownership model, with type and borrow checking happening in separate compilation phases. Recent models such as RustBelt and Oxide aim to formalise Rust in depth, but there is less focus on integrating the basic ideas into more traditional type systems. An approach designed to expose an essential core for ownership and borrowing would open the door for functional languages to borrow concepts found in Rust and other ownership frameworks, so that more programmers can enjoy their benefits. One strategy for managing memory in a functional setting is through uniqueness types, but these offer a coarse-grained view: either a value has exactly one reference, and can be mutated safely, or it cannot, since other references may exist. Recent work demonstrates that linear and uniqueness types can be combined in a single system to offer restrictions on program behaviour and guarantees about memory usage. We develop this connection further, showing that just as graded type systems like those of Granule and Idris generalise linearity, a Rust-like ownership model arises as a graded generalisation of uniqueness. We combine fractional permissions with grading to give the first account of ownership and borrowing that smoothly integrates into a standard type system alongside linearity and graded types, and extend Granule accordingly with these ideas.

链接与引用

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

BibTeX
@article{paperbot2555,
  title = {Functional Ownership through Fractional Uniqueness},
  author = {Daniel Marshall and Dominic Orchard},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {OOPSLA1},
  year = {2024},
  doi = {10.1145/3649848}
}