paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Signature restriction for polymorphic algebraic effects

多态代数效应的签名限制
ICFP 4(ICFP)2020匹配度 1/10 · 该论文研究多态代数效应的类型安全与签名限制,属于纯类型系统/函数式编程理论,与用户关注的LLM/Agent、静态分析、浮点程序分析、贝叶斯程序分析等方向没有直接交集。引用 6 inbox
Taro Sekiyama, Takeshi Tsukada, Atsushi Igarashi
crossref: 2026-09-10

AI 速览

一句话:提出签名限制,通过约束代数效应操作的类型签名,在多态类型赋值下保障多态效应的类型安全。

多态效应与多态类型赋值的朴素结合会破坏类型安全。已有方案要么限制效应如何触发,要么限制效应如何实现。本文提出第三种思路:限制效应接口。作者以代数效应与 handler 为形式化框架,其中效应接口由一组带类型签名的操作给出;提出“签名限制”(signature restriction)这一新概念,限制操作的类型签名,并证明满足该限制时,带无限制多态类型赋值的效应语言仍可保证类型安全。为提升实用性,文章还设计了一个类型与效应系统,允许同一程序中同时使用满足和不满足签名限制的操作。

问题
多态效应与多态类型赋值结合时如何保持类型安全,尤其是能否通过限制效应接口而非效应触发或实现方式来解决。
方法
在代数效应与 handlers 框架中,将效应接口形式化为带类型签名的操作集合,提出签名限制并证明其足以保证类型安全;进一步设计类型与效应系统以混合使用受限制与不受限制的操作。
评估
通过形式化定义与类型安全证明来评估签名限制的充分性,并给出可混合两类操作的类型与效应系统;摘要未报告实现或实验评估。
原文摘要(Abstract)

The naive combination of polymorphic effects and polymorphic type assignment has been well known to break type safety. Existing approaches to this problem are classified into two groups: one for restricting how effects are triggered and the other for restricting how they are implemented. This work explores a new approach to ensuring the safety of polymorphic effects in polymorphic type assignment. A novelty of our work lies in finding a restriction on effect interfaces. To formalize our idea, we employ algebraic effects and handlers, where an effect interface is given by a set of operations coupled with type signatures. We propose signature restriction, a new notion to restrict the type signatures of operations, and show that signature restriction is sufficient to ensure type safety of an effectful language equipped with unrestricted polymorphic type assignment. We also develop a type-and-effect system to enable the use of both operations that satisfy and do not satisfy the signature restriction in a single program.

链接与引用

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

BibTeX
@article{paperbot920,
  title = {Signature restriction for polymorphic algebraic effects},
  author = {Taro Sekiyama and Takeshi Tsukada and Atsushi Igarashi},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {4},
  number = {ICFP},
  year = {2020},
  doi = {10.1145/3408999}
}