paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Capturing Types

捕获类型
TOPLAS 45(4)2023匹配度 2/10 · 论文属于纯类型系统与语言设计,讨论捕获变量、作用域能力与效应多态,与静态分析有间接关联;但不涉及 LLM/Agent、机器学习系统、浮点程序分析或贝叶斯程序分析,也不是 AI↔PL 交叉研究。引用 20 inbox
Aleksander Boruch-Gruszecki, Martin Odersky, Edward Lee, Ondřej Lhoták, Jonathan Brachthäuser
crossref: 2026-09-10

AI 速览

一句话:提出在类型中紧凑记录值所捕获自由变量的演算 CC<:□,并用于安全实现作用域能力与效应多态。

传统类型系统通常刻画值的形状,却不描述值所捕获的自由变量;然而若能在类型层面知道这些捕获变量,就可保证许多安全性质。本文提出演算 CC<:□,在类型中简洁地表示被捕获变量,并展示如何通过作用域能力(scoped capabilities)安全实现效应与效应多态。文章讨论了追踪捕获变量这一决定如何影响演算的关键设计,并表明 CC<:□ 能为常见数据结构及其典型用法给出简单直观的类型。最后,作者说明这些思想如何指导实际编程语言中 capture checking 的实现。

问题
传统类型系统通常只刻画值的形状,而不表示值所捕获的自由变量,因此难以保证作用域能力、效应等安全性质。
方法
提出演算 CC<:□,在类型中显式且紧凑地表示被捕获变量,并基于作用域能力安全实现效应与效应多态,同时讨论追踪捕获变量对演算设计的影响。
评估
通过常见数据结构及其典型用法展示该演算能给出简单直观的类型,并说明这些思想如何指导实际编程语言中的 capture checking 实现;摘要未报告系统化实证评估。
原文摘要(Abstract)

Type systems usually characterize the shape of values but not their free variables. However, many desirable safety properties could be guaranteed if one knew the free variables captured by values. We describe CC < :◻ , a calculus where such captured variables are succinctly represented in types, and show it can be used to safely implement effects and effect polymorphism via scoped capabilities. We discuss how the decision to track captured variables guides key aspects of the calculus, and show that CC < :◻ admits simple and intuitive types for common data structures and their typical usage patterns. We demonstrate how these ideas can be used to guide the implementation of capture checking in a practical programming language.

链接与引用

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

BibTeX
@article{paperbot2123,
  title = {Capturing Types},
  author = {Aleksander Boruch-Gruszecki and Martin Odersky and Edward Lee and Ondřej Lhoták and Jonathan Brachthäuser},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {45},
  number = {4},
  year = {2023},
  doi = {10.1145/3618003}
}