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

超霍尔逻辑:(否)证程序超性质(扩展版)

Hyper Hoare Logic: (Dis-)Proving Program Hyperproperties (extended version)

Thibault Dardinier, Peter Müller

AI总结:

本文提出将断言提升至任意状态集合性质的超霍尔逻辑,可在同一框架内证明和否证包括现有逻辑无法表达的任意程序超性质,且已证明其可靠性与完备性,所有结果均在Isabelle/HOL中验证。

摘要:

霍尔逻辑是一类可用于形式化确立计算机程序性质的证明系统。传统霍尔逻辑可证明单个程序执行的性质(例如功能正确性)。霍尔逻辑已被推广,也可证明程序多次执行的性质(即所谓的超性质,例如确定性或非干扰性)。这类程序逻辑证明的是(不良组合的)执行不存在。另一方面,学界已提出类似霍尔逻辑的程序逻辑(例如不正确性逻辑),通过证明(不良组合的)执行存在来否证程序性质。所有这些逻辑的共同点在于,它们使用基于固定数量状态的断言来描述程序性质,例如功能性质对应单个前置状态和后置状态,非干扰性则对应成对的前置状态和后置状态。本文提出超霍尔逻辑(Hyper Hoare Logic),这是霍尔逻辑的一种推广,将断言提升为针对任意状态集合的性质。由此得到的逻辑简洁却极具表达力:其判断可表达任意程序超性质,这是一类针对程序终止执行集合的特殊超性质(包含单个程序执行的性质)。通过允许断言对状态集合进行推理,超霍尔逻辑既能推理(组合的)执行的不存在性,也能推理其存在性,因此可在同一逻辑内支持证明和否证程序(超)性质,包括现有霍尔逻辑无法表达的(超)性质。我们证明了超霍尔逻辑具备可靠性和完备性,并证明它能自然地捕捉重要的证明原理。我们的所有技术结果均已在Isabelle/HOL中得到证明。

英文摘要:

Hoare logics are proof systems that allow one to formally establish properties of computer programs. Traditional Hoare logics prove properties of individual program executions (such as functional correctness). Hoare logic has been generalized to prove also properties of multiple executions of a program (so-called hyperproperties, such as determinism or non-interference). These program logics prove the absence of (bad combinations of) executions. On the other hand, program logics similar to Hoare logic have been proposed to disprove program properties (e.g., Incorrectness Logic), by proving the existence of (bad combinations of) executions. All of these logics have in common that they specify program properties using assertions over a fixed number of states, for instance, a single pre- and post-state for functional properties or pairs of pre- and post-states for non-interference. In this paper, we present Hyper Hoare Logic, a generalization of Hoare logic that lifts assertions to properties of arbitrary sets of states. The resulting logic is simple yet expressive: its judgments can express arbitrary program hyperproperties, a particular class of hyperproperties over the set of terminating executions of a program (including properties of individual program executions). By allowing assertions to reason about sets of states, Hyper Hoare Logic can reason about both the absence and the existence of (combinations of) executions, and, thereby, supports both proving and disproving program (hyper-)properties within the same logic, including (hyper-)properties that no existing Hoare logic can express. We prove that Hyper Hoare Logic is sound and complete, and demonstrate that it captures important proof principles naturally. All our technical results have been proved in Isabelle/HOL.

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

↑