paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Dijkstra monads forever: termination-sensitive specifications for interaction trees

Dijkstra 单子永生:面向交互树的终止敏感规约
POPL 5(POPL)2021匹配度 2/10 · 论文属于形式验证/Coq 中交互树与 Dijkstra 单子的基础框架,未涉及机器学习系统、Agentic 程序、LLM 辅助静态分析/验证、浮点或贝叶斯程序分析;与用户当前核心交叉方向关联很弱。引用 17 inbox
Lucas Silver, Steve Zdancewic
crossref: 2026-09-10

AI 速览

一句话:把 Dijkstra 单子框架扩展到交互树,为带代数效应的非终止交互式程序提供终止敏感的规约与验证。

Dijkstra 单子框架可以让程序员用单子效应为带副作用的程序书写规约,但原有形式无法描述非终止的、与外部环境交互的程序。本文引入面向“带未解释事件的非终止程序”的基础规约单子,从而把终止性纳入规约语义之中。程序本身用 interaction trees 建模——这是 Coq 中表示带代数效应程序的余归纳数据类型;作者进一步为它补充 trace 语义,使规约可以谈论交互过程中产生的可观察事件轨迹。作者论证该框架可以涵盖若干常见的、直接的证明原则,说明其表达力足以支撑实际推理。整个框架作为 Interaction Trees Coq 库的扩展实现,提供机器化验证支持。

问题
已有的 Dijkstra 单子框架只能为(可能终止的)带效应程序书写规约,无法表达非终止的、与外部事件交互的程序及其终止/发散行为。
方法
引入针对带未解释事件的非终止程序的基础规约单子,并以 Coq 中的余归纳数据类型 interaction trees 建模此类程序,同时为其添加 trace 语义以刻画可观察事件序列。
评估
框架在 Coq 中实现为 Interaction Trees 库的扩展,并论证其可涵盖若干典型的简单证明原则,展示其表达力与可用性。
原文摘要(Abstract)

This paper extends the Dijkstra monad framework, designed for writing specifications over effectful programs using monadic effects, to handle termination sensitive specifications over interactive programs. We achieve this by introducing base specification monads for non-terminating programs with uninterpreted events. We model such programs using interaction trees, a coinductive datatype for representing programs with algebraic effects in Coq, which we further develop by adding trace semantics. We show that this approach subsumes typical, simple proof principles. The framework is implemented as an extension of the Interaction Trees Coq library.

链接与引用

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

BibTeX
@article{paperbot1185,
  title = {Dijkstra monads forever: termination-sensitive specifications for interaction trees},
  author = {Lucas Silver and Steve Zdancewic},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {5},
  number = {POPL},
  year = {2021},
  doi = {10.1145/3434307}
}