Higher-Order Asynchronous Effects

07/25/2023
by   Danel Ahman, et al.
0

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.

READ FULL TEXT
research
03/04/2020

Asynchronous effects

We explore asynchronous programming with algebraic effects. We complemen...
research
10/25/2019

Runners in action

Runners of algebraic effects, also known as comodels, provide a mathemat...
research
12/15/2022

The Functional Machine Calculus

This paper presents the Functional Machine Calculus (FMC) as a simple mo...
research
01/05/2020

A Diagrammatic Calculus for Algebraic Effects

We introduce a new, diagrammatic notation for representing the result of...
research
02/02/2023

A Framework for Higher-Order Effects Handlers

Algebraic effects handlers are a modular approach for modeling side-...
research
12/31/2018

Eff Directly in OCaml

The language Eff is an OCaml-like language serving as a prototype implem...
research
11/18/2018

Handling polymorphic algebraic effects

Algebraic effects and handlers are a powerful abstraction mechanism to r...

Please sign up or login with your details

Forgot password? Click here to reset