A relational theory of effects and coeffects - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Journal Articles Proceedings of the ACM on Programming Languages Year : 2022

A relational theory of effects and coeffects


Graded modal types systems and coeffects are becoming a standard formalism to deal with context-dependent, usage-sensitive computations, especially when combined with computational effects. From a semantic perspective, effectful and coeffectful languages have been studied mostly by means of denotational semantics and almost nothing has been done from the point of view of relational reasoning. This gap in the literature is quite surprising, since many cornerstone results — such as non-interference , metric preservation , and proof irrelevance — on concrete coeffects are inherently relational. In this paper, we fill this gap by developing a general theory and calculus of program relations for higher-order languages with combined effects and coeffects. The relational calculus builds upon the novel notion of a corelator (or comonadic lax extension ) to handle coeffects relationally. Inside such a calculus, we define three notions of effectful and coeffectful program refinements: contextual approximation , logical preorder , and applicative similarity . These are the first operationally-based notions of program refinement (and, consequently, equivalence) for languages with combined effects and coeffects appearing in the literature. We show that the axiomatics of a corelator (together with the one of a relator) is precisely what is needed to prove all the aforementioned program refinements to be precongruences, this way obtaining compositional relational techniques for reasoning about combined effects and coeffects.
Fichier principal
Vignette du fichier
popl2022b.pdf (436.25 Ko) Télécharger le fichier
Origin : Files produced by the author(s)

Dates and versions

hal-03923470 , version 1 (04-01-2023)



Ugo Dal Lago, Francesco Gavazzo. A relational theory of effects and coeffects. Proceedings of the ACM on Programming Languages, 2022, 6 (POPL), pp.1-28. ⟨10.1145/3498692⟩. ⟨hal-03923470⟩
22 View
8 Download



Gmail Facebook Twitter LinkedIn More