đŸ“£ Help Shape the Future of UKRI's Gateway to Research (GtR)

We're improving UKRI's Gateway to Research and are seeking your input! If you would be interested in being interviewed about the improvements we're making and to have your say about how we can make GtR more user-friendly, impactful, and effective for the Research and Innovation community, please email gateway@ukri.org.

Effect Handler Oriented Programming

Lead Research Organisation: University of Edinburgh
Department Name: Sch of Informatics

Abstract

In an economy in which the UK software industry added £139 billion of
value to UK GDP in 2018 alone, this fellowship will transform the way
developers write software. By offering a radically new way of
composing and customising programs, I will empower software developers
to build more flexible, maintainable, and robust software.

Computers must interact with the real world. In computer programs real
world effects are pervasive, e.g.: concurrency (performing two
computations at once), distribution (performing computation in
different places), input, output, and probability (e.g. for machine
learning).

Effect handlers are a general programming feature that can be used to
implement all of these effects. They were introduced by theoretical
computer scientists as part of a mathematical model of effects. Thanks
in part to my efforts they now show promise as a practical programming
tool. Interest in effect handlers in industry is growing. For
instance, Facebook's React Fiber, the core of the market-leading React
user interface library for web applications, is directly inspired by
effect handlers, and Uber's Pyro tool for probabilistic programming
and statistical inference makes essential use of effect handlers.

Preliminary results suggest effect handlers have the potential to
support efficient implementations. Nevertheless, existing
implementations are in their infancy and research is required to make
them scale, both in terms of ease of programming and in terms of
performance. I will develop the theory and practice of Effect Handler
Oriented Programming as a uniform foundation for modular and efficient
implementation of effects. I will develop both high-level (for humans)
and low-level (for machines) effect handler designs and
implementations. In collaboration with my project partners I will
ensure that EHOP has direct impact through two key technologies.

+ Hack. I will add effect handlers to Hack, the high-level programming
language in which the Facebook server is written. Hack currently
provides ad hoc support for features such as concurrency and
probabilistic programming, which I will replace by effect handlers,
eliminating the need to maintain several ad hoc features, and
introducing fine-grained control over details such as scheduling
strategies. This will allow more flexible, maintainable, and robust
software to be written in Hack, ultimately improving the user
experience of billions of Facebook users.

+ WebAssembly. I will design and implement an effect handler extension
for WebAssembly, a portable low-level bytecode supported by the top
four browser vendors and designed to supersede JavaScript as the
target language for the web. Currently, languages such as JavaScript
provide a collection of ad hoc overlapping concurrency features. Each
of these is hard-wired and has to be maintained separately. However,
all of them can be implemented with minimal effort using effect
handlers. Rather than hard-wiring and maintaining several ad hoc
features, compiler developers will be able to rely on a single
implementation of effect handlers in WebAssembly. This will enable
more flexible, maintainable, and reliable programming language
implementations, ultimately improving the user experience of billions
of web users.

A "killer app" for effect handlers is concurrency and distribution. A
central aspect of concurrency and distribution is communication. For
communication to be safe, secure, and reliable, all parties must
comply with appropriate protocols. Session types are a nascent
technology for enforcing protocol compliance. Unifying the two main
threads of my research over the last half decade, I will extend the
theory and practice of effect handlers to enable session-typed
concurrency and distribution features to be defined as effect
handlers. Ultimately, this will enable safe, secure, and reliable
communication infrastructure for billions of end users.

Planned Impact

The programme is intended to establish a radically new programming
paradigm centring on effect handlers, and design and build high-level
programming languages and low-level backends to enable their use in
programming practice, as well as establishing theoretical
foundations. It will have a far reaching impact on computing practice,
in the short term (3 years), medium term (6 years) and long term (10
years and beyond).

(1) Who will benefit from this research?

In the short term, the beneficiaries will be the partners of this
programme and those closely associated with them, including DFINITY
(WebAssembly), Facebook (Hack), Jane Street (Multicore OCaml), and
Microsoft (Koka and WebAssembly).

In the medium term, effect handlers will be present as a low-level
abstraction in commercial deployments of WebAssembly and Hack. This
will directly benefit language designers and implementers. Indirectly
this will benefit billions of end users who use the web and Facebook.

In the longer term, effect handlers will be adopted as a high-level
abstraction in mainstream programming languages. This will directly
benefit software developers in general. Indirectly this will benefit
billions of end users.

(2) How will they benefit from this research?

The partners of this programme will benefit from their direct
collaboration, and early access to the ideas and implementations, and
will continue to be at the forefront of the software technologies
exploiting the results of this collaboration.

Language designers and implementers will benefit from an efficient
implementation of effect handlers as a uniform low-level abstraction
that can serve as a target for concurrency features in particular.

Software developers will benefit from a radically new programming
paradigm that supports modular effectful programming. Effect handlers
will empower them to build efficient customised versions of features
such as async/await, coroutines, and probabilistic programming. They
will be able to plug such features together in whatever combination
they choose, and to fine-tune parameters such as scheduling strategies
according to need. Advanced effect type systems and session types will
empower developers to build safe, secure, and reliable software. (Even
for those languages that do not immediately adopt such type systems in
all their glory, "soft" approaches such as gradual typing will offer
many of the same benefits.)

Ultimately, billions of end users (including Facebook and web users)
will benefit from an improved user experience as effect handlers will
enable more robust software and (for instance through systems like
WebAssembly) more predictable performance.

Publications

10 25 50
publication icon
Alvarez-Picallo M (2024) Effect Handlers for C via Coroutines in Proceedings of the ACM on Programming Languages

publication icon
Emrich F (2022) Constraint-based type inference for FreezeML in Proceedings of the ACM on Programming Languages

publication icon
Fowler S (2024) Behavioural Types for Heterogeneous Systems (Position Paper) in Electronic Proceedings in Theoretical Computer Science

publication icon
Fowler S (2023) Separating Sessions Smoothly in Logical Methods in Computer Science

 
Description We have designed WasmFX, an extension to WebAssembly with support for effect handlers that promises to significantly ease the development of robust concurrent web applications using a range of standard programming languages. We have developed a full formal specification of WasmFX. We have a built a fully-mechanised proof of correctness in a proof assistant. We have fully implemented WasmFX in Wasmtime an industrial strength WebAssembly engine. We have added WasmFX support to standard WebAssembly development tools such as Binaryen and Wasmtools. WasmFX has been adopted as the basis for the stack switching extension to the WebAssembly standard. Sam Lindley is co-champion of the stack switching extension along with our project partner Francis McCabe of Google. Google has started implementing WasmFX in their Chrome web browser.

A feature closely related to WasmFX, JSPI, is already close to being deployed in web browsers. Whereas WasmFX supports concurrency across a range of programming language, JSPI (JavaScript Promise Integration) supports concurrency by providing a special interface to the JavaScript programming language used by most existing web applications. The infrastructure to support JSPI relies on the same technology as WasmFX. JSPI is further along in the standardisation process, and Google hopes to deploy it imminently in order to allow legacy desktop applications such as Adobe Photoshop to run efficiently in the web browser.

We solved an open on how to combine effect handlers with linear resources, for which our paper "Soundly Handling Linearity" won a Distinguished Paper award at POPL 2024. One important consequence of this result is that we were able to fix a long-standing type soundness bug in the Links programming language first reported in 2019.

We pioneered the application of Modal Type Theory to practical programming languages. This offers a rather general way of extending the precision of programming languages with so-called "modalities" in order both to make them more robust and to make their performance more predictable. The work we described in the ICFP 2024 paper "Oxidizing OCaml with modal memory management" introduces several such modalities inspired by features of the Rust programming language. In particular, the locality modality, which controls where code is allowed to be run, allows existing code to be made more robust and more reusable without sacrificing performance or predictability. Crucially, modal types can be seamlessly be integrated with existing programming language implementations, as we have done here with the OCaml programming language. Jane Street is already exploiting this feature in their financial trading systems, where predictable performance is critical.

Building on the same modal type theory foundation used for the locality modality, we have developed modal effect types for effect handlers. As of February 2025, this work has been accepted for publication in the OOPSLA 2025 paper "Modal effect types". Effect types are a way of tracking which effects a computation may perform. Usually, in order to support modularity, effect type systems depend on *polymorphism*, a way of allowing a computation to be parameterised by the effects it might perform. Alas, polymorphism adds quite a lot of complexity to the theory and practice. A deep technical insight resulting from our work is that using modal effect types we can write a rather expressive class of programs without any polymorphism at all. This can be seen as a more robust rational reconstruction of ideas from the Frank programming language. In future our work promises to enable the design of significantly more ergonomic effect handler oriented programming languages as well as offering a uniform framework for formally comparing the expressiveness of different effect type systems for effect handler oriented programming languages.

Scoped effects generalise the standard theory of effect handlers in a way that turns out to be important in practice. Many of the practical applications of effect handlers, e.g. involving concurrency. are based on scoped effects. However, whereas the standard theory of algebraic effects on which the theory of effect handlers is based, does not account for scoped effects. We have shown that generalising from the standard theory of algebraic effects to a variant of parameterised algebraic effects, we are able to account for scoped effects. This work is published in the ESOP 2024 paper "Parameterised algebraic theories as scoped effects" and an extended version which as of March 2025 has been accepted for publication in ACM Transactions on Programming Languages and Systems.

There is a mismatch between the practical application of effect handlers to concurrency and distribution and the underlying theory. Algebraic theories of effects allow us to specify the behaviour of a given effect by way of a collection of equations. For some effects such as state the algebraic theory is well understood and it can be easily proved that suitable effect handlers implement the corresponding algebraic theory. We set out to try to identify corresponding algebraic theories for various concurrency features. Alas, this turned out to be considerably more involved than we expected, and we are now working on developing a more satisfactory approach to this problem. Fortunately, we have made substantial progress in this direction by way of parameterised algebraic theories. This will be an important direction to continue to pursue as part of the continuation of the EHOP project.
Exploitation Route The WebAssembly work continues to develop. We are in the process of transferring maintenance of the Wasmtime implementation over to the core maintainers of that engine. Much research remains to be carried out to evaluate which are the most efficient implementation techniques in different environments. Once it is fully standardised, future development will be continued by the maintainers of the WebAssembly engines in the three main web browsers (Apple, Google, and Mozilla).

The work on modal types including modal effect types will be developed further by Jane Street and others as part of the design and implementation of the OCaml programming language. The modal type theory approach should apply to a range of other programming languages. There remains much research to be done on developing both the theory and practice of these ideas.

Our work on scoped effects and reasoning about concurrency provides an important foundation for further work on generalising the theory and practice of effect handlers. This includes developing the theory of higher-order effects, various notions of parameterised algebraic theory, effect handlers with dependent types, and frameworks for reasoning about concurrency and effect handlers.
Sectors Digital/Communication/Information Technologies (including Software)

URL https://effect-handlers.org/
 
Description WasmFX is having an increasing influence on the evolving stack switching proposal for WebAssembly and more immediately on the related JSPI (JavaScript Promise Integration) proposal, which Google plans to deploy imminently in their Chrome web browser driven by customer demand. JSPI does not change the WebAssembly language itself, but makes crucial changes to its interface with JavaScript based on the same stack switching infrastructure that we developed from WasmFX. In particular, it will enable large legacy desktop applications such as Adobe Photoshop to run in the web browser. Work described in the ICFP 2024 paper "Oxidizing OCaml with modal memory management", based on modal type theory, has already had substantial impact on the software systems maintained by our project partner Jane Street. Specifically, the locality modality is pervasive in their codebase and enables them to build more robust and flexible code without sacrificing performance or predictability, both of which are essential in the financial trading systems they operate. This work promises much more far-reaching impact in the future, both through having opened a whole new area of academic research (e.g. a follow-up Distinguished Paper published at POPL 2025 extended the approach to track data-race freedom for concurrent programs), and in terms practical impact on programming practice. Currently it is deployed internally by Jane Street, but members of the core OCaml development team are also now involved. Once it is upstreamed to the official OCaml implementation then many more developers, and in turn users of the more robust software they build, stand to benefit. Moreover, this line of work has also inspired further ongoing work close to the heart of the EHOP project. Specifically, we have been applying a similar framework to design modal effect types, which bring the benefits of modal type theory to the world of effect handlers. The consultancy work Sam Lindley provided to Huawei resulted in the development of ergonomic effect handler libraries for C and C++. Moreover, it has led to effect handlers being incorporated as a core feature in Huawei's Cangjie programming language (the version of Cangjie with effect handlers is not yet released, but it's development is well under way).
First Year Of Impact 2024
Sector Digital/Communication/Information Technologies (including Software)
Impact Types Economic

 
Description EPOCH: Effectful Programming On Capability Hardware
Amount £293,071 (GBP)
Organisation Huawei Technologies Research and Development UK Ltd 
Sector Private
Country United Kingdom
Start 08/2023 
End 03/2026
 
Description Compiling Links to WebAssembly 
Organisation Northeastern University - Boston
Country United States 
Sector Academic/University 
PI Contribution We have implemented two prototype WebAssembly backends for a tiny subset of the Links programming language. One of these is direct. The other targets the notwasm language used by the jankscripten toolchain (https://github.com/arjunguha/jankscripten).
Collaborator Contribution Northeastern have helped us with interfacing with the jankscripten toolchain (https://github.com/arjunguha/jankscripten).
Impact We have implemented two prototype WebAssembly backends for a tiny subset of the Links programming language. One of these is direct. The other targets the notwasm language used by the jankscripten toolchain (https://github.com/arjunguha/jankscripten).
Start Year 2021
 
Description Effect handlers consultancy 
Organisation Huawei Technologies Research and Development UK Ltd
Country United Kingdom 
Sector Private 
PI Contribution I provided consultancy services to Huawei's Programming Languages Research Laboratory in Edinburgh on effect handlers. As well as consulting on Huawei's internal projects, I have guided their development of open-source effect handlers libraries for C and C++. I consulted on the design and implementation of effect handlers in the Cangjie programming language.
Collaborator Contribution Confidential.
Impact Dan R. Ghica, Sam Lindley, Marcos Maroñas Bravo, and Maciej Piróg. High-level effect handlers in C++. Proc. ACM Program. Lang., 6(OOPSLA2):1639-1667, 2022. Mario Alvarez-Picallo, Teodoro Freund, Dan R. Ghica, Sam Lindley. Effect Handlers for C via Coroutines. Proc. ACM Program. Lang. 8(OOPSLA2): 2462-2489 (2024). Effect handlers are now implemented as part of the Cangjie programming language.
Start Year 2021
 
Description Effect handlers survey 
Organisation University of Ljubljana
Department Faculty of Mathematics and Physics
Country Slovenia 
Sector Academic/University 
PI Contribution Matija Pretnar (Project partner at the University of Ljubljana, and co-inventor of effect handlers) and Sam Lindley are jointly preparing a survey paper on effect handlers.
Collaborator Contribution Matija Pretnar (Project partner at the University of Ljubljana, and co-inventor of effect handlers) and Sam Lindley are jointly preparing a survey paper on effect handlers.
Impact n/a
Start Year 2024
 
Description Extending WebAssembly with support for effect handlers 
Organisation Indian Institute of Technology Madras
Country India 
Sector Academic/University 
PI Contribution Design, documentation, and implementation in the reference interpreter for WasmFX, an extension of WebAssembly with support for effect handlers (aka "typed continuations"). Organising regular meetings to coordinate the work. Recently, we have begun work on implementing WasmFX for Wasmtime, the primary non-browser production implementation of effect handlers, which is, e.g., central to the operation of the Fastly content delivery network.
Collaborator Contribution DFINITY have helped considerably with the specification and implementation of the reference interpreter. Ljubljana are focusing on developing a mechanised correctness proof for the extended specification. IIT Madras are building an implementation of the specification as an extension to the Wasmtime implementation of WebAssembly. Microsoft have built a WebAssembly backend for the Koka programming language, which is being extended to support the effect handler extensions. Northeastern have helped with implementing WasmFX for Wasmtime. All partners are fully involved in the design process. Northeastern joined the collaboration in 2022. They helped with the initial Wasmtime implementation and are not focusing on compiling high-level languages such as Go to WasmFX. Daniel Hillerström left my team in 2023 and took up a position at Huawei Research Center Zurich, where he continues to contribute to the project, and leads the Wasmtime development.
Impact Design, documentation, and implementation in the reference interpreter for an extension of WebAssembly with support for effect handlers (aka "typed continuations"). Implementation of WasmFX for Wasmtime - a side-effect of this work was an implementation, in collaboration with other Wasmtime developers at Fastly, of the function references extension for Wasmtime. A paper documenting the design and implementation of WasmFX was published at OOPSLA 2023: Luna Phipps-Costin, Andreas Rossberg, Arjun Guha, Daan Leijen, Daniel Hillerström, K. C. Sivaramakrishnan, Matija Pretnar, and Sam Lindley. Continuing WebAssembly with effect handlers. Proc. ACM Program. Lang., 7(OOPSLA2):460-485, 2023.
Start Year 2021
 
Description Extending WebAssembly with support for effect handlers 
Organisation Microsoft Research
Country Global 
Sector Private 
PI Contribution Design, documentation, and implementation in the reference interpreter for WasmFX, an extension of WebAssembly with support for effect handlers (aka "typed continuations"). Organising regular meetings to coordinate the work. Recently, we have begun work on implementing WasmFX for Wasmtime, the primary non-browser production implementation of effect handlers, which is, e.g., central to the operation of the Fastly content delivery network.
Collaborator Contribution DFINITY have helped considerably with the specification and implementation of the reference interpreter. Ljubljana are focusing on developing a mechanised correctness proof for the extended specification. IIT Madras are building an implementation of the specification as an extension to the Wasmtime implementation of WebAssembly. Microsoft have built a WebAssembly backend for the Koka programming language, which is being extended to support the effect handler extensions. Northeastern have helped with implementing WasmFX for Wasmtime. All partners are fully involved in the design process. Northeastern joined the collaboration in 2022. They helped with the initial Wasmtime implementation and are not focusing on compiling high-level languages such as Go to WasmFX. Daniel Hillerström left my team in 2023 and took up a position at Huawei Research Center Zurich, where he continues to contribute to the project, and leads the Wasmtime development.
Impact Design, documentation, and implementation in the reference interpreter for an extension of WebAssembly with support for effect handlers (aka "typed continuations"). Implementation of WasmFX for Wasmtime - a side-effect of this work was an implementation, in collaboration with other Wasmtime developers at Fastly, of the function references extension for Wasmtime. A paper documenting the design and implementation of WasmFX was published at OOPSLA 2023: Luna Phipps-Costin, Andreas Rossberg, Arjun Guha, Daan Leijen, Daniel Hillerström, K. C. Sivaramakrishnan, Matija Pretnar, and Sam Lindley. Continuing WebAssembly with effect handlers. Proc. ACM Program. Lang., 7(OOPSLA2):460-485, 2023.
Start Year 2021
 
Description Extending WebAssembly with support for effect handlers 
Organisation Northeastern University - Boston
Country United States 
Sector Academic/University 
PI Contribution Design, documentation, and implementation in the reference interpreter for WasmFX, an extension of WebAssembly with support for effect handlers (aka "typed continuations"). Organising regular meetings to coordinate the work. Recently, we have begun work on implementing WasmFX for Wasmtime, the primary non-browser production implementation of effect handlers, which is, e.g., central to the operation of the Fastly content delivery network.
Collaborator Contribution DFINITY have helped considerably with the specification and implementation of the reference interpreter. Ljubljana are focusing on developing a mechanised correctness proof for the extended specification. IIT Madras are building an implementation of the specification as an extension to the Wasmtime implementation of WebAssembly. Microsoft have built a WebAssembly backend for the Koka programming language, which is being extended to support the effect handler extensions. Northeastern have helped with implementing WasmFX for Wasmtime. All partners are fully involved in the design process. Northeastern joined the collaboration in 2022. They helped with the initial Wasmtime implementation and are not focusing on compiling high-level languages such as Go to WasmFX. Daniel Hillerström left my team in 2023 and took up a position at Huawei Research Center Zurich, where he continues to contribute to the project, and leads the Wasmtime development.
Impact Design, documentation, and implementation in the reference interpreter for an extension of WebAssembly with support for effect handlers (aka "typed continuations"). Implementation of WasmFX for Wasmtime - a side-effect of this work was an implementation, in collaboration with other Wasmtime developers at Fastly, of the function references extension for Wasmtime. A paper documenting the design and implementation of WasmFX was published at OOPSLA 2023: Luna Phipps-Costin, Andreas Rossberg, Arjun Guha, Daan Leijen, Daniel Hillerström, K. C. Sivaramakrishnan, Matija Pretnar, and Sam Lindley. Continuing WebAssembly with effect handlers. Proc. ACM Program. Lang., 7(OOPSLA2):460-485, 2023.
Start Year 2021
 
Description Extending WebAssembly with support for effect handlers 
Organisation University of Ljubljana
Country Slovenia 
Sector Academic/University 
PI Contribution Design, documentation, and implementation in the reference interpreter for WasmFX, an extension of WebAssembly with support for effect handlers (aka "typed continuations"). Organising regular meetings to coordinate the work. Recently, we have begun work on implementing WasmFX for Wasmtime, the primary non-browser production implementation of effect handlers, which is, e.g., central to the operation of the Fastly content delivery network.
Collaborator Contribution DFINITY have helped considerably with the specification and implementation of the reference interpreter. Ljubljana are focusing on developing a mechanised correctness proof for the extended specification. IIT Madras are building an implementation of the specification as an extension to the Wasmtime implementation of WebAssembly. Microsoft have built a WebAssembly backend for the Koka programming language, which is being extended to support the effect handler extensions. Northeastern have helped with implementing WasmFX for Wasmtime. All partners are fully involved in the design process. Northeastern joined the collaboration in 2022. They helped with the initial Wasmtime implementation and are not focusing on compiling high-level languages such as Go to WasmFX. Daniel Hillerström left my team in 2023 and took up a position at Huawei Research Center Zurich, where he continues to contribute to the project, and leads the Wasmtime development.
Impact Design, documentation, and implementation in the reference interpreter for an extension of WebAssembly with support for effect handlers (aka "typed continuations"). Implementation of WasmFX for Wasmtime - a side-effect of this work was an implementation, in collaboration with other Wasmtime developers at Fastly, of the function references extension for Wasmtime. A paper documenting the design and implementation of WasmFX was published at OOPSLA 2023: Luna Phipps-Costin, Andreas Rossberg, Arjun Guha, Daan Leijen, Daniel Hillerström, K. C. Sivaramakrishnan, Matija Pretnar, and Sam Lindley. Continuing WebAssembly with effect handlers. Proc. ACM Program. Lang., 7(OOPSLA2):460-485, 2023.
Start Year 2021
 
Description Next generation of effect handlers for Multicore OCaml 
Organisation Jane Street Europe
Country United Kingdom 
Sector Private 
PI Contribution We hold regular meetings with Jane Street to discuss the future design of effect handlers in the Multicore OCaml programming language. We have developed a library to support multishot continuations in Multicore OCaml. Inspired by other work on applying modal type theory, we developed modal effect types with Jane Street. This work has just been accepted for publication at OOPSLA 2025. We extended modal effect types to support named handlers. This has enabled us to formally compare the expressive power of effect handlers in the Koka and Effekt programming languages. We have submitted this work to ICFP 2025.
Collaborator Contribution Jane Street attend regular meetings with us to discuss the future design of effect handlers in the Multicore OCaml programming language. Jane Street contributed many ideas about different effect type systems for effect handlers and produced several draft proposals for a revised semantics for effect handlers. Inspired by other work on applying modal type theory, we developed modal effect types with Jane Street.
Impact * Modal effect types. Wenhao Tang, Leo White, Stephen Dolan, Daniel Hillerström, Sam Lindley, Anton Lorenzen. To appear at OOPSLA 2025. * Rows and capabilities as modal effects with names. Wenhao Tang and Sam Lindley. Submitted to ICFP 2025.
Start Year 2021
 
Description Scoped effects as parameterised algebraic theories 
Organisation Imperial College London
Department Department of Computing
Country United Kingdom 
Sector Academic/University 
PI Contribution Cristina Matache is leading a project to establish the relationship between parameterised algebraic theories, a generalisation of standard first order algebraic theories, and scoped effects, a generalisation of standard effect handlers. We have so far discovered that scoped effects can be cast as a special kind of parameterised algebraic theory in which parameters are linear and ordered, providing a fresh perspective on scoped effects. Cristina Matache carried out the bulk of the technical development and writing of the initial paper which was published at ESOP 2024. Subsequently we were invited to submit an extended paper to ACM Transactions on Programming Languages and Systems (accepted February 2025).
Collaborator Contribution All partners brought their expertise to the table, guiding the exploration of the theory, proofs, and writing of the papers. Sam Staton (Oxford) and Sean Moss (Birmingham) are experts on parameterised algebraic theories. Nicolas Wu and Zhixuan Yang (Imperial) are experts on scoped effects.
Impact * doi: 10.1007/978-3-031-57262-3_1 * Scoped effects as parameterized algebraic theories Cristina Matache, Sam Lindley, Sean Moss, Sam Staton, Nicolas Wu, and Zhixuan Yang To appear in ACM Transactions on Programming Languages and Systems (accepted February 2025).
Start Year 2024
 
Description Scoped effects as parameterised algebraic theories 
Organisation University of Birmingham
Department School of Computer Science
Country United Kingdom 
Sector Academic/University 
PI Contribution Cristina Matache is leading a project to establish the relationship between parameterised algebraic theories, a generalisation of standard first order algebraic theories, and scoped effects, a generalisation of standard effect handlers. We have so far discovered that scoped effects can be cast as a special kind of parameterised algebraic theory in which parameters are linear and ordered, providing a fresh perspective on scoped effects. Cristina Matache carried out the bulk of the technical development and writing of the initial paper which was published at ESOP 2024. Subsequently we were invited to submit an extended paper to ACM Transactions on Programming Languages and Systems (accepted February 2025).
Collaborator Contribution All partners brought their expertise to the table, guiding the exploration of the theory, proofs, and writing of the papers. Sam Staton (Oxford) and Sean Moss (Birmingham) are experts on parameterised algebraic theories. Nicolas Wu and Zhixuan Yang (Imperial) are experts on scoped effects.
Impact * doi: 10.1007/978-3-031-57262-3_1 * Scoped effects as parameterized algebraic theories Cristina Matache, Sam Lindley, Sean Moss, Sam Staton, Nicolas Wu, and Zhixuan Yang To appear in ACM Transactions on Programming Languages and Systems (accepted February 2025).
Start Year 2024
 
Description Scoped effects as parameterised algebraic theories 
Organisation University of Oxford
Department Department of Computer Science
Country United Kingdom 
Sector Academic/University 
PI Contribution Cristina Matache is leading a project to establish the relationship between parameterised algebraic theories, a generalisation of standard first order algebraic theories, and scoped effects, a generalisation of standard effect handlers. We have so far discovered that scoped effects can be cast as a special kind of parameterised algebraic theory in which parameters are linear and ordered, providing a fresh perspective on scoped effects. Cristina Matache carried out the bulk of the technical development and writing of the initial paper which was published at ESOP 2024. Subsequently we were invited to submit an extended paper to ACM Transactions on Programming Languages and Systems (accepted February 2025).
Collaborator Contribution All partners brought their expertise to the table, guiding the exploration of the theory, proofs, and writing of the papers. Sam Staton (Oxford) and Sean Moss (Birmingham) are experts on parameterised algebraic theories. Nicolas Wu and Zhixuan Yang (Imperial) are experts on scoped effects.
Impact * doi: 10.1007/978-3-031-57262-3_1 * Scoped effects as parameterized algebraic theories Cristina Matache, Sam Lindley, Sean Moss, Sam Staton, Nicolas Wu, and Zhixuan Yang To appear in ACM Transactions on Programming Languages and Systems (accepted February 2025).
Start Year 2024
 
Description WebAssembly stack-switching proposal 
Organisation Google
Country United States 
Sector Private 
PI Contribution Sam Lindley (Edinburgh) and Francis McCabe (Google) are the co-champions of the "stack-switching" proposal for WebAssembly. Stack-switching is an implementation technique for effect handlers / typed continuations. I meet regularly with my co-champion and the WebAssembly stack-switching subgroup. Our work with other collaborators on extending WebAssembly with effect handlers and adding a WebAssembly backend feeds into this process.
Collaborator Contribution As well as helping to coordinate the formal proposal process and chairing the stack-switching subgroup, Google is developing stack-switching extensions as part of their implementation of WebAssembly in the V8 engine (used by Chrome, Microsoft Edge, and other browsers). Google has implement restricted support for stack-switching in V8 in order to support JavaScript Promise Integration (JSPI) a design that allows WebAssembly to smoothly interoperate with JavaScript code that makes use of Javascript promises. This functionality has undergone origin trials allowing commercial application developers to try out their applications with JSPI and is due to be rolled out imminently. Several key clients of Google (including Adobe and Autodesk) are relying on JSPI in order to be able to deploy their industry standard desktop applications in the web browser.
Impact Creation of the stack-switching subgroup. A full program of talks from a range of parties interested in the stack-switching proposal. JSPI implementation in V8.
Start Year 2021
 
Title Links 
Description Links is a functional programming language designed to make web programming easier. Links eases building interactive web applications with significant client- and server-side components. We have extended the core language of Links with effect handlers and improved the type-and-effect system for effect handler oriented programming. 
Type Of Technology Webtool/Application 
Year Produced 2021 
Open Source License? Yes  
Impact N/A 
URL https://links-lang.org
 
Title Multicont: continuations with multi-shot semantics in OCaml 
Description This library provides a thin abstraction on top of OCaml's regular linear continuations that enables programming with multi-shot continuations, i.e. continuations that can be applied more than once. 
Type Of Technology Webtool/Application 
Year Produced 2022 
Open Source License? Yes  
Impact It has been used to demonstrate programming with effect handlers, e.g. see "effects-examples". It has sparked discussions about the design and implementation of native multi-shot continuations in OCaml (see https://github.com/ocaml/ocaml/pull/10894). 
URL https://github.com/ocaml-multicore/effects-examples
 
Title Wasm reference interpreter extended with effect handlers 
Description We have extended the WebAssembly reference interpreter with the primitives of our stack switching proposal. 
Type Of Technology Webtool/Application 
Year Produced 2021 
Open Source License? Yes  
Impact The reference interpreter is a mandatory part of our stack switching proposal for WebAssembly. 
 
Title Wasmtime extended with effect handlers 
Description Wasmtime is the primary production WebAssembly runtime implemented outside the browser. It is for instance central to the operation of the Fastly content delivery network. We have extended WebAssembly to support the WasmFX extension. Our initial implementation builds on the existing Wasmtime fibers API. In future we will explore lower-level implementations, which we expect to be more flexible and higher performance. This work will open up many more possiblities, by providing a realistic backend for a range of different source languages that make essential use of first-class control flow features. We made essential use of the implementation to provide the first benchmarks for WasmFX which we described in a paper published at the OOPSLA 2023 conference: "Continuing WebAssembly with effect handlers". Subsequently, the implementation has been developed significantly and made much more robust. The initial implementation cut corners by building on top of the existing Wasmtime fiber library. The latest version as of early 2025 is fully native, performs significantly better, and smoothly interfaces with other features such as stack traces and garbage collection. It is in the process of being upstreamed to the release branch of Wasmtime, meaning that all Wasmtime users will be able to use it directly rather than having to download an experimental branch. 
Type Of Technology Webtool/Application 
Year Produced 2023 
Open Source License? Yes  
Impact This is the first implementation of WasmFX in a production implementation. It has allowed us to perform realistic benchmarks and push forward the standardisation process for adding WasmFX to the WebAssembly process. A prerequisite for implementing effect handlers was to implement other missing features in Wasmtime - notably the function references extension to WebAssembly. 
URL https://github.com/effect-handlers/wasmtime
 
Title cpp-effect library for effect handlers in C++ 
Description With collaborators at Huawei's Edinburgh Programming languages laboratory we designed, implemented, and evaluated the first high-level C++ library for effect handlers. The library builds on top of the boost.context fibers library. (I've classified this under "Webtool/Application", but perhaps "Software" would make more sense as this is a library rather than an application. I've done this because the researchfish interface is broken and doesn't let me fill in the relevant fields if I select "Software" - instead it demands a doi.) 
Type Of Technology Webtool/Application 
Year Produced 2022 
Open Source License? Yes  
Impact This work led to the publication of a paper at the OOPSLA 2022 conference / PACMPL journal. The work illustrates that C++ can support effect-handler oriented programming ergonomically in a fashion that smoothly integrates with an idiomatic C++ programming style and performs reasonably well in practice - without paying particular attention to optimisation. It demonstrates that effect handlers make perfect sense as an abstraction for imperative source programming languages - e.g. schedulers may be implemented using a standard loop rather than the tail-recursive implementation typical of much of the existing work on effect handlers, which is mostly geared towards functional programming languages. Our benchmark results also show that the performance is competive even for examples for which effect handlers are known to be suboptimal - e.g. implementing a type loop using a simple generator abstraction. Moreover, our implementation of a generator that traverses a tree scales linearly with the size of the tree, whereas an equivalent implementation using symmetric C++ coroutines is quadratic and performs much worse than the effect handler version in practice. This work is proving helpful as concrete evidence for convincing companies (e.g. Huawei) and standardisation bodies (e.g. the WebAssembly Community Group) that effect handlers are a viable foundation for building concurrency features in practice. 
URL https://github.com/maciejpirog/cpp-effects
 
Description An algebraic theory of named threads (work in progress) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Cristina Matche presented ongoing work on presenting a theory of named threads as a parameterised algebraic theory. The talk spawned plenty of feedback and suggestions on how to justify the algebraic theory by relating it to other known semantic models.
Year(s) Of Engagement Activity 2024
URL https://popl24.sigplan.org/home/galop-2024#program
 
Description Asymptotic speedup via effect handlers 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach Regional
Primary Audience Professional Practitioners
Results and Impact Daniel Hillerström presented work on Asymptotic speedup via effect handlers. This is based on recent non-trivial extensions to theoretical work previously presented at ICFP 2020, and now included in an extended version of that work submitted to a special issue of the Journal of Functional Programming.
Year(s) Of Engagement Activity 2022
URL https://www.gla.ac.uk/schools/computing/research/researchsections/fata-section/
 
Description Automatic Differentiation via Effects and Handlers in OCaml (ML Family Workshop 2024) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Jesse Sigal presented practical work on automatic differentiation using effects and handlers implemented in OCaml.
Year(s) Of Engagement Activity 2024
URL https://icfp24.sigplan.org/home/mlworkshop-2024
 
Description Categorical logical relations for effects and handlers (CATNIP 6) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach National
Primary Audience Professional Practitioners
Results and Impact Jesse Sigal gave a talk on categorical logical relations for effects and handlers based on work from his thesis continued during the EHOP project.
Year(s) Of Engagement Activity 2025
URL https://sites.google.com/view/catniporg/home
 
Description Composing UNIX with Effect Handlers: A Case Study in Effect Handler Oriented Programming (Huawei Research Centre, Zurich) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Other audiences
Results and Impact This was a talk given during a visit to the Huawei Research Centre in Zurich, about how to construct the essence of a UNIX operating system using effect handlers. This work serves a case study for practical programming with effect handlers, as well as providing insight into how we may decompose a complex monolithic system like UNIX into a granular set of small effect handlers, that when composed yield the semantics of UNIX. Following this talk Daniel Hillerström was offered a job as a senior researcher, which he has subsequently accepted.
Year(s) Of Engagement Activity 2022
 
Description Concrete categories and higher-order recursion 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Other audiences
Results and Impact Cristina Matache presented here work on Concrete categories and higher-order recursion to the LICS 2022 conference. It has applications to probability, differentiability, and full abstraction.
Year(s) Of Engagement Activity 2022
URL https://lics.siglog.org/lics22/
 
Description Continuing WebAssembly with effect handlers (OOPSLA 2023) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact This was the talk associated with the OOPSLA 2023 paper. It was delivered by Luna Phipps-Costin, a coauthor and PhD student at Northeastern. This is the first peer-reviewed publication that documents the progress on the design and implementation of WasmFX - a central contribution of the EHOP project. It includes a high-level description of the specification, the decisions motivating the design, and preliminary benchmarks of the implementation using Wasmtime.
Year(s) Of Engagement Activity 2023
URL https://2023.splashcon.org/track/splash-2023-oopsla
 
Description Continuing stack switching in Wasmtime (WAW 2025) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Frank Emrich reported on the status of stack-switching based on WasmFX in Wasmtime at the WebAssembly Workshop, colocated with POPL 2025. Several other speakers were working in related areas and expressed a desire to be able to exploit this work in future.
Year(s) Of Engagement Activity 2025
URL https://popl25.sigplan.org/home/waw-2025
 
Description Dagstuhl Seminar 21292 on Scalable Handling of Effects 
Form Of Engagement Activity Participation in an activity, workshop or similar
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Sam Lindley co-organised a week-long meeting on Scalable Handling of Effects. It brought together international researchers and industrial participants. It was held as a prestigious Dagstuhl Seminar. Initially it was supposed to be held in 2020, but was postponed to July 2021 because ofCovid-19. Due to the on-going pandemic it was held as a virtual event.

Algebraic effects and effect handlers are currently enjoying significant interest in both academia and industry as a modular programming abstraction for expressing and incorporating user-defined computational effects in programming languages. For example, there are a number of effect handler oriented languages in development (such as Eff, Frank, and Koka); there exist effect handler libraries for mainstream languages (such as C and Java); effect handlers are a key part of languages such as Multicore OCaml (and indeed they are due to appear in the production release of OCaml next year); effect handlers are being increasingly used in statistical probabilistic programming (such as Uber's Pyro tool); and proposals are in the works to include effect handlers in new low-level languages (such as WebAssembly). While effect handlers have solid mathematical foundations and have been extensively experimented in prototype languages and on smaller examples, enabling effect handlers to scale still requires tackling some hard problems. To this end, this Dagstuhl Seminar 21292 "Scalable Handling of Effects" focused on addressing the following key problem areas for scalability: Safety, Modularity, Interoperability, Legibility, and Efficiency.

For details of concrete outcomes see the summary here: https://www.dagstuhl.de/21292
Year(s) Of Engagement Activity 2021
URL https://www.dagstuhl.de/21292
 
Description Dagstuhl Seminar 21372 on Behavioural Types: Bridging Theory and Practice 
Form Of Engagement Activity Participation in an activity, workshop or similar
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Sam Lindley co-organised a week-long meeting on Behavioural Types: Bridging Theory and Practice. It brought together international researchers and industrial participants. It was held as a prestigious Dagstuhl Seminar. Due to the on-going pandemic it was held as a hybrid event (12 people, including Sam Lindley, attended on-site at Schloss Dagstuhl in Germany, and 28 people attended virtually).

Behavioural types specify the way in which software components interact with one another. Unlike data types (which describe the structure of data), behavioural types describe communication protocols, and their verification ensures that programs do not violate such protocols. The behavioural types research community has developed a flourishing literature on communication-centric programming, exploring many directions. One of the most studied behavioural type systems are session types, introduced by Honda et al. in the '90s, and awarded with prizes for their influence in the past 20 and 10 years (by the ESOP and POPL conferences, respectively). Other varieties of behavioural types include typestate systems, choreographies, and behavioural contracts; research on verification techniques covers the spectrum from fully static verification at compile-time to fully dynamic verification at run-time.

In the last decade, research on behavioural types has shifted emphasis towards practical applications, using both novel and existing programming languages (e.g., Java, Python, Go, C, Haskell, OCaml, Erlang, Scala, Rust). Yet, despite the vibrant community and the stream of new results, the use of behavioural types for mainstream software development and verification remains limited.

The Dagstuhl Seminar brought together academic and industry experts who work in the areas of concurrency, distributed systems, and behavioural types. The goal was to explore how best to bridge the gap between behavioural types theory and mainstream software development practice.

The aim was to make tangible progress on at least the following key topics:

* Failure handling: how to describe and handle errors and unexpected behaviours of distributed system components
* Asynchronous communication: how to ensure the correct handling of issues like packet loss and time constraints
* Dynamic reconfiguration: how to correctly design and implement applications with dynamic communication topology, e.g., based on the ubiquitous pub/sub model.

For details of concrete outcomes see the summary here: https://www.dagstuhl.de/21372
Year(s) Of Engagement Activity 2021
URL https://www.dagstuhl.de/21372
 
Description Dagstuhl Seminar 23101 on Foundations of WebAssembly 
Form Of Engagement Activity Participation in an activity, workshop or similar
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Sam Lindley and Daniel Hillerström were invited to attend a week-long meeting on Foundations of WebAssembly. It brought together international researchers and industrial participants. It was held as a prestigious Dagstuhl Seminar.

Several EHOP project partners also attended, and we used this as an opportunity to make progress on preparing an OOPSLA 2023 submission on WasmFX.

Matija Pretnar was in attendance. We planned a program of work for a visit to Edinburgh from April - July 2023.

We helped to establish a new initiative to build a new specification language for WebAssembly.
Year(s) Of Engagement Activity 2023
URL https://www.dagstuhl.de/en/seminars/seminar-calendar/seminar-details/23101
 
Description Dagstuhl Seminar 24051 on Next Generation Protocols for Heterogeneous Systems 
Form Of Engagement Activity Participation in an activity, workshop or similar
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Sam Lindley was invited to attend a week-long meeting on Next Generation Protocols for Heterogeneous Systems. It brought together international researchers and industrial participants. It was held as a prestigious Dagstuhl Seminar. One direct outcome of the meeting arose from a breakout session in which I took part. We wrote and submitted a position paper on "Behavioural types for heterogeneous systems" immediately following the meeting.
Year(s) Of Engagement Activity 2024
URL https://www.dagstuhl.de/en/seminars/seminar-calendar/seminar-details/24051
 
Description Deriving forward and reverse mode AD (blogpost) 
Form Of Engagement Activity Engagement focused website, blog or social media channel
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Jesse Sigal wrote a blogpost summarising the mathematics behind automatic differentiation which inspired his work on using effect handlers for automatic differentiation.
Year(s) Of Engagement Activity 2024
URL https://www.jsigal.com/theory/deriving-forward-and-reverse-mode-ad/
 
Description EHOP workshop (The Burn, July 2023) 
Form Of Engagement Activity Participation in an activity, workshop or similar
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact This was the first EHOP Workshop. It brought together the EHOP team, project partners, and potential future collaborators. It was held for two days at The Burn, Glenesk, Scotland. The workshop involved a series of presentations and breakout sessions and revealed a number of new opportunities and directions for research.

The original intention was to hold one in-person workshop in the first year of the project and another towards the end of the first four years of the project. The Covid pandemic meant we had to change the original plan. This workshop was held in Year 3. The tentative future plan is to hold further workshops in Year 5 and Year 7 (assuming successful renewal of the project).
Year(s) Of Engagement Activity 2023
URL https://effect-handlers.org/events/ehop-workshop2023.html
 
Description Effect Handler Oriented Programming (Huawei-Edinburgh lab 2022) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach Regional
Primary Audience Industry/Business
Results and Impact This talk was given at the Huawei-Edinburgh joint lab technical seminar series in December 2021. This talk has character of a tutorial as it introduces the concept of effect handler oriented programming through a series of examples.
Year(s) Of Engagement Activity 2021
URL https://blogs.ed.ac.uk/he-lab/2020/12/01/technical-talk-effect-handler-oriented-programming/
 
Description Effect handler oriented programming (Huawei strategy and technology workshop) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Industry/Business
Results and Impact Sam Lindley presented the EHOP project to an audience of Huawei researchers, developers, and prominent academic researchers working in the field of programming languages.

A somewhat tangential, but potentially deeply significant, outcome arose from a discussion with another one of the attendees - Professor Sukyoung Ryu, head of the School of Computing at KAIST, Korea. Sukyoung Ryu leads a highly impactful project on a scalable analysis framework for JavaScript. Her tools are now deeply embedded in the standardisation process for JavaScript. Based on his WebAssembly experience, Sam Lindley suggested that a similar approach could be fruitful for WebAssembly too. This directly led to her being invited to a Dagstuhl seminar on Foundations of WebAssembly (March 2023), also attended by Sam Lindley, Daniel Hillerström, and several of the EHOP project partners, and the beginnings of a new project to build a new specification language for WebAssembly.
Year(s) Of Engagement Activity 2022
 
Description Effect handler oriented programming (OPLSS 2022 Summer School) 
Form Of Engagement Activity Participation in an activity, workshop or similar
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Postgraduate students
Results and Impact Sam Lindley taught a 4-lecture summer school course on Effect Handler Oriented Programming at the prestigious Oregon Programming Languages Summer School (OPLSS). This is primarily targeted at PhD students, but undergraduates, other researchers, and people from industry also attend. Strong connections were drawn between this course and a complementary OPLSS course taught by Steve Zdancewic on formal verification of monadic computations.
Year(s) Of Engagement Activity 2022
URL https://www.cs.uoregon.edu/research/summerschool/summer22/topics.php
 
Description Effect handler oriented programming (SPLV 2022) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Postgraduate students
Results and Impact Sam Lindley gave a talk on effect handler oriented programming at the Scottish Programming Languages and Verification summer school (SPLV 2022) held at Heriot-Watt University, Scotland. This is an event held annually in Scotland with participants (primarily PhD students) from all over the world.
Year(s) Of Engagement Activity 2022
URL https://www.macs.hw.ac.uk/splv/splv-2022/
 
Description Effect handlers for WebAssembly (MFPS 2022 invited talk) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Other audiences
Results and Impact This was an invited talk presented as part of a special session on Algebraic Effects at the MFPS 2022 conference held at Cornell University. Sam Lindley presented our WasmFX work on adding effect handlers to WebAssembly including the design, implementation, and formal semantics. The talk is recorded on YouTube.
Year(s) Of Engagement Activity 2022
URL https://www.cs.cornell.edu/mfps-2022/
 
Description Effect handlers for WebAssembly (Newton Institute, 2022) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact This was a talk presented at a meeting at the Newton Institute in Cambridge on formalising WebAssembly. Sam Lindley presented our WasmFX work on adding effect handlers to WebAssembly including the design, implementation, and formal semantics. The talk led to a lively discussion and changed the direction of another research project presented at the meeting. As a direct result of this talk Amal Ahmed decided to generalise her Capability Wasm system (which tracks capabilities in Wasm in order to enforce safety properties) to a new system called Rich Wasm in order to support richer type systems, in particular to support effect type systems providing stronger guarantees on top of WasmFX.
Year(s) Of Engagement Activity 2022
URL http://talks.cam.ac.uk/talk/index/176900
 
Description Executable Universal Composability with Effect Handlers (ProTeCS 2024) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Jesse Sigal presented work on using effect handlers to abstract over executable cryptographic protocols based around universal composability at the ProTeCS workshop. This work has led to a new research project funded by the Edinburgh IO Research Hub which is expected to start soon.
Year(s) Of Engagement Activity 2024
URL https://protecs-workshop.gitlab.io/2024/
 
Description Haskell Interlude podcast #61 
Form Of Engagement Activity A broadcast e.g. TV/radio/film/podcast (other than news/press)
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Sam Lindley was interviewed on the Haskell Interlude podcast. This is a podcast whose theme is the Haskell Programming language. Amongst other things, Sam talked about effects and handlers in Haskell.
Year(s) Of Engagement Activity 2025
URL https://haskell.foundation/podcast/
 
Description High-level effect handlers in C++ (Huawei Joint Lab Workshop, 2023) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Other audiences
Results and Impact This was a reprise of the OOPSLA 2022 talk for the Huawei Joint Lab meeting. It was part of a series of talks relating to effect handlers and effect handler-oriented programming, which Huawei is showing increasing interest in as a direct result of EHOP and the consultancy services Sam Lindley provides to Huawei on effect handlers.
Year(s) Of Engagement Activity 2023
URL https://blogs.ed.ac.uk/he-lab/2023/01/05/january-2023-workshop-schedule/
 
Description High-level effect handlers in C++ (OOPSLA 2022) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Other audiences
Results and Impact This was the talk associated with the OOPSLA 2022 paper. With collaborators at Huawei's Edinburgh Programming languages laboratory we designed, implemented, and evaluated the first high-level C++ library for effect handlers.

This work illustrates that C++ can support effect-handler oriented programming ergonomically in a fashion that smoothly integrates with an idiomatic C++ programming style and performs reasonably well in practice - without paying particular attention to optimisation. Our benchmark results also show that the performance is competive even for examples for which effect handlers are known to be suboptimal - e.g. implementing a type loop using a simple generator abstraction. Moreover, our implementation of a generator that traverses a tree scales linearly with the size of the tree, whereas an equivalent implementation using symmetric C++ coroutines is quadratic and performs much worse than the effect handler version in practice.

The presentation was delivered in an effect handlers session with two other talks in which there were close connections between all three talks. In particular, all included a notion of named handlers. The talk led to an engaging discussion with the audience and planned visits to Edinburgh from the authors of the other papers.
Year(s) Of Engagement Activity 2022
URL https://2022.splashcon.org/track/splash-2022-oopsla
 
Description IFIP WG2.1 Meeting #80 (Oxford, July 2023) 
Form Of Engagement Activity A formal working group, expert panel or dialogue
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Sam Lindley attended IFIP WG2.1 Meeting #80 in Oxford.
Year(s) Of Engagement Activity 2023
URL https://ifipwg21wiki.cs.kuleuven.be/wiki/index.php/Oxford2023
 
Description IFIP WG2.1 Meeting #81 (Neustadt an der Weinstrasse, April 2024) 
Form Of Engagement Activity A formal working group, expert panel or dialogue
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Sam Lindley attended IFIP WG2.1 Meeting #81 in Neustadt an der Weinstrasse.
Year(s) Of Engagement Activity 2024
URL https://ifipwg21wiki.cs.kuleuven.be/wiki/index.php/Germany2024
 
Description IFIP WG2.1 Meeting #82 (Canberra, November 2024) 
Form Of Engagement Activity A formal working group, expert panel or dialogue
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Sam Lindley attended IFIP WG2.1 Meeting #82 in Canberra. He gave a talk on modal effect types.
Year(s) Of Engagement Activity 2024
URL https://ifipwg21wiki.cs.kuleuven.be/wiki/index.php/Canberra2024
 
Description IFIP WG2.11 Meeting #24 (Edinburgh, December 2024) 
Form Of Engagement Activity A formal working group, expert panel or dialogue
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Sam Lindley was invited as a local observer to attend IFIP WG2.11 Meeting #24 in Edinburgh. He gave a talk on modal effect types.
Year(s) Of Engagement Activity 2024
URL https://wiki.hh.se/wg211/index.php/WG211/M24Schedule
 
Description On the expressive power of types (TYPES 2022 keynote) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Other audiences
Results and Impact Sam Lindley delivered an invited keynote at the TYPES 2022 conference in Nantes France. The talk involved a poll in which the audience was asked a number of questions. The answers revealed the subtleties in defining what expressiveness means and the talk shed light on how types can help to clarify such questions.
Year(s) Of Engagement Activity 2022
URL https://types22.inria.fr/invited-speakers/
 
Description Paella: algebraic effects with parameters and their handlers (HOPE 2024) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Jesse Sigal presented initial work on parameterised algebraic effects and their handlers at the HOPE 2024.
Year(s) Of Engagement Activity 2024
URL https://icfp24.sigplan.org/home/hope-2024
 
Description Parameterized algebraic theories and applications (Huawei Edinburgh) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Cristina Matache gave a seminar on our work on scoped effects as parameterized algebraic theories (ESOP 2024 paper) and work in progress on an algebraic theory of named threads (GALOP 2024 extended abstract).
Year(s) Of Engagement Activity 2024
URL https://blogs.ed.ac.uk/he-lab/2024/02/26/%e3%80%90bayes-coffee-house-tech-talk-series%e3%80%91parame...
 
Description Parameterized algebraic theories and applications (University of Birmingham, March 2024 ) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach National
Primary Audience Professional Practitioners
Results and Impact Cristina Matache gave a seminar on our work on scoped effects as parameterized algebraic theories (ESOP 2024 paper).
Year(s) Of Engagement Activity 2024
URL https://researchseminars.org/seminar/TheoryCSBham
 
Description Research, Grad School, Community - Let's chat! (PLMW @ ICFP 2024) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Postgraduate students
Results and Impact Sam Lindley sat on a panel "Research, Grad School, Community - Let's chat!" at the Programming Languages Mentoring Workshop colocated with the ICFP 2024 conference.
Year(s) Of Engagement Activity 2024
URL https://icfp24.sigplan.org/home/PLMW-ICFP-2024#About
 
Description SPLV 2024 (Glasgow, July/August 2024) 
Form Of Engagement Activity Participation in an activity, workshop or similar
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Postgraduate students
Results and Impact Sam Lindley taught a 3-lecture summer school course on Effect Handler Oriented Programming at the Scottish Programming Languages and Verification Summer School (SPLV) at the University of Strathclyde, Glasgow. The summer school is primarily targeted at PhD students, but undergraduates, other researchers, and people from industry also attend.
Year(s) Of Engagement Activity 2024
URL http://spli.scot/splv/2024-strathclyde/
 
Description Scoped effects as parameterized algebraic theories (Directions and perspectives in the ?-calculus invited talk) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Cristina Matache presented our work on casting scoped effects as a form of parameterised algebraic theory. This has the advantage of providing for free all of the equational reasoning machinery that comes with algebraic theories.
Year(s) Of Engagement Activity 2024
URL https://site.unibo.it/diapason/en/agenda/directions-and-perspectives-in-the-lambda-calculus
 
Description Soundly Handling Linearity (SIGPLAN blogpost) 
Form Of Engagement Activity Engagement focused website, blog or social media channel
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact We were invited to present the key ideas of our POPL 2024 Distinguished Paper, "Soundly Handling Linearity" on the ACM SIGPLAN blog as part of a series of PL Perspectives.
Year(s) Of Engagement Activity 2024
URL https://blog.sigplan.org/2024/08/12/soundly-handling-linearity/
 
Description Soundly handling linearity (EHOP Workshop, 2023) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Wenhao Tang presented ongoing work on combining linear type systems with effect handlers at the EHOP Workshop.
Year(s) Of Engagement Activity 2023
URL https://effect-handlers.org/events/ehop-workshop2023.html
 
Description Soundly handling linearity (POPL 2024) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact This was the talk associated with the POPL 2024 paper. Wenhao Tang delivered the talk. The paper won a Distinguished Paper award. The work shows how to soundly combine linear type systems with multi-shot effect handlers. Concretely, it fixed a long-standing bug in the implementation of Links in which the combination of session types and effect handlers could lead to unsound code. Following the talk, we are now discussing with Lionel Parreaux and alternative framing of the work using algebraic subtyping.
Year(s) Of Engagement Activity 2024
URL https://popl24.sigplan.org/program/program-POPL-2024/?track=POPL%20
 
Description Status update on WasmFX implementation in Wasmtime 
Form Of Engagement Activity A formal working group, expert panel or dialogue
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Frank Emrich presented an update to the WebAssembly Stack Switching Subgroup on the implementation of WasmFX in Wasmtime.
Year(s) Of Engagement Activity 2023
URL https://github.com/WebAssembly/meetings/blob/main/stack/2023/stack-2023-12-04.md
 
Description Structural subtyping as parametric polymorphism (OOPSLA 2023) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact This was the talk associated with the OOPSLA 2023 paper. It was delivered by Wenhao Tang. The work elaborates on the subtleties of expressing structural subtyping as parametric polymorphism. It is the first work to formalise folklore results in this area. It is relevant to EHOP in that it has implications for the design of effect type systems for effect handlers.
Year(s) Of Engagement Activity 2023
URL https://2023.splashcon.org/track/splash-2023-oopsla
 
Description Talk: Composing UNIX with Effect Handlers: A Case Study in Effect Handler Oriented Programming (Dagstuhl seminar 21292) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Other audiences
Results and Impact This was an academic talk given during Dagstuhl Seminar 21292 about how to construct the essence of a UNIX operating system using effect handlers. The talk was attended by 30 people, consisting mostly of academic staff, students, but also a few people representing the industry. This work serves a case study for practical programming with effect handlers, as well as providing insight into how we may decompose a complex monolithic system like UNIX into a granular set of small effect handlers, that when composed yield the semantics of UNIX.
Year(s) Of Engagement Activity 2021
URL https://www.dagstuhl.de/en/program/calendar/semhp/?semnr=21292
 
Description Talk: Composing UNIX with Effect Handlers: A Case Study in Effect Handler Oriented Programming (ML Family Workshop'21) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Other audiences
Results and Impact This was an academic talk given during ML Family Workshop at ICFP 2021 about how to construct the essence of a UNIX operating system using effect handlers. The talk was attended by 50+ people (the exact number is unbeknownst to me as the talk was live streamed to YouTube simultaneously with delivering the talk on conference platform AirMeet, where 60 people were present). This work serves a case study for practical programming with effect handlers, as well as providing insight into how we may decompose a complex monolithic system like UNIX into a granular set of small effect handlers, that when composed yield the semantics of UNIX.

An audience member later posted a link to this talk on the internet forum reddit (https://www.reddit.com/r/ProgrammingLanguages/comments/pknkcq/composing_unix_with_effect_handlers_a_case_study/) which caused further discussion about this work.
Year(s) Of Engagement Activity 2021
URL https://icfp21.sigplan.org/home/mlfamilyworkshop-2021
 
Description Talk: Handler Calculus (Dagstuhl seminar 21292) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Other audiences
Results and Impact This was an academic talk given during Dagstuhl Seminar 21292 about the design of a programming calculus based on effect handlers. The talk was attended by 30 people, consisting mostly of academic staff, students, but also a few people representing the industry. This work rethinks the foundations of programming languages in terms of effect handlers. This work demonstrates how to encode various standard programming data types such as pairs and sums.
Year(s) Of Engagement Activity 2021
URL https://www.dagstuhl.de/en/program/calendar/semhp/?semnr=21292
 
Description Talk: Handler Calculus (HOPE 2021) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Other audiences
Results and Impact This was an academic talk given during the HOPE Workshop at ICFP 2021 about the design of a programming calculus based on effect handlers. The talk was attended by 50+ people, consisting of academic staff, students, and practitioners from industry. This work rethinks the foundations of programming languages in terms of effect handlers. This work demonstrates how to encode various standard programming data types such as pairs and sums.
Year(s) Of Engagement Activity 2021
URL https://icfp21.sigplan.org/home/hope-2021
 
Description Talk: Handlers.Js: Compiling Effect Handlers to JavaScript (Tarides 2021) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Industry/Business
Results and Impact This was an invited talk given at Tarides, Paris, France in November 2021 about how to viable compilation strategies for effect handlers to JavaScript. The talk was attended by roughly 40 people, most of whom are employees at Tarides, others were from OCaml Labs and Segfault Systems. The talk sparked discussion about how to concrete compile OCaml 5.0 effect handlers to JavaScript, specifically how one may adapt the existing OCaml-to-JavaScript compiler (known as "jsoo").
Year(s) Of Engagement Activity 2021
 
Description Talk: Typed Continuations: A Basis for Stack-switching in Wasm (Wasm stacks subgroup 2021) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact This was a talk given to the WebAssembly Stack Switching subgroup in 2021 about our proposal for stack switching in WebAssembly (Wasm). The talk was attended 12 people, most of whom are industry people. The talk sparked discussions, which helped identify short-comings that need to be addressed to make the proposal acceptable by the WebAssembly working group.
Year(s) Of Engagement Activity 2021
URL https://github.com/WebAssembly/meetings/blob/ad81cdb9b99135d7dd4c23281c8da3bdbce28603/stack/2021/sg-...
 
Description Talk: Wasm with typed continuations continued (Wasm stacks subgroup 2021) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact This talk was a follow up on our earlier talk at "Typed Continuations: A Basis for Stack-switching in Wasm" one month earlier to address the feedback we had received back then. It was attended by 15 people, most of whom are industry practitioners. The talk sparked further discussions about our proposal. During the conclusion of the meeting it was agreed that we should open a pull request of our material against the main design repository for stack switching.
Year(s) Of Engagement Activity 2021
URL https://github.com/WebAssembly/meetings/blob/ad81cdb9b99135d7dd4c23281c8da3bdbce28603/stack/2021/sg-...
 
Description Talk: WasmFX: Typed Continuations in Wasm (SPLS Oct'21) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach Regional
Primary Audience Other audiences
Results and Impact This talk was given during the Scottish Programming Languages Seminar held in October 2021. This talk is about the design of our proposal for stack switching in WebAssembly. The talk was attended by roughly 50 people, some of which which asked further questions about our design, and who also reported an increased interest in our work on WebAssembly.
Year(s) Of Engagement Activity 2021
URL https://spls-series.github.io/meetings/2021/october/
 
Description Tracking linear continuations for effect handlers 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach National
Primary Audience Professional Practitioners
Results and Impact Wenhao Tang presented ongoing work on combining linear type systems with effect handlers to the Scottish Programming Languages Seminar (SPLS) at Heriot-Watt University.
Year(s) Of Engagement Activity 2023
URL https://scottish-pl-institute.github.io/spls/meetings/2023/february/
 
Description Tracking linear continuations for effect handlers 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Wenhao Tang presented ongoing work on combining linear type systems with effect handlers to the Huawei-Edinburgh Joint Lab Workshop at The University of Edinburgh and virtually to international participants from China.
Year(s) Of Engagement Activity 2023
URL https://www.wiki.ed.ac.uk/display/JL/June+23+workshop+schedule+archive
 
Description WasmFX: structured stack switching via effect handlers in WebAssembly (Huawei Edinburgh Joint Lab Workshop 2023) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Other audiences
Results and Impact Daniel Hillerström presented ongoing work on the design and implementation of WasmFX to academic researchers and industrial participants attending the Huawei Edinburgh Joint Lab Workshop. This was part of a series of talks relating to effect handlers and effect handler-oriented programming, which Huawei is showing increasing interest in as a direct result of EHOP and the consultancy services Sam Lindley provides to Huawei on effect handlers.
Year(s) Of Engagement Activity 2023
URL https://blogs.ed.ac.uk/he-lab/2023/01/05/january-2023-workshop-schedule/
 
Description WasmFX: structured stack switching via effect handlers in WebAssembly (Wasm Research Day, 2022) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Other audiences
Results and Impact Daniel Hillerström presented ongoing work on the design and implementation of WasmFX to academic researchers and industrial participants attending the colocated WebAssembly Community Group meeting at Google's San Francisco office. This spawned a great deal of discussion and complemented a later related talk by our project partner Andreas Rossberg at the subsequent WebAssembly Community Group meeting. Together the two talks helped to clarify to the WebAssembly Community Group (who coordinate the standardisation of WebAssembly) what the design space is for supporting stack switching in WebAssembly and how WasmFX hits a sweetspot in that design space.
Year(s) Of Engagement Activity 2022
URL https://www.cs.cmu.edu/~wasm/wasm-research-day-2022.html
 
Description WebAssembly Community Group Meeting (Fastly San Francisco, February 2025) 
Form Of Engagement Activity A formal working group, expert panel or dialogue
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact The WebAssembly Community Group acts as the de facto standardisation committee for WebAssembly. They meet in-person one to two times per year. This meeting took place at Fastly's offices in San Francisco. It provided an invaluable opportunity to engage with a broad range of stakeholders on the design of stack switching (WasmFX) and other relevant WebAssembly initiatives such as SpecTec. Sam Lindley attended in person. Frank Emrich attended remotely.

Sam Lindley gave a status update on WasmFX. The talk covered the many recent developments in this space - largely driven by the EHOP project.

Maxime Legoupil, an EHOP visiting researcher, gave a remote talk at the colocated Wasm Research Day event on work he has been carrying out on mechanising WasmFX in the Roq proof assistant and, building on that, extending the Iris-Wasm program logic to support WasmFX.

Connections with and potential use-cases for WasmFX were identified in many of the other talks at the Wasm Research Day.
Year(s) Of Engagement Activity 2025
URL https://github.com/WebAssembly/meetings/blob/main/main/2025/CG-02.md
 
Description WebAssembly Community Group Meeting (Google Munich, October 2023) 
Form Of Engagement Activity A formal working group, expert panel or dialogue
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Industry/Business
Results and Impact The WebAssembly Community Group acts as the de facto standardisation committee for WebAssembly. They meet in-person one to two times per year. This meeting took place at Google's offices in Munich. It provided an invaluable opportunity to engage with a broad range of stakeholders on the design of WasmFX. Frank Emrich, Daniel Hillerström, Sam Lindley, and Andreas Rossberg all attended. Daniel delivered a talk on "Supporting Stack Switching in Wasm" at the colocated Wasm research day event.
Year(s) Of Engagement Activity 2023
URL https://github.com/WebAssembly/meetings/blob/main/main/2023/CG-10.md
 
Description Work-life balance, service, and teaching (RTFM 2024) 
Form Of Engagement Activity A talk or presentation
Part Of Official Scheme? No
Geographic Reach International
Primary Audience Professional Practitioners
Results and Impact Sam Lindley sat on a panel on work-life balance, service, and teaching, aimed at junior academics at the workshop RTFM (Ted-hot Topics in Faculty Mentoring) colocated with the PLDI 2024 conference.
Year(s) Of Engagement Activity 2024
URL https://pldi24.sigplan.org/home/rtfm-2024#About