当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Asynchronous Effects
arXiv - CS - Programming Languages Pub Date : 2020-03-04 , DOI: arxiv-2003.02110
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, 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.

中文翻译:

异步效果

我们探索具有代数效应的异步编程。我们通过展示如何自然地也适应它们内部的异步来补充他们的传统同步处理,即通过将操作调用的执行解耦为需要执行操作的实现的信号,并用操作的结果中断正在运行的计算,计算可以通过安装中断处理程序来做出反应。我们在一个名为 $\lambda_{\text{ae}}$ 的小型核心演算中将这些想法形式化。我们使用从多方 Web 应用程序、抢占式多线程、远程函数调用到代数效应运行器的并行变体等示例展示了 $\lambda_{\text{ae}}$ 的灵活性。此外,论文还附有$\lambda_{\text{ae}}$'的形式化
更新日期:2020-11-17
down
wechat
bug