论文标题

数据驱动的表示不变的推断

Data-Driven Inference of Representation Invariants

论文作者

Miltner, Anders, Padhi, Saswat, Millstein, Todd, Walker, David

论文摘要

表示不变的是一个属性,它具有由模块产生的所有抽象类型的值。代表不变在软件工程和程序验证中起重要作用。在本文中,我们开发了一种反例驱动的算法,用于推断一个表示不变的表示,该算法足以暗示模块的所需规范。关键的新颖性是一个针对可见归纳的类型的概念,可确保该算法在弱化和加强候选人不变性之间交替而朝着目标取得进步。该算法是通过基于示例的合成引擎和一个验证器进行参数化的,我们证明,假设合成器和验证者也是有限类型的一阶模块的声音和完整的。我们在称为河内的工具中实现了这些想法,该工具综合了表示递归数据类型的表示形式。河内不仅处理一阶代码的不变性,还可以处理高阶代码。在后端,河内使用了称为神话的枚举合成器,将枚举测试工具作为验证者。由于河内使用测试进行验证,但它并不是合理的,尽管我们的经验评估表明,它在我们研究的基准上取得了成功。

A representation invariant is a property that holds of all values of abstract type produced by a module. Representation invariants play important roles in software engineering and program verification. In this paper, we develop a counterexample-driven algorithm for inferring a representation invariant that is sufficient to imply a desired specification for a module. The key novelty is a type-directed notion of visible inductiveness, which ensures that the algorithm makes progress toward its goal as it alternates between weakening and strengthening candidate invariants. The algorithm is parameterized by an example-based synthesis engine and a verifier, and we prove that it is sound and complete for first-order modules over finite types, assuming that the synthesizer and verifier are as well. We implement these ideas in a tool called Hanoi, which synthesizes representation invariants for recursive data types. Hanoi not only handles invariants for first-order code, but higher-order code as well. In its back end, Hanoi uses an enumerative synthesizer called Myth and an enumerative testing tool as a verifier. Because Hanoi uses testing for verification, it is not sound, though our empirical evaluation shows that it is successful on the benchmarks we investigated.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源