paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Doo bee doo bee doo

Doo bee doo bee doo
JFP vol.302020匹配度 2/10 · 论文属于编程语言设计与效果类型系统,虽与PL相关,但未涉及用户关注的PL→AI、AI→PL、浮点程序分析、贝叶斯程序分析或Agentic程序/LLM交叉,因此匹配度低。引用 47 inbox
LUKAS CONVENT, SAM LINDLEY, CONOR MCBRIDE, CRAIG MCLAUGHLIN
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出严格函数式语言 Frank,用双向效果类型系统与推广的函数抽象统一 effect handlers,并引入 adaptor 支持效果封装与重连。

本文探索严格函数式语言 Frank 的设计与实现,目标是为模块化效应编程提供更自然的基础。传统 effect handler 虽能由类型静态追踪命令接口,却需要额外的处理构造,并常在源码中引入效应变量。Frank 将函数抽象推广为 operator:函数是不解释任何命令的特例,operator 可同时解释来自多个来源的命令,即 multihandler,从而保持直接风格。其双向效应类型系统让环境能力向内传播,避免源码中出现效应变量,并支持效应封装与库组件之间的重连;论文提出 adaptor 来消除 effect pollution。评估以语言设计、实现与未来可能性探讨为主,特别是与更丰富类型系统的结合。

问题
如何在不引入额外 effect handling 构造和源码效应变量的情况下,实现模块化、类型安全的效应处理,并支持效应封装与重连?
方法
设计并实现 Frank 语言,将函数抽象推广为 operator/multihandler,采用双向效应类型系统和 ambient ability 向内传播,并提供 adaptor 机制。
评估
以语言设计与实现为主,通过机制阐述和未来方向讨论展示其表达力,并探讨 effect handlers 与更丰富类型系统结合的可能性。
原文摘要(Abstract)

Abstract We explore the design and implementation of Frank, a strict functional programming language with a bidirectional effect type system designed from the ground up around a novel variant of Plotkin and Pretnar’s effect handler abstraction. Effect handlers provide an abstraction for modular effectful programming: a handler acts as an interpreter for a collection of commands whose interfaces are statically tracked by the type system. However, Frank eliminates the need for an additional effect handling construct by generalising the basic mechanism of functional abstraction itself. A function is but the special case of a Frank operator that interprets no commands. Moreover, Frank’s operators can be multihandlers which simultaneously interpret commands from several sources at once, without disturbing the direct style of functional programming with values. Effect typing in Frank employs a novel form of effect polymorphism which avoids mentioning effect variables in source code. This is achieved by propagating an ambient ability inwards, rather than accumulating unions of potential effects outwards. With the ambient ability describing the effects that are available at a certain point in the code, it can become necessary to reconfigure access to the ambient ability. A primary goal is to be able to encapsulate internal effects, eliminating a phenomenon we call effect pollution . Moreover, it is sometimes desirable to rewire the effect flow between effectful library components. We propose adaptors as a means for supporting both effect encapsulation and more general rewiring. Programming with effects and handlers is in its infancy. We contribute an exploration of future possibilities, particularly in combination with other forms of rich type systems.

链接与引用

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

BibTeX
@article{ConventLMM20,
  title = {Doo bee doo bee doo},
  author = {LUKAS CONVENT and SAM LINDLEY and CONOR MCBRIDE and CRAIG MCLAUGHLIN},
  journal = {Journal of Functional Programming},
  volume = {30},
  year = {2020},
  doi = {10.1017/s0956796820000039}
}