arrow
Return

Hyperfunctions: Communicating Continuations

delete2026-01-01
delete0
PRE
AI
D
Donnacha Oisín Kidney *
N
Nicolas Wu
DOI:10.1145/3776649delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
A hyperfunction is a continuation-like construction that can be used to implement communication in the context of concurrency. Though it has been reinvented many times, it remains obscure: since its definition by Launchbury et al., hyperfunctions have been used to implement certain algebraic effect handlers, coroutines, and breadth-first traversals; however, in each of these examples, the hyperfunction type went unrecognised. We identify the hyperfunctions hidden in all of these algorithms, and we exposit the common pattern between them, building a framework for working with and reasoning about hyperfunctions. We use this framework to solve a long-standing problem: giving a fully-abstract continuation-based semantics for a concurrent calculus, the Calculus of Communicating Systems. Finally, we use hyperfunctions to build a monadic Haskell library for efficient first-class coroutines.
Keywords:
Continuations
Concurrency
CPS
CCS
Hyperfunctions
Coroutines

Journal

P
Proceedings of the ACM on Programming Languages-PACMPL
IF:
2.8
Papers:
308
Citations:
4.7K

Organization

I
imperial college london
Scholars:
9.9K
Papers: 4.4K
Citations: 0
Cited Papers

Cited Papers

Copatterns
err2013-01-23
err0
PREAI
errAbel,Andreas; Pientka,Brigitte; Thibodeau,David; Setzer,Anton
errShare
errSave
Continuations and transducer composition
err2006-06-11
err0
PREAI
errShivers,Olin; Might,Matthew
errShare
errSave
researcher View more