当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Signature Restriction for Polymorphic Algebraic Effects
arXiv - CS - Programming Languages Pub Date : 2020-03-18 , DOI: arxiv-2003.08138
Taro Sekiyama and Takeshi Tsukada and Atsushi Igarashi

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.

中文翻译:

多态代数效应的签名限制

众所周知,多态效应和多态类型赋值的简单组合会破坏类型安全。解决这个问题的现有方法分为两组:一组用于限制效果的触发方式,另一组用于限制效果的实现方式。这项工作探索了一种新方法来确保多态类型分配中多态效应的安全性。我们工作的一个新颖之处在于找到对效果界面的限制。为了形式化我们的想法,我们使用代数效果和处理程序,其中效果接口由一组与类型签名耦合的操作给出。我们提出了签名限制,这是一个限制操作类型签名的新概念,并表明签名限制足以确保配备不受限制的多态类型分配的有效语言的类型安全。我们还开发了一个类型和效果系统,以便在单个程序中使用满足和不满足签名限制的两种操作。
更新日期:2020-09-01
down
wechat
bug