@inproceedings{87922099dc82471dafd81cd7c452d694,
title = "Algebraic and Coalgebraic Perspectives on Interaction Laws",
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{\textquoteright}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.",
keywords = "coeffects, comonad coalgebras, effects, interaction laws, monad algebras, monad morphisms, runners",
author = "Niels Voorneveld",
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: {\textcopyright} Springer Nature Switzerland AG 2020; 18th Asian Symposium on Programming Languages and Systems, APLAS 2020 ; Conference date: 30-11-2020 Through 02-12-2020",
year = "2020",
month = nov,
day = "24",
doi = "10.1007/978-3-030-64437-6\_10",
language = "English",
isbn = "978-3-030-64436-9",
series = "Lecture Notes in Computer Science",
publisher = "Springer, Cham",
pages = "186--205",
editor = "Oliveira, \{Bruno C. d. S.\}",
booktitle = "Programming Languages and Systems",
}