arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2307.15549cs.PL
收藏

上下文感知分离逻辑

Context-Aware Separation Logic

Roland Meyer, Thomas Wies, Sebastian Wolff

AI总结:

针对并发分离逻辑中幽灵状态抽象导致推理足迹扩大的问题,本文提出Co(Co)SL及上下文规则,以支持更局部的推理,并在flow framework和证明检查器中验证高并发搜索树。

摘要:

分离逻辑常因能在断言层面推理状态更新时紧密模拟其局部性而受到赞誉。证明者只需关注当前计算的足迹,即实际被访问和操作的状态部分。现代并发分离逻辑将这一局部推理原则从物理状态提升到抽象的幽灵状态。例如,这些逻辑允许人们通过一个谓词来抽象细粒度并发数据结构的状态,该谓词为客户端提供对底层状态进行原子访问的错觉。然而,这些抽象无意中增大了计算的足迹:在推理局部的低层状态更新时,人们需要考虑其对抽象的影响,而该抽象涵盖了低层状态中可能无界的一部分。这往往使推理具有全局性。\n我们提出上下文感知(并发)分离逻辑(Co(Co)SL),以在存在丰富幽灵状态抽象的情况下为局部推理提供新的机会。Co(Co)SL引入了计算上下文的概念,即仅在抽象层面受到影响的具体状态部分。上下文产生了一条新的证明规则:只要计算将上下文作为不变量保持,该规则就允许人们通过上下文缩减足迹。上下文规则补充了分离逻辑的框架规则,在待框架化谓词预先已知的情况下实现更多局部推理。我们针对flow framework实例化所发展的理论,从而能够对操作一般堆图的程序进行上下文推理,并描述该逻辑的另外两个应用。我们已在一个证明提纲检查器中实现该逻辑的flow实例化,并用其验证了两个高并发二叉搜索树。

英文摘要:

Separation logic is often praised for its ability to closely mimic the locality of state updates when reasoning about them at the level of assertions. The prover only needs to concern themselves with the footprint of the computation at hand, i.e., the part of the state that is actually being accessed and manipulated. Modern concurrent separation logics lift this local reasoning principle from the physical state to abstract ghost state. For instance, these logics allow one to abstract the state of a fine-grained concurrent data structure by a predicate that provides a client the illusion of atomic access to the underlying state. However, these abstractions inadvertently increase the footprint of a computation: when reasoning about a local low-level state update, one needs to account for its effect on the abstraction, which encompasses a possibly unbounded portion of the low-level state. Often this gives the reasoning a global character. We present context-aware (concurrent) separation logic (Co(Co)SL) to provide new opportunities for local reasoning in the presence of rich ghost state abstractions. Co(Co)SL introduces the notion of a context of a computation, the part of the concrete state that is only affected on the abstract level. Contexts give rise to a new proof rule that allows one to reduce the footprint by the context, provided the computation preserves the context as an invariant. The context rule complements the frame rule of separation logic by enabling more local reasoning in cases where the predicate to be framed is known in advance. We instantiate our developed theory for the flow framework, enabling contextual reasoning about programs manipulating general heap graphs, and describe two other applications of the logic. We have implemented the flow instantiation of the logic in a proof outline checker and used it to verify two highly-concurrent binary search trees.

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

↑