Retrofitting effect handlers onto OCaml
Retrofitting effect handlers onto OCaml
复制标题
将效果处理程序改装到 OCaml 上
DOI:
--
复制
发表时间:
2021
期刊:
影响因子:
--
通讯作者:
Anil Madhavapeddy
中科院分区:
文献类型:
--
作者:
K. Sivaramakrishnan;Stephen Dolan;Leo White;T. Kelly;S. Jaffer;Anil Madhavapeddy
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.
登录
查看更多内容
影响因子:
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
影响因子:
--
作者:
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