Scoped Effects as Parameterized Algebraic Theories

Sam Lindley, Cristina Matache*, Sean Moss, Sam Staton, Nicolas Wu, Zhixuan Yang

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference contribution

2 Downloads (Pure)

Abstract

Notions of computation can be modelled by monads. Algebraic effects offer a characterization of monads in terms of algebraic operations and equational axioms, where operations are basic programming features, such as reading or updating the state, and axioms specify observably equivalent expressions. However, many useful programming features depend on additional mechanisms such as delimited scopes or dynamically allocated resources. Such mechanisms can be supported via extensions to algebraic effects including scoped effects and parameterized algebraic theories. We present a fresh perspective on scoped effects by translation into a variation of parameterized algebraic theories. The translation enables a new approach to equational reasoning for scoped effects and gives rise to an alternative characterization of monads in terms of generators and equations involving both scoped and algebraic operations. We demonstrate the power of our fresh perspective by way of equational characterizations of several known models of scoped effects.
Original languageEnglish
Title of host publicationProgramming Languages and Systems
Subtitle of host publication33rd European Symposium on Programming, ESOP 2024, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2024, Luxembourg City, Luxembourg, April 6–11, 2024, Proceedings, Part I
EditorsStephanie Weirich
PublisherSpringer
Pages3-21
Number of pages19
Edition1
ISBN (Electronic)9783031572623
ISBN (Print)9783031572616
DOIs
Publication statusPublished - 5 Apr 2024
EventESOP 2024: 33rd European Symposium on Programming - Luxembourg City, Luxembourg
Duration: 8 Apr 202411 Apr 2024
https://etaps.org/2024/conferences/esop/

Publication series

NameLecture Notes in Computer Science
PublisherSpringer
Volume14576
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

ConferenceESOP 2024
Abbreviated titleESOP2024
Country/TerritoryLuxembourg
CityLuxembourg City
Period8/04/2411/04/24
Internet address

Bibliographical note

Acknowledgments:
We are grateful to many colleagues for helpful discussions and to the anonymous reviewers for their helpful comments and suggestions. This work was supported by the UKRI Future Leaders Fellowship “Effect Handler Oriented Programming” (reference number MR/T043830/1), ERC Project BLAST, and AFOSR Award No. FA9550-21-1-003.

Keywords

  • algebraic effects
  • scoped effects
  • monads
  • category theory
  • algebraic theories

Cite this