依赖上下文的效果与并发性在守卫交互树中
Context-Dependent Effects and Concurrency in Guarded Interaction Trees
AI总结:
本文提出了一种扩展守卫交互树的方法,以支持依赖上下文的效果和抢占式并发的推理与表示。
摘要:
守卫交互树是一种结构和一个完全形式化的框架,用于在Rocq中表示具有高阶效果的高阶计算。我们提出了守卫交互树的一个扩展,以支持关于依赖上下文的效果的正式推理。也就是说,效果的行为取决于评估上下文,例如call/cc、shift和reset。使用和推理这些效果具有挑战性,因为在存在这些效果的情况下,某些组合性原则不再成立。例如,在现代程序逻辑中所谓的“绑定规则”不再有效。我们扩展的目标是尽可能简单地支持依赖上下文的效果的表示和推理。为此,我们的扩展是保守的:上下文无关效果的推理原则保持不变。我们使用它来为具有call/cc和受限延续的高阶编程语言提供直接风格的指称语义。我们扩展了守卫交互树的程序逻辑以考虑依赖上下文的效果,并使用程序逻辑证明指称语义在操作语义下是恰当的。此外,我们保留了以模块化方式结合多种效果的能力,这通过展示类型正确性来证明一种编程语言与受限延续和高阶存储编程语言的安全互操作性。此外,作为另一项贡献,除了依赖上下文的效果外,我们还展示了如何扩展守卫交互树以支持抢占式并发。为了在存在抢占式并发的情况下实现和验证并发数据结构和算法,需要原子状态修改操作,例如比较和交换。
英文摘要:
Guarded Interaction Trees are a structure and a fully formalized framework for representing higher-order computations with higher-order effects in Rocq. We present an extension of Guarded Interaction Trees to support formal reasoning about context-dependent effects. That is, effects whose behaviors depend on the evaluation context, e.g., call/cc, shift and reset. Using and reasoning about such effects is challenging since certain compositionality principles no longer hold in the presence of such effects. For example, the so-called ``bind rule'' in modern program logics is no longer valid. The goal of our extension is to support representation and reasoning about context-dependent effects in the most painless way possible. To that end, our extension is conservative: the reasoning principles for context-independent effects remain the same. We use it to give direct-style denotational semantics for higher-order programming languages with call/cc and with delimited continuations. We extend the program logic for Guarded Interaction Trees to account for context-dependent effects, and we use the program logic to prove that the denotational semantics is adequate with respect to the operational semantics. Additionally, we retain the ability to combine multiple effects in a modular way, which we demonstrate by showing type soundness for safe interoperability of a programming language with delimited continuations and a programming language with higher-order store. Furthermore, as another contribution, in addition to context-dependent effects, we show how to extend Guarded Interaction Trees with preemptive concurrency. To support implementation and verification of concurrent data structures and algorithms in the presence of preemptive concurrency one requires atomic state modification operations, e.g., compare-and-exchange.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。