Expressive Power of One-Shot Control Operators and Coroutines

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Kobayashi, Kentaro, Kameyama, Yukiyoshi
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908539488829440
author Kobayashi, Kentaro
Kameyama, Yukiyoshi
author_facet Kobayashi, Kentaro
Kameyama, Yukiyoshi
contents Control operators, such as exceptions and effect handlers, provide a means of representing computational effects in programs abstractly and modularly. While most theoretical studies have focused on multi-shot control operators, one-shot control operators -- which restrict the use of captured continuations to at most once -- are gaining attention for their balance between expressiveness and efficiency. This study aims to fill the gap. We present a mathematically rigorous comparison of the expressive power among one-shot control operators, including effect handlers, delimited continuations, and even asymmetric coroutines. Following previous studies on multi-shot control operators, we adopt Felleisen's macro-expressiveness as our measure of expressiveness. We verify the folklore that one-shot effect handlers and one-shot delimited-control operators can be macro-expressed by asymmetric coroutines, but not vice versa. We explain why a previous informal argument fails, and how to revise it to make a valid macro-translation.
format Preprint
id arxiv_https___arxiv_org_abs_2509_11901
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Expressive Power of One-Shot Control Operators and Coroutines
Kobayashi, Kentaro
Kameyama, Yukiyoshi
Programming Languages
Logic in Computer Science
Control operators, such as exceptions and effect handlers, provide a means of representing computational effects in programs abstractly and modularly. While most theoretical studies have focused on multi-shot control operators, one-shot control operators -- which restrict the use of captured continuations to at most once -- are gaining attention for their balance between expressiveness and efficiency. This study aims to fill the gap. We present a mathematically rigorous comparison of the expressive power among one-shot control operators, including effect handlers, delimited continuations, and even asymmetric coroutines. Following previous studies on multi-shot control operators, we adopt Felleisen's macro-expressiveness as our measure of expressiveness. We verify the folklore that one-shot effect handlers and one-shot delimited-control operators can be macro-expressed by asymmetric coroutines, but not vice versa. We explain why a previous informal argument fails, and how to revise it to make a valid macro-translation.
title Expressive Power of One-Shot Control Operators and Coroutines
topic Programming Languages
Logic in Computer Science
url https://arxiv.org/abs/2509.11901