Lune

OOPSLA2022顶会

First-class names for effect handlers

Ningning Xie, Youyou Cong, Kazuki Ikemori, Daan Leijen

摘要

Algebraic effects and handlers are a promising technique for incorporating composable computational effects into functional programming languages. Effect handlers enable concisely programming with different effects, but they do not offer a convenient way to program with different instances of the same effect. As a solution to this inconvenience, previous studies have introduced named effect handlers, which allow the programmer to distinguish among different effect instances. However, existing formalizations of named handlers are both involved and restrictive, as they employ non-standard mechanisms to prevent the escaping of handler names. In this paper, we propose a simple and flexible design of named handlers. Specifically, we treat handler names as first-class values, and prevent their escaping while staying within the ordinary λ-calculus. Such a design is enabled by combining named handlers with scoped effects, a novel variation of effects that maintain a scope via rank-2 polymorphism. We formalize two combinations of named handlers and scoped effects, and implement them in the Koka programming language. We also present practical applications of named handlers, including a neural network and a unification algorithm.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Lexical Effect Handlers, Directly 引用了 Continuing WebAssembly with Effect Handlers
  • Lexical Effect Handlers, Directly 引用了 Effects as capabilities: effect handlers and lightweight effect polymorphism
  • Lexical Effect Handlers, Directly 引用了 Binders by day, labels by night: effect instances via lexically scoped handlers
  • Modal Effect Types 引用了 Continuing WebAssembly with Effect Handlers
  • Modal Effect Types 引用了 Effects as capabilities: effect handlers and lightweight effect polymorphism
  • Modal Effect Types 引用了 Soundly Handling Linearity
  • Modal Effect Types 引用了 Binders by day, labels by night: effect instances via lexically scoped handlers
  • Zero-Overhead Lexical Effect Handlers 引用了 Lexical Effect Handlers, Directly
  • Zero-Overhead Lexical Effect Handlers 引用了 Continuing WebAssembly with Effect Handlers
  • Zero-Overhead Lexical Effect Handlers 引用了 Effects as capabilities: effect handlers and lightweight effect polymorphism
  • Zero-Overhead Lexical Effect Handlers 引用了 Binders by day, labels by night: effect instances via lexically scoped handlers
  • Effects as capabilities: effect handlers and lightweight effect polymorphism 引用了 Binders by day, labels by night: effect instances via lexically scoped handlers
  • Soundly Handling Linearity 引用了 Continuing WebAssembly with Effect Handlers
  • Soundly Handling Linearity 引用了 Effects as capabilities: effect handlers and lightweight effect polymorphism
  • Soundly Handling Linearity 引用了 Binders by day, labels by night: effect instances via lexically scoped handlers
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper8

  1. Continuing WebAssembly with Effect HandlersLuna Phipps-Costin, Andreas Rossberg, Arjun Guha, Daan Leijen 等OOPSLA 2023 · 20 次引用
  2. Soundly Handling LinearityWenhao Tang, Daniel Hillerström, Sam Lindley, J. Garrett MorrisPOPL 2024 · 8 次引用
  3. Lexical Effect Handlers, DirectlyCong Ma, Zhaoyi Ge, Edward Lee, Yizhou ZhangOOPSLA 2024 · 7 次引用
  4. Modal Effect TypesWenhao Tang, Leo White, Stephen Dolan, Daniel Hillerström 等OOPSLA 2025 · 4 次引用
  5. Zero-Overhead Lexical Effect HandlersCong Ma, Zhaoyi Ge, Max Jung, Yizhou ZhangOOPSLA 2025 · 2 次引用

它引用的 Paper3

  1. Effects as capabilities: effect handlers and lightweight effect polymorphismJonathan Immanuel Brachthäuser, Philipp Schuster, Klaus OstermannOOPSLA 2020 · 62 次引用
  2. Binders by day, labels by night: effect instances via lexically scoped handlersDariusz Biernacki, Maciej Piróg, Piotr Polesiuk, Filip SieczkowskiPOPL 2020 · 46 次引用
  3. Perceus: garbage free reference counting with reuseAlex Reinking, Ningning Xie, Leonardo de Moura, Daan LeijenPLDI 2021 · 31 次引用

相关 Paper

  1. Hefty Algebras: Modular Elaboration of Higher-Order Algebraic EffectsCasper Bach Poulsen, Cas van der RestPOPL 2023 · 9 次引用
  2. Dynamic Wind for Effect HandlersDavid Voigt, Philipp Schuster, Jonathan Immanuel BrachthäuserOOPSLA 2025
  3. Tracing Just-in-Time Compilation for Effects and HandlersMarcial Gaißert, Carl Friedrich Bolz-Tereick, Jonathan Immanuel BrachthäuserOOPSLA 2025
  4. Efficient compilation of algebraic effect handlersGeorgios Karachalias, Filip Koprivec, Matija Pretnar, Tom SchrijversOOPSLA 2021 · 9 次引用
  5. Rows and Capabilities as Modal EffectsWenhao Tang, Sam LindleyPOPL 2026 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖