一句话:提出 corelator(余单子松弛扩张)与程序关系演算,为含效应与 coeffect 的高阶语言建立程序细化/等价的关系理论。
分级模态类型系统与 coeffect 用于处理上下文相关、使用敏感的计算,尤其与计算效应结合时;但已有语义研究多基于指称语义,缺乏关系推理,而非干扰、度量保持、证明无关性等核心结果本质上是关系性的。本文为含效应与 coeffect 的高阶语言建立一般的关系理论与程序关系演算:引入 corelator(余单子松弛扩张)以关系方式处理 coeffect,并与 relator 结合,定义 contextual approximation、logical preorder 与 applicative similarity 三种程序细化。这是文献中首批基于操作语义的细化/等价概念。作者证明 corelator 与 relator 的公理恰好保证三者均为前同余,从而提供组合式关系推理技术。
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.