Algebraic and Coalgebraic Perspectives on Interaction Laws

  • Niels Voorneveld

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

Monad algebras, turning computations over return values into values, are used to handle algebraic effects invoked by programs, whereas comonad coalgebras, turning initial states into environments (“cocomputations”) over states, describe production of coalgebraic coeffects that can respond to effects. (Monad-comonad) interaction laws by Katsumata et al. describe interaction protocols between a computation and an environment. We show that any triple of those devices can be combined into a single algebra handling computations over state predicates. This method yields an isomorphism between the category of interaction laws, and the category of so-called merge functors which merge algebras and coalgebras to form combined algebras. In a similar vein, we can combine interaction laws with coalgebras only, retrieving Uustalu’s stateful runners. If instead we combine interaction laws with algebras only, we get a novel concept of continuation-based runners that lift an environment of value predicates to a single predicate on computations of values. We use these notions to study different running examples of interactions of computations and environments.
Original languageEnglish
Title of host publicationProgramming Languages and Systems
Subtitle of host publication18th Asian Symposium, APLAS 2020, Fukuoka, Japan, November 30 – December 2, 2020, Proceedings
EditorsBruno C. d. S. Oliveira
PublisherSpringer, Cham
Pages186-205
ISBN (Electronic)978-3-030-64437-6
ISBN (Print)978-3-030-64436-9
DOIs
Publication statusPublished - 24 Nov 2020
Event18th Asian Symposium on Programming Languages and Systems - Fukuoka, Japan
Duration: 30 Nov 20202 Dec 2020

Publication series

NameLecture Notes in Computer Science
PublisherSpringer
Volume12470

Conference

Conference18th Asian Symposium on Programming Languages and Systems
Abbreviated titleAPLAS 2020
Country/TerritoryJapan
CityFukuoka
Period30/11/202/12/20

Bibliographical note

Funding Information: T.U. was supported by the Icelandic Research Fund project grant no. 196323-052 and by the Estonian Ministry of Education and Research institutional research grant no. IUT33-13. N.V. was supported by the Estonian IT Academy research measure (the European Social Fund project no. 2014-2020.4.05.19-0001). Publisher Copyright: © Springer Nature Switzerland AG 2020

Other keywords

  • coeffects
  • comonad coalgebras
  • effects
  • interaction laws
  • monad algebras
  • monad morphisms
  • runners

Fingerprint

Dive into the research topics of 'Algebraic and Coalgebraic Perspectives on Interaction Laws'. Together they form a unique fingerprint.

Cite this