A relational theory of effects and coeffects
Ugo Dal Lago, Francesco Gavazzo
Abstract
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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
13 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Effects and Coeffects in Call-by-Push-Value cites Resource-Aware Soundness for Big-Step Semantics
- Effects and Coeffects in Call-by-Push-Value cites A graded dependent type system with a usage-aware semantics
- Resource-Aware Soundness for Big-Step Semantics cites A graded dependent type system with a usage-aware semantics
- Elements of Quantitative Rewriting cites Logical Foundations of Quantitative Equality
- Elements of Quantitative Rewriting cites Effectful program distancing
- Elements of Quantitative Rewriting cites A graded dependent type system with a usage-aware semantics
Cited by top-tier papers13
- Elements of Quantitative RewritingFrancesco Gavazzo, Cecilia Di FlorioPOPL 2023 · 10 citations
- Logical Foundations of Quantitative EqualityFrancesco Dagnino, Fabio PasqualiLICS 2022 · 7 citations
- Effectful program distancingUgo Dal Lago, Francesco GavazzoPOPL 2022 · 7 citations
- Resource-Aware Soundness for Big-Step SemanticsRiccardo Bianchini, Francesco Dagnino, Paola Giannini, Elena ZuccaOOPSLA 2023 · 6 citations
- Effects and Coeffects in Call-by-Push-ValueCassia Torczon, Emmanuel Suárez Acevedo, Shubh Agrawal, Joey Velez-Ginorio et al.OOPSLA 2024 · 5 citations
Builds on2
Related papers
- Bialgebraic Reasoning on Higher-order Program EquivalenceSergey Goncharov, Stefan Milius, Stelios Tsampas, Henning UrbatLICS 2024 · 4 citations
- Modeling Reachability Types with Logical Relations: Semantic Type Soundness, Termination, Effect Safety, and Equational TheoryYuyan Bao, Songlin Jia, Guannan Wei, Oliver Bracevac et al.OOPSLA 2025 · 3 citations
- Gradual Typing for Effect HandlersMax S. New, Eric Giovannini, Daniel R. LicataOOPSLA 2023 · 3 citations
- A Relational Theory of Monadic Rewriting Systems, Part IFrancesco Gavazzo, Claudia FaggianLICS 2021 · 3 citations
- Giving semantics to program-counter labels via secure effectsAndrew K. Hirsch, Ethan CecchettiPOPL 2021 · 2 citations
