paperbot · PL 论文追踪

全部论文 待读 收藏

P2 The next 700 relational program logics

下一个 700 种关系程序逻辑
POPL 4(POPL)2019匹配度 3/10 · 该论文属于关系程序逻辑与形式语义的基础理论工作,与用户当前关注的LLM/Agent、ML系统静态分析、浮点程序分析等核心方向距离较远;虽涉及概率效应,但与贝叶斯程序分析及LLM交叉仅有间接关联。引用 41 inbox
Kenji Maillard, Cătălin Hriţcu, Exequiel Rivas, Antoine Van Muylder
crossref: 2026-09-10

AI 速览

一句话:提出首个可为任意单子效应定义关系程序逻辑的通用框架,并给出语义基础与可靠逻辑核心。

本文研究如何统一地为任意单子效应建立语义可靠的关系程序逻辑,并解决既有工作难以处理控制效应的问题。作者在关系依赖类型论中嵌入该框架,语义上用 relative monads 代数地表示关系规约,并引入关系效应观察(relational effect observations),在保持代数结构的前提下把单子计算对映射为关系规约。对任意关系效应观察,框架可泛型地定义可靠关系程序逻辑的核心,并可扩展为面向具体效应的完整逻辑。作者为状态、输入输出、非确定性和离散概率等效应定义了相应逻辑,还用状态与无界迭代嵌入 Benton 关系霍尔逻辑的变体并重构关系霍尔类型论,且首次给出异常的关系程序逻辑。

问题
如何统一地为任意单子效应定义语义可靠的关系程序逻辑,并处理此前关系程序逻辑难以支持的控制效应与异常。
方法
在关系依赖类型论中嵌入框架,用 relative monads 代数地刻画关系规约,并通过保持代数结构的关系效应观察连接单子计算与关系规约,进而泛型构造可靠逻辑核心。
评估
通过为状态、输入输出、非确定性和离散概率等效应实例化框架,嵌入 Benton 关系霍尔逻辑变体并重构关系霍尔类型论,以及首次给出异常的关系逻辑,展示其通用性与表达力。
原文摘要(Abstract)

We propose the first framework for defining relational program logics for arbitrary monadic effects. The framework is embedded within a relational dependent type theory and is highly expressive. At the semantic level, we provide an algebraic presentation of relational specifications as a class of relative monads, and link computations and specifications by introducing relational effect observations, which map pairs of monadic computations to relational specifications in a way that respects the algebraic structure. For an arbitrary relational effect observation, we generically define the core of a sound relational program logic, and explain how to complete it to a full-fledged logic for the monadic effect at hand. We show that this generic framework can be used to define relational program logics for effects as diverse as state, input-output, nondeterminism, and discrete probabilities. We, moreover, show that by instantiating our framework with state and unbounded iteration we can embed a variant of Benton's Relational Hoare Logic, and also sketch how to reconstruct Relational Hoare Type Theory. Finally, we identify and overcome conceptual challenges that prevented previous relational program logics from properly dealing with control effects, and are the first to provide a relational program logic for exceptions.

链接与引用

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

BibTeX
@article{paperbot518,
  title = {The next 700 relational program logics},
  author = {Kenji Maillard and Cătălin Hriţcu and Exequiel Rivas and Antoine Van Muylder},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {4},
  number = {POPL},
  year = {2019},
  doi = {10.1145/3371072}
}