Effect Handler Oriented Programming
Effect Handler Oriented Programming
批准号:
MR/T043830/1
负责人:
Samuel Lindley
金额:
$147.78万
依托单位:
依托单位国家:
英国
项目类别:
Fellowship
财政年份:
2021
资助国家:
英国
项目状态:
未结题
起止时间:
2021 至 --
中文摘要
点击翻译按钮获取中文摘要
英文摘要
In an economy in which the UK software industry added £139 billion ofvalue to UK GDP in 2018 alone, this fellowship will transform the waydevelopers write software. By offering a radically new way ofcomposing and customising programs, I will empower software developersto build more flexible, maintainable, and robust software.Computers must interact with the real world. In computer programs realworld effects are pervasive, e.g.: concurrency (performing twocomputations at once), distribution (performing computation indifferent places), input, output, and probability (e.g. for machinelearning).Effect handlers are a general programming feature that can be used toimplement all of these effects. They were introduced by theoreticalcomputer scientists as part of a mathematical model of effects. Thanksin part to my efforts they now show promise as a practical programmingtool. Interest in effect handlers in industry is growing. Forinstance, Facebook's React Fiber, the core of the market-leading Reactuser interface library for web applications, is directly inspired byeffect handlers, and Uber's Pyro tool for probabilistic programmingand statistical inference makes essential use of effect handlers.Preliminary results suggest effect handlers have the potential tosupport efficient implementations. Nevertheless, existingimplementations are in their infancy and research is required to makethem scale, both in terms of ease of programming and in terms ofperformance. I will develop the theory and practice of Effect HandlerOriented Programming as a uniform foundation for modular and efficientimplementation of effects. I will develop both high-level (for humans)and low-level (for machines) effect handler designs andimplementations. In collaboration with my project partners I willensure that EHOP has direct impact through two key technologies.+ Hack. I will add effect handlers to Hack, the high-level programminglanguage in which the Facebook server is written. Hack currentlyprovides ad hoc support for features such as concurrency andprobabilistic programming, which I will replace by effect handlers,eliminating the need to maintain several ad hoc features, andintroducing fine-grained control over details such as schedulingstrategies. This will allow more flexible, maintainable, and robustsoftware to be written in Hack, ultimately improving the userexperience of billions of Facebook users.+ WebAssembly. I will design and implement an effect handler extensionfor WebAssembly, a portable low-level bytecode supported by the topfour browser vendors and designed to supersede JavaScript as thetarget language for the web. Currently, languages such as JavaScriptprovide a collection of ad hoc overlapping concurrency features. Eachof these is hard-wired and has to be maintained separately. However,all of them can be implemented with minimal effort using effecthandlers. Rather than hard-wiring and maintaining several ad hocfeatures, compiler developers will be able to rely on a singleimplementation of effect handlers in WebAssembly. This will enablemore flexible, maintainable, and reliable programming languageimplementations, ultimately improving the user experience of billionsof web users.A "killer app" for effect handlers is concurrency and distribution. Acentral aspect of concurrency and distribution is communication. Forcommunication to be safe, secure, and reliable, all parties mustcomply with appropriate protocols. Session types are a nascenttechnology for enforcing protocol compliance. Unifying the two mainthreads of my research over the last half decade, I will extend thetheory and practice of effect handlers to enable session-typedconcurrency and distribution features to be defined as effecthandlers. Ultimately, this will enable safe, secure, and reliablecommunication infrastructure for billions of end users.
期刊论文(10)
专著(0)
科研奖励(0)
会议论文
登录
查看更多内容
Composing UNIX with Effect Handlers: A Case Study in Effect Handler Oriented Programming
用效果处理程序组成 UNIX:面向效果处理程序编程的案例研究
DOI:
--
发表时间:
2021
期刊:
影响因子:
--
作者:
[Daniel Hillerström]
通讯作者:
Daniel Hillerström
Structural Subtyping as Parametric Polymorphism
作为参数多态性的结构子类型
DOI:
10.1145/3622836
发表时间:
2023
期刊:
Proceedings of the ACM on Programming Languages
影响因子:
--
作者:
[Tang W]
通讯作者:
Tang W
Handler calculus
处理程序演算
DOI:
--
发表时间:
2021
期刊:
影响因子:
--
作者:
[Sam Lindley]
通讯作者:
Sam Lindley
A Typed Slicing Compilation of the Polymorphic RPC calculus
多态 RPC 演算的类型化切片编译
DOI:
10.1145/3479394.3479406
发表时间:
2021
期刊:
影响因子:
--
作者:
[Choi K]
通讯作者:
Choi K
Soundly Handling Linearity
妥善处理线性
DOI:
10.1145/3632896
发表时间:
2024
期刊:
Proceedings of the ACM on Programming Languages
影响因子:
--
作者:
[Tang, Wenhao, Hillerström, Daniel, Lindley, Sam, Morris, J. Garrett]
通讯作者:
Morris, J. Garrett
共 9 条
海外基金