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

高阶程序的关系逻辑

A Relational Logic for Higher-Order Programs

Alejandro Aguirre, Gilles Barthe, Marco Gaboardi, Deepak Garg, Pierre-Yves Strub

摘要:

关系程序验证是程序验证的一种变体,其中可以推理两个程序,并且作为一种特殊情况,可以在不同的输入上对单个程序进行两次执行。关系程序验证可用于推理广泛的属性,包括等价性和精化,以及诸如连续性、信息流安全性或相对成本等专门概念。在高阶环境中,关系程序验证可以使用关系精化类型系统来实现,关系精化类型系统是断言具有关系解释的一种精化类型。关系精化类型的系统擅长于将结构上等价的项关联起来,但是对于将结构非常不同的项关联起来,提供的支持有限。本文提出了一种逻辑,称为关系高阶逻辑(RHOL),用于证明具有归纳类型和递归定义的简单类型$λ$ -演算的关系性质。RHOL保留了关系精化类型系统的类型导向风格,但通过同时推理两个术语的规则以及只考虑两个术语之一的规则实现了更大的表达性。我们表明,RHOL具有强大的基础,通过证明与高阶逻辑(HOL)的等价性,并利用这种等价性来推导关键的元理论属性:主题约简,可接受的传递性规则和集合理论的合理性。此外,我们定义了几个现有的关系类型系统,如关系细化类型和依赖分析和相对成本的类型系统的声音嵌入,我们验证的例子是以前的工作无法达到的。

英文摘要:

Relational program verification is a variant of program verification where one can reason about two programs and as a special case about two executions of a single program on different inputs. Relational program verification can be used for reasoning about a broad range of properties, including equivalence and refinement, and specialized notions such as continuity, information flow security or relative cost. In a higher-order setting, relational program verification can be achieved using relational refinement type systems, a form of refinement types where assertions have a relational interpretation. Relational refinement type systems excel at relating structurally equivalent terms but provide limited support for relating terms with very different structures. We present a logic, called Relational Higher Order Logic (RHOL), for proving relational properties of a simply typed $λ$-calculus with inductive types and recursive definitions. RHOL retains the type-directed flavour of relational refinement type systems but achieves greater expressivity through rules which simultaneously reason about the two terms as well as rules which only contemplate one of the two terms. We show that RHOL has strong foundations, by proving an equivalence with higher-order logic (HOL), and leverage this equivalence to derive key meta-theoretical properties: subject reduction, admissibility of a transitivity rule and set-theoretical soundness. Moreover, we define sound embeddings for several existing relational type systems such as relational refinement types and type systems for dependency analysis and relative cost, and we verify examples that were out of reach of prior work.

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

↑