Affiliation:
1. University of Bologna, Italy / Inria, France
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.
Funder
Ministero dell’Istruzione, dell’Università e della Ricerca
European Research Council
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Reference92 articles.
1. A core calculus of dependency
2. A unified view of modalities in type systems
3. S. Abramsky . 1990. The Lazy Lambda Calculus . In Research Topics in Functional Programming , D. Turner (Ed.). Addison Wesley , 65–117. S. Abramsky. 1990. The Lazy Lambda Calculus. In Research Topics in Functional Programming, D. Turner (Ed.). Addison Wesley, 65–117.
4. S. Abramsky and A. Jung. 1994. Domain Theory. In Handbook of Logic in Computer Science. Clarendon Press 1–168. S. Abramsky and A. Jung. 1994. Domain Theory. In Handbook of Logic in Computer Science. Clarendon Press 1–168.
5. Step-Indexed Syntactic Logical Relations for Recursive and Quantified Types
Cited by
11 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Diagrammatic Algebra of First Order Logic;Proceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science;2024-07-08
2. Numerical Fuzz: A Type System for Rounding Error Analysis;Proceedings of the ACM on Programming Languages;2024-06-20
3. Solving Quantitative Equations;Lecture Notes in Computer Science;2024
4. Resource-Aware Soundness for Big-Step Semantics;Proceedings of the ACM on Programming Languages;2023-10-16
5. A Java-like calculus with heterogeneous coeffects;Theoretical Computer Science;2023-09