paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A relational theory of effects and coeffects

效应与 coeffect 的关系理论
POPL 6(POPL)2022匹配度 2/10 · 该论文是纯 PL 形式语义与类型理论研究,关注效应/coeffect 的关系演算与程序细化,与用户核心方向(ML/Agentic 程序的静态分析、LLM 与静态分析/验证交叉、浮点或贝叶斯程序分析与 LLM 交叉)没有直接关联;仅在广义 PL 理论层面可能有一点边缘价值。引用 22 inbox
Ugo Dal Lago, Francesco Gavazzo
crossref: 2026-09-10

AI 速览

一句话:提出 corelator(余单子松弛扩张)与程序关系演算,为含效应与 coeffect 的高阶语言建立程序细化/等价的关系理论。

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

问题
含效应与 coeffect 的高阶语言缺少关系推理框架,已有语义研究多基于指称语义;非干扰、度量保持、证明无关性等核心性质又本质上是关系性的。
方法
引入 corelator(余单子松弛扩张)与 relator,建立程序关系演算,并定义 contextual approximation、logical preorder 与 applicative similarity 三种程序细化/等价。
评估
通过证明 corelator 与 relator 的公理足以使三种细化均为前同余,展示该关系演算的组合性与充分性;工作为理论证明,无实验评估。
原文摘要(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.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot1567,
  title = {A relational theory of effects and coeffects},
  author = {Ugo Dal Lago and Francesco Gavazzo},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {6},
  number = {POPL},
  year = {2022},
  doi = {10.1145/3498692}
}