English

Runners in action

Programming Languages 2020-04-21 v2

Abstract

Runners of algebraic effects, also known as comodels, provide a mathematical model of resource management. We show that they also give rise to a programming concept that models top-level external resources, as well as allows programmers to modularly define their own intermediate "virtual machines". We capture the core ideas of programming with runners in an equational calculus λcoop\lambda_{\mathsf{coop}}, which we equip with a sound and coherent denotational semantics that guarantees the linear use of resources and execution of finalisation code. We accompany λcoop\lambda_{\mathsf{coop}} with examples of runners in action, provide a prototype language implementation in OCaml, as well as a Haskell library based on λcoop\lambda_{\mathsf{coop}}.

Keywords

Cite

@article{arxiv.1910.11629,
  title  = {Runners in action},
  author = {Danel Ahman and Andrej Bauer},
  journal= {arXiv preprint arXiv:1910.11629},
  year   = {2020}
}

Comments

ESOP 2020 final version + online appendix

R2 v1 2026-06-23T11:54:46.222Z