paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Pure Borrow: Linear Haskell Meets Rust-Style Borrowing

Pure Borrow:线性 Haskell 遇上 Rust 风格借用
PLDI 10(PLDI)2026匹配度 2/10 · 论文属于类型系统与函数式编程领域,研究 Linear Haskell 中的 Rust 式借用,未涉及 LLM、Agent、浮点程序分析或贝叶斯程序分析,与用户关注的 PL 与 AI 交叉方向无直接关联。引用 0 inbox
Yusuke Matsushita, Hiromi Ishii
crossref: 2026-09-10

AI 速览

一句话:提出 Pure Borrow,在 Linear Haskell 中以纯函数方式实现 Rust 式借用,支持仿射可变引用的并行突变且保持纯度。

本文研究纯函数语言能否安全支持 Rust 式非局部借用,其中借用者可自由拆分与丢弃,而无需将所有权直接归还出借者。作者提出 Pure Borrow:一个在 Linear Haskell 中实现 Rust 式借用并保持纯度的框架,以库的形式提供,并形式化其核心及基于历史的借用模型。该框架支持纯计算内部的仿射可变引用及并行状态突变,不同于 IO/ST monad 与现有 Linear Haskell API;同时保持纯度、惰性求值、一等多态和无泄漏。作者通过并行计算案例展示其能力,并建立元理论以论证安全性、无泄漏与合流。

问题
纯函数语言能否安全支持 Rust 式非局部借用,且借用者可自由拆分和丢弃而无需直接归还所有权。
方法
在 Linear Haskell 中以库形式实现 Pure Borrow,形式化核心语言并构建基于历史的借用模型与元理论。
评估
通过并行计算案例研究展示其能力,并论证安全性、无泄漏与合流等元理论性质。
原文摘要(Abstract)

A promising approach to unifying functional and imperative programming paradigms is to localize mutation using linear or affine types. Haskell, a purely functional language, was recently extended with linear types by Bernardy et al., in the name of Linear Haskell. However, it remained unknown whether such a pure language could safely support non-local borrowing in the style of Rust, where each borrower can be freely split and dropped without direct communication of ownership back to the lender. We answer this question affirmatively with Pure Borrow , a novel framework that realizes Rust-style borrowing in Linear Haskell with purity. Notably, it features parallel state mutation with affine mutable references inside pure computation, unlike the IO and ST monads and existing Linear Haskell APIs. It also enjoys purity, lazy evaluation, first-class polymorphism and leak freedom, unlike Rust. We implement Pure Borrow simply as a library in Linear Haskell and demonstrate its power with a case study in parallel computing. We formalize the core of Pure Borrow and build a metatheory that works toward establishing safety, leak freedom and confluence, with a new, history-based model of borrowing.

链接与引用

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

BibTeX
@article{MatsushitaI26,
  title = {Pure Borrow: Linear Haskell Meets Rust-Style Borrowing},
  author = {Yusuke Matsushita and Hiromi Ishii},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {PLDI},
  year = {2026},
  doi = {10.1145/3808259}
}