paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Inductive Diagrams for Causal Reasoning

面向因果推理的归纳图
OOPSLA 8(OOPSLA1)2024匹配度 3/10 · 本文属于并发程序的形式语义与证明工程,使用 Agda 形式化因果/Happens-before 与逻辑时钟,与形式化验证/PL 有较远关联;但未涉及 LLM/Agent、静态分析、浮点程序分析或贝叶斯程序分析,也未触及用户画像的核心交叉方向。引用 0 inbox
Jonathan Castello, Patrick Redmond, Lindsey Kuper
crossref: 2026-09-10

AI 速览

一句话:提出归纳式因果分离图(CSD),用路径依赖类型形式化 happens-before,并在 Agda 中验证逻辑时钟条件。

Lamport 图是并发系统中非形式化推理 happens-before 关系的直观工具,但其传统公理化形式在 Agda 等机械化环境中难以使用。本文提出归纳式的因果分离图(CSD),借鉴 string diagram 与并发分离逻辑,同时保留类似 Lamport 图的图形语法。CSD 将事件间因果关系视为信息沿路径传播的证据,并用事件间路径的依赖类型建模 happens-before,从而可解释到多种语义域。作者在 Agda 中机械化 CSD,并以逻辑时钟为案例实现一系列解释器,最终给出参数化于时钟选择的 Lamport clock condition 通用证明,实例化到标量、向量及矩阵时钟,得到经验证的实现。

问题
在 Agda 等证明助手中,如何为 Lamport 图所表达并发系统的 happens-before 关系提供既直观又易于机械化的形式化?
方法
提出归纳式因果分离图 CSD,将事件间因果关系建模为路径依赖类型,并借鉴 string diagram 与并发分离逻辑,使其可解释到多种语义域。
评估
在 Agda 中机械化 CSD;以逻辑时钟为案例实现解释器,并给出参数化于时钟选择的 Lamport clock condition 通用证明,实例化到标量、向量与矩阵时钟,得到经验证的实现。
原文摘要(Abstract)

The Lamport diagram is a pervasive and intuitive tool for informal reasoning about “happens-before” relationships in a concurrent system. However, traditional axiomatic formalizations of Lamport diagrams can be painful to work with in a mechanized setting like Agda. We propose an alternative, inductive formalization — the causal separation diagram (CSD) — that takes inspiration from string diagrams and concurrent separation logic, but enjoys a graphical syntax similar to Lamport diagrams. Critically, CSDs are based on the idea that causal relationships between events are witnessed by the paths that information follows between them. To that end, we model “happens-before” as a dependent type of paths between events. The inductive formulation of CSDs enables their interpretation into a variety of semantic domains. We demonstrate the interpretability of CSDs with a case study on properties of logical clocks , widely-used mechanisms for reifying causal relationships as data. We carry out this study by implementing a series of interpreters for CSDs, culminating in a generic proof of Lamport’s clock condition that is parametric in a choice of clock. We instantiate this proof on Lamport’s scalar clock, on Mattern’s vector clock, and on the matrix clocks of Raynal et al. and of Wuu and Bernstein, yielding verified implementations of each. The CSD formalism and our case study are mechanized in the Agda proof assistant.

链接与引用

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

BibTeX
@article{paperbot2550,
  title = {Inductive Diagrams for Causal Reasoning},
  author = {Jonathan Castello and Patrick Redmond and Lindsey Kuper},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {8},
  number = {OOPSLA1},
  year = {2024},
  doi = {10.1145/3649830}
}