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

上下文感知的迹合约(Context-aware Trace Contracts)

Context-aware Trace Contracts

Reiner Hähnle, Eduard Kamburjan, Marco Scaletta

AI总结:

针对异步程序调用上下文难以用传统合约指定的问题,本文提出上下文感知迹合约的程序逻辑及可靠证明系统,引入观测量词并迁移Liskov行为子类型原则,解决状态观测局限与调用序列组合爆炸问题。

摘要:

并发异步过程的行为通常取决于调用上下文,这是由于调度受全局协议约束。而演绎验证中常用的基于状态的Hoare风格合约无法指定这种上下文。近期研究将基于状态的合约推广为迹合约(trace contracts),它可指定过程的内部行为(如调用或状态变化),但无法指定其调用上下文。本文提出一种上下文感知迹合约的程序逻辑,用于指定异步程序的全局行为。我们还提供了一个可靠的证明系统,解决两大挑战:为不局限于在过程端点观测程序状态,我们提出了观测量词(observation quantifier)这一新概念;为应对过程可能的调用序列组合爆炸问题,我们将Liskov行为子类型原则迁移到异步过程分析中。

英文摘要:

The behavior of concurrent, asynchronous procedures depends in general on the call context, because of the global protocol that governs scheduling. This context cannot be specified with the state-based Hoare-style contracts common in deductive verification. Recent work generalized state-based to trace contracts, which permit to specify the internal behavior of a procedure, such as calls or state changes, but not its call context. In this article we propose a program logic of context-aware trace contracts for specifying global behavior of asynchronous programs. We also provide a sound proof system that addresses two challenges: To observe the program state not merely at the end points of a procedure, we introduce the novel concept of an observation quantifier. And to combat combinatorial explosion of possible call sequences of procedures, we transfer Liskov's principle of behavioral subtyping to the analysis of asynchronous procedures.

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

↑