arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2307.10484cs.PL
收藏

用于因果推理的归纳图

Inductive diagrams for causal reasoning

Jonathan Castello, Patrick Redmond, Lindsey Kuper

AI总结:

针对传统Lamport图公理形式化在机械化环境中使用繁琐的问题,提出受弦图与并发分离逻辑启发的因果分离图(CSD)归纳形式化方法,可解释到多种语义域,并通过Agda机械化验证了多种逻辑时钟的Lamport时钟条件。

摘要:

Lamport图是对并发系统中的“发生在先”关系进行非形式化推理的一种普遍且直观的工具。然而,Lamport图的传统公理形式化在Agda这类机械化环境中使用起来会十分繁琐。我们提出了一种替代性的归纳形式化方法——因果分离图(causal separation diagram,CSD),该方法受弦图与并发分离逻辑启发,但拥有与Lamport图类似的图形语法。关键在于,CSD基于这样的理念:事件间的因果关系由信息在事件间传递的路径所见证。为此,我们将发生在先建模为事件间路径的依赖类型。\nCSD的归纳公式化使其能够被解释到多种语义域中。我们通过一个关于逻辑时钟性质的案例研究展示了CSD的可解释性,逻辑时钟是将因果关系具体化为数据的广泛使用的机制。我们通过实现一系列CSD解释器开展这项研究,最终得到了Lamport时钟条件的通用证明,该证明在时钟选择上是参数化的。我们将该证明实例化到Lamport标量时钟、Mattern向量时钟,以及Raynal等人与Wuu和Bernstein的矩阵时钟上,得到了每一种时钟的已验证实现。CSD形式体系与我们的案例研究均在Agda证明助手中实现了机械化。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑