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

条件上下文细化(CCR)

Conditional Contextual Refinement (CCR)

Youngju Song, Minki Cho, Dongjae Lee, Chung-Kil Hur

摘要:

上下文精化(CR)是指定开放程序的标准概念之一。CR有两个主要优点:(i)(水平和垂直)组合性,其允许我们将大的上下文细化分解成许多较小的细化,从而实现模块化和增量验证,以及(ii)对编程特征没有限制,从而允许,例如,相互递归、指针值传递和高阶函数。然而,CR有一个缺点,它不能对上下文施加条件,因为它量化了所有上下文,这确实在支持完整的组合性和编程特性方面发挥了关键作用。在本文中,我们解决的问题,找到一个概念的细化,满足所有三个要求:支持完整的组合性,完整的(顺序)编程功能,并在上下文丰富的条件。作为一种解决方案,我们提出了一种新的细化理论,称为CCR(条件上下文细化),并开发了一个验证框架的基础上,它允许我们模块化和增量验证一个具体的模块对一个抽象的模块分离逻辑风格的前和后条件下的外部模块。它在Coq中完全形式化,并提供了一种证明模式,该模式结合了(i)关于保留IO事件和终止等副作用的模拟推理和(ii)关于前置和后置条件的命题推理。此外,验证结果与CompCert相结合,使我们正式建立从顶级抽象程序的行为细化,一直到他们的汇编代码。

英文摘要:

Contextual refinement (CR) is one of the standard notions of specifying open programs. CR has two main advantages: (i) (horizontal and vertical) compositionality that allows us to decompose a large contextual refinement into many smaller ones enabling modular and incremental verification, and (ii) no restriction on programming features thereby allowing, e.g., mutually recursive, pointer-value passing, and higher-order functions. However, CR has a downside that it cannot impose conditions on the context since it quantifies over all contexts, which indeed plays a key role in support of full compositionality and programming features. In this paper, we address the problem of finding a notion of refinement that satisfies all three requirements: support of full compositionality, full (sequential) programming features, and rich conditions on the context. As a solution, we propose a new theory of refinement, called CCR (Conditional Contextual Refinement), and develop a verification framework based on it, which allows us to modularly and incrementally verify a concrete module against an abstract module under separation-logic-style pre and post conditions about external modules. It is fully formalized in Coq and provides a proof mode that combines (i) simulation reasoning about preservation of sideffects such as IO events and termination and (ii) propositional reasoning about pre and post conditions. Also, the verification results are combined with CompCert, so that we formally establish behavioral refinement from top-level abstract programs, all the way down to their assembly code.

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

↑