Retrofitting effect handlers onto OCaml

Retrofitting effect handlers onto OCaml
复制标题

将效果处理程序改装到 OCaml 上

DOI:
--
复制
发表时间:
2021
期刊:
ACM-SIGPLAN Symposium on Programming Language Design and Implementation
影响因子:
--
通讯作者:
Anil Madhavapeddy
Anil Madhavapeddy
中科院分区:
--
文献类型:
--
作者:
K. Sivaramakrishnan;Stephen Dolan;Leo White;T. Kelly;S. Jaffer;Anil Madhavapeddy

文献摘要

参考文献

被引文献

相似文献

效果处理程序一直在收集动力,作为具有用户定义效果的模块化编程的一种机制。效果处理程序允许发电机,异步/等待,轻质螺纹和COROUTINE等非本地控制流动机制可以组合表达。我们提出了设计并评估OCAML的全面有效实施效果处理程序,OCAML是一种工业强度的多范式编程语言。我们的实施旨在维护现有OCAML代码的向后兼容性和性能概况。在OCAML上进行改造效应处理程序很具有挑战性,因为OCAML目前没有任何非局部控制流动机制。我们对OCAML的效果处理程序的实施:(i)在不使用效果处理程序的全面宏观基准套件上施加平均1%的开销; (ii)与检查堆栈的程序分析工具保持兼容; (iii)对于使用效果处理程序的新代码非常有效。
Effect handlers have been gathering momentum as a mechanism for modular programming with user-defined effects. Effect handlers allow for non-local control flow mechanisms such as generators, async/await, lightweight threads and coroutines to be composably expressed. We present a design and evaluate a full-fledged efficient implementation of effect handlers for OCaml, an industrial-strength multi-paradigm programming language. Our implementation strives to maintain the backwards compatibility and performance profile of existing OCaml code. Retrofitting effect handlers onto OCaml is challenging since OCaml does not currently have any non-local control flow mechanisms other than exceptions. Our implementation of effect handlers for OCaml: (i) imposes a mean 1% overhead on a comprehensive macro benchmark suite that does not use effect handlers; (ii) remains compatible with program analysis tools that inspect the stack; and (iii) is efficient for new code that makes use of effect handlers.
嘟比嘟比嘟
DOI: 10.1017/s0956796820000039
发表时间: 2020
影响因子: 1.1
作者:
CONVENT L
通讯作者: CONVENT L
从民间传说到事实:比较堆栈和延续的实现
DOI: 10.1145/3385412.3385994
发表时间: 2020
期刊: ACM SIGPLAN International Conference on Programming Language Design and Implementation
影响因子: --
作者:
Farvardin, Kavon;Reppy, John
通讯作者: Reppy, John
关于用户定义效果的表现力:效果处理程序、单子反射、分隔控制
DOI: 10.1145/3110257
发表时间: 2017
影响因子: --
作者:
Forster Y
通讯作者: Forster Y
编译器和运行时对连续标记的支持
DOI: 10.1145/3385412.3385981
发表时间: 2020
期刊: PLDI
影响因子: --
作者:
Flatt, Matthew;Dybvig, R. Kent
通讯作者: Dybvig, R. Kent
嵌套并行程序中的解开
DOI: 10.1145/3371115
发表时间: 2020
期刊: ACM
影响因子: --
作者:
Westrick, S;Yadav, R;Fluet, M;Acar, U
通讯作者: Acar, U