Lune

OOPSLA2023顶会

From Capabilities to Regions: Enabling Efficient Compilation of Lexical Effect Handlers

Marius Müller, Philipp Schuster, Jonathan Lindegaard Starup, Klaus Ostermann, Jonathan Immanuel Brachthäuser

摘要

Effect handlers are a high-level abstraction that enables programmers to use effects in a structured way. They have gained a lot of popularity within academia and subsequently also in industry. However, the abstraction often comes with a significant runtime cost and there has been intensive research recently on how to reduce this price.

A promising approach in this regard is to implement effect handlers using a CPS translation and to provide sufficient information about the nesting of handlers. With this information the CPS translation can decide how effects have to be lifted through handlers, i.e., which handlers need to be skipped, in order to handle the effect at the correct place. A structured way to make this information available is to use a calculus with a region system and explicit subregion evidence. Such calculi, however, are quite verbose, which makes them impractical to use as a source-level language.

We present a method to infer the lifting information for a calculus underlying a source-level language. This calculus uses second-class capabilities for the safe use of effects. To do so, we define a typed translation to a calculus with regions and evidence and we show that this lift-inference translation is typability-and semantics-preserving. On the one hand, this exposes the precise relation between the second-class property and the structure given by regions. On the other hand, it closes a gap in a compiler pipeline enabling efficient compilation of the source-level language. We have implemented lift inference in this compiler pipeline and conducted benchmarks which indicate that the approach is indeed working.

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • A Lightweight Type-and-Effect System for Invalidation Safety: Tracking Permanent and Temporary Invalidation with Constraint-Based Subtype Inference 引用了 Effects, capabilities, and boxes: from scope-based reasoning to type-based reasoning and back
  • A Lightweight Type-and-Effect System for Invalidation Safety: Tracking Permanent and Temporary Invalidation with Constraint-Based Subtype Inference 引用了 Effects as capabilities: effect handlers and lightweight effect polymorphism
  • Lexical Effect Handlers, Directly 引用了 Retrofitting effect handlers onto OCaml
  • Lexical Effect Handlers, Directly 引用了 Effects, capabilities, and boxes: from scope-based reasoning to type-based reasoning and back
  • Lexical Effect Handlers, Directly 引用了 Effects as capabilities: effect handlers and lightweight effect polymorphism
  • Lexical Effect Handlers, Directly 引用了 From folklore to fact: comparing implementations of stacks and continuations
  • Lexical Effect Handlers, Directly 引用了 Binders by day, labels by night: effect instances via lexically scoped handlers
  • Retrofitting effect handlers onto OCaml 引用了 From folklore to fact: comparing implementations of stacks and continuations
  • Retrofitting effect handlers onto OCaml 引用了 Binders by day, labels by night: effect instances via lexically scoped handlers
  • Qualified Types with Boolean Algebras 引用了 Lexical Effect Handlers, Directly
  • Qualified Types with Boolean Algebras 引用了 Effects, capabilities, and boxes: from scope-based reasoning to type-based reasoning and back
  • Qualified Types with Boolean Algebras 引用了 Effects as capabilities: effect handlers and lightweight effect polymorphism
  • Zero-Overhead Lexical Effect Handlers 引用了 Lexical Effect Handlers, Directly
  • Zero-Overhead Lexical Effect Handlers 引用了 Retrofitting effect handlers onto OCaml
  • 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, capabilities, and boxes: from scope-based reasoning to type-based reasoning and back 引用了 Effects as capabilities: effect handlers and lightweight effect polymorphism
  • Effects, capabilities, and boxes: from scope-based reasoning to type-based reasoning and back 引用了 Binders by day, labels by night: effect instances via lexically scoped handlers
  • Virtualizing Continuations 引用了 Lexical Effect Handlers, Directly
  • Virtualizing Continuations 引用了 Retrofitting effect handlers onto OCaml
  • Virtualizing Continuations 引用了 Zero-Overhead Lexical Effect Handlers
  • Virtualizing Continuations 引用了 Effects, capabilities, and boxes: from scope-based reasoning to type-based reasoning and back
  • Virtualizing Continuations 引用了 From folklore to fact: comparing implementations of stacks and continuations
  • Virtualizing Continuations 引用了 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
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper7

  1. Lexical Effect Handlers, DirectlyCong Ma, Zhaoyi Ge, Edward Lee, Yizhou ZhangOOPSLA 2024 · 7 次引用
  2. A Lightweight Type-and-Effect System for Invalidation Safety: Tracking Permanent and Temporary Invalidation with Constraint-Based Subtype InferenceCunyuan Gao, Lionel ParreauxOOPSLA 2025 · 4 次引用
  3. Zero-Overhead Lexical Effect HandlersCong Ma, Zhaoyi Ge, Max Jung, Yizhou ZhangOOPSLA 2025 · 2 次引用
  4. Qualified Types with Boolean AlgebrasEdward Lee, Jonathan Lindegaard Starup, Ondrej Lhoták, Magnus MadsenOOPSLA 2025 · 1 次引用
  5. Virtualizing ContinuationsCong Ma, Jonghyun Jung, Yizhou ZhangPLDI 2026

它引用的 Paper7

  1. Effects as capabilities: effect handlers and lightweight effect polymorphismJonathan Immanuel Brachthäuser, Philipp Schuster, Klaus OstermannOOPSLA 2020 · 62 次引用
  2. Retrofitting effect handlers onto OCamlK. C. Sivaramakrishnan, Stephen Dolan, Leo White, Tom Kelly 等PLDI 2021 · 56 次引用
  3. Binders by day, labels by night: effect instances via lexically scoped handlersDariusz Biernacki, Maciej Piróg, Piotr Polesiuk, Filip SieczkowskiPOPL 2020 · 46 次引用
  4. Effects, capabilities, and boxes: from scope-based reasoning to type-based reasoning and backJonathan Immanuel Brachthäuser, Philipp Schuster, Edward Lee, Aleksander Boruch-GruszeckiOOPSLA 2022 · 24 次引用
  5. From folklore to fact: comparing implementations of stacks and continuationsKavon Farvardin, John H. ReppyPLDI 2020 · 17 次引用

相关 Paper

  1. Modal Effect TypesWenhao Tang, Leo White, Stephen Dolan, Daniel Hillerström 等OOPSLA 2025 · 4 次引用
  2. Efficient compilation of algebraic effect handlersGeorgios Karachalias, Filip Koprivec, Matija Pretnar, Tom SchrijversOOPSLA 2021 · 9 次引用
  3. A typed continuation-passing translation for lexical effect handlersPhilipp Schuster, Jonathan Immanuel Brachthäuser, Marius Müller, Klaus OstermannPLDI 2022 · 10 次引用
  4. Answer Refinement Modification: Refinement Type System for Algebraic Effects and HandlersFuga Kawamata, Hiroshi Unno, Taro Sekiyama, Tachio TerauchiPOPL 2024 · 8 次引用
  5. Handling Higher-Order Effectful Operations with Judgemental Monadic LawsZhixuan Yang, Nicolas WuPOPL 2026
黄昏的海面,两侧是细线勾勒的悬崖