Back to Search Start Over

Higher-Order Asynchronous Effects

Authors :
Danel Ahman
Matija Pretnar
Source :
Logical Methods in Computer Science, Vol Volume 20, Issue 3 (2024)
Publication Year :
2024
Publisher :
Logical Methods in Computer Science e.V., 2024.

Abstract

We explore asynchronous programming with algebraic effects. We complement their conventional synchronous treatment by showing how to naturally also accommodate asynchrony within them, namely, by decoupling the execution of operation calls into signalling that an operation's implementation needs to be executed, and interrupting a running computation with the operation's result, to which the computation can react by installing interrupt handlers. We formalise these ideas in a small core calculus and demonstrate its flexibility using examples ranging from a multi-party web application, to pre-emptive multi-threading, to (cancellable) remote function calls, to a parallel variant of runners of algebraic effects. In addition, the paper is accompanied by a formalisation of the calculus's type safety proofs in Agda, and a prototype implementation in OCaml.

Details

Language :
English
ISSN :
18605974
Volume :
ume 20, Issue 3
Database :
Directory of Open Access Journals
Journal :
Logical Methods in Computer Science
Publication Type :
Academic Journal
Accession number :
edsdoj.839d91dc0b094623bad5cad7ba69c50a
Document Type :
article
Full Text :
https://doi.org/10.46298/lmcs-20(3:26)2024