Higher-Order Asynchronous Effects

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Ahman, Danel, Pretnar, Matija
Format: Preprint
Published: 2023
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910618495221760
author Ahman, Danel
Pretnar, Matija
author_facet Ahman, Danel
Pretnar, Matija
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2307_13795
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Higher-Order Asynchronous Effects
Ahman, Danel
Pretnar, Matija
Programming Languages
Logic in Computer Science
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.
title Higher-Order Asynchronous Effects
topic Programming Languages
Logic in Computer Science
url https://arxiv.org/abs/2307.13795