Computer Science > Programming Languages
[Submitted on 4 Mar 2020 (v1), last revised 14 Nov 2020 (this version, v3)]
Title:Asynchronous Effects
View PDFAbstract: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, called $\lambda_{\text{ae}}$. We demonstrate the flexibility of $\lambda_{\text{ae}}$ using examples ranging from a multi-party web application, to preemptive multi-threading, to remote function calls, to a parallel variant of runners of algebraic effects. In addition, the paper is accompanied by a formalisation of $\lambda_{\text{ae}}$'s type safety proofs in Agda, and a prototype implementation of $\lambda_{\text{ae}}$ in OCaml.
Submission history
From: Danel Ahman [view email][v1] Wed, 4 Mar 2020 14:50:32 UTC (167 KB)
[v2] Fri, 10 Jul 2020 14:26:45 UTC (167 KB)
[v3] Sat, 14 Nov 2020 20:04:48 UTC (153 KB)
References & Citations
Bibliographic and Citation Tools
Bibliographic Explorer (What is the Explorer?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)
Code, Data and Media Associated with this Article
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower (What are Influence Flowers?)
Connected Papers (What is Connected Papers?)
CORE Recommender (What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.