Rows and Capabilities as Modal Effects
摘要
Effect handlers allow programmers to model and compose computational effects modularly. Effect systems statically guarantee that all effects are handled. Several recent practical effect systems are based on either row polymorphism or capabilities. However, there remains a gap in understanding the precise relationship between effect systems with such disparate foundations. The main difficulty is that in both row-based and capability-based systems, effect tracking is typically entangled with other features such as functions.
We propose a uniform framework for encoding, analysing, and comparing effect systems. Our framework exploits and generalises modal effect types, a recent novel effect system which decouples effect tracking from functions via modalities. Modalities offer fine-grained control over when and how effects are tracked, enabling us to express different strategies for effect tracking. We give encodings as macro translations from existing row-based and capability-based effect systems into our framework and show that these encodings preserve types and semantics. Our encodings reveal the essence of effect tracking mechanisms in different effect systems, enable a direct analysis on their differences, and provide practical insights on language design.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- 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
- Type, Ability, and Effect Systems: Perspectives on Purity, Semantics, and Expressiveness 引用了 Effects as capabilities: effect handlers and lightweight effect polymorphism
- Type, Ability, and Effect Systems: Perspectives on Purity, Semantics, and Expressiveness 引用了 Multimodal Dependent Type Theory
- Type, Ability, and Effect Systems: Perspectives on Purity, Semantics, and Expressiveness 引用了 Binders by day, labels by night: effect instances via lexically scoped handlers
- Classifying Capabilities 引用了 First-class names for effect handlers
- Classifying Capabilities 引用了 Effects as capabilities: effect handlers and lightweight effect polymorphism
- First-class names for effect handlers 引用了 Effects as capabilities: effect handlers and lightweight effect polymorphism
- First-class names for 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
引用它的顶会 Paper2
它引用的 Paper7
- Effects as capabilities: effect handlers and lightweight effect polymorphismJonathan Immanuel Brachthäuser, Philipp Schuster, Klaus OstermannOOPSLA 2020 · 62 次引用
- Binders by day, labels by night: effect instances via lexically scoped handlersDariusz Biernacki, Maciej Piróg, Piotr Polesiuk, Filip SieczkowskiPOPL 2020 · 46 次引用
- Multimodal Dependent Type TheoryDaniel Gratzer, G. A. Kavvos, Andreas Nuyts, Lars BirkedalLICS 2020 · 36 次引用
- 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 次引用
- First-class names for effect handlersNingning Xie, Youyou Cong, Kazuki Ikemori, Daan LeijenOOPSLA 2022 · 11 次引用
相关 Paper
- Modal Effect TypesWenhao Tang, Leo White, Stephen Dolan, Daniel Hillerström 等OOPSLA 2025 · 4 次引用
- A typed continuation-passing translation for lexical effect handlersPhilipp Schuster, Jonathan Immanuel Brachthäuser, Marius Müller, Klaus OstermannPLDI 2022 · 10 次引用
- Dynamic Wind for Effect HandlersDavid Voigt, Philipp Schuster, Jonathan Immanuel BrachthäuserOOPSLA 2025
- Hefty Algebras: Modular Elaboration of Higher-Order Algebraic EffectsCasper Bach Poulsen, Cas van der RestPOPL 2023 · 9 次引用
- Tracing Just-in-Time Compilation for Effects and HandlersMarcial Gaißert, Carl Friedrich Bolz-Tereick, Jonathan Immanuel BrachthäuserOOPSLA 2025
