Danel Ahman ; Matija Pretnar - Higher-Order Asynchronous Effects

lmcs:11656 - Logical Methods in Computer Science, September 23, 2024, Volume 20, Issue 3 - https://doi.org/10.46298/lmcs-20(3:26)2024
Higher-Order Asynchronous EffectsArticle

Authors: Danel Ahman ; Matija Pretnar

    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.


    Volume: Volume 20, Issue 3
    Published on: September 23, 2024
    Accepted on: May 28, 2024
    Submitted on: July 27, 2023
    Keywords: Computer Science - Programming Languages,Computer Science - Logic in Computer Science

    Consultation statistics

    This page has been seen 227 times.
    This article's PDF has been downloaded 82 times.