Book Sections Year : 2024

Active Objects based on Algebraic Effects

Abstract

Algebraic effects are a long-studied programming language construct allowing the implementation of complex control flow in a structured way. With OCaml 5, such features are finally available in a mainstream programming language, giving us a great opportunity to experiment with varied concurrency constructs implemented as simple libraries. In this article, we explore how to implement concurrency features such as futures and active objects using algebraic effects, both in theory and in practice. On the practical side, we present a library of active objects implemented in OCaml, with futures, cooperative scheduling of active objects, and thread-level parallelism. On the theoretical side, we formalise the compilation of a future calculus that models our library into an effect calculus similar to the primitives available in OCaml; we then prove the correctness of the compilation scheme.
Fichier principal
Vignette du fichier
main.pdf (739) Télécharger le fichier
Origin Files produced by the author(s)

Dates and versions

hal-04388798 , version 1 (11-01-2024)

Identifiers

Cite

Martin Andrieux, Ludovic Henrio, Gabriel Radanne. Active Objects based on Algebraic Effects. Active Object Languages: Current Research Trends, 14360, pp.3-36, 2024, Lecture Notes in Computer Science, ⟨10.1007/978-3-031-51060-1_1⟩. ⟨hal-04388798⟩
54 View
268 Download

Altmetric

Share

More