Data-driven abductive inference of library specifications

Data-driven abductive inference of library specifications
复制标题

DOI:
10.1145/3485493
复制
发表时间:
2021-08
影响因子:
--
通讯作者:
Zhe Zhou;R. Dickerson;Benjamin Delaware;S. Jagannathan
Zhe Zhou;R. Dickerson;Benjamin Delaware;S. Jagannathan
中科院分区:
--
文献类型:
--
作者:
Zhe Zhou;R. Dickerson;Benjamin Delaware;S. Jagannathan

文献摘要

被引文献

相似文献

程序员通常利用提供有用且可重复使用的抽象的数据结构库。使用这些库的程序的模块化验证自然依赖于捕获有关图书馆如何期望这些数据结构访问和操纵的重要属性的规格。但是,这些规格通常是缺少或不完整的,使客户难以确信他们安全地使用库。当图书馆源代码也不可用时,通常情况下,推断有意义的规范的挑战将进一步加剧。在本文中,我们提出了一种新型的数据驱动的绑架推理机制,该机制涉及足以验证库客户端的图书馆方法的规格。我们的技术结合了一个基于数据驱动的学习框架,以假定候选规格,以及SMT提供的反例以完善这些候选者,并特别注意防止生成过度适合采样测试的规格。结果规格构成了对图书馆实施行为的最少要求,以确保特定客户计划的安全性。因此,我们的解决方案提供了一个新的多侵蚀过程,以精确的规范推断数据结构库,以客户端验证任务为指导。对各种现实的OCAML数据结构程序的实验结果证明了该方法的有效性。
Programmers often leverage data structure libraries that provide useful and reusable abstractions. Modular verification of programs that make use of these libraries naturally rely on specifications that capture important properties about how the library expects these data structures to be accessed and manipulated. However, these specifications are often missing or incomplete, making it hard for clients to be confident they are using the library safely. When library source code is also unavailable, as is often the case, the challenge to infer meaningful specifications is further exacerbated. In this paper, we present a novel data-driven abductive inference mechanism that infers specifications for library methods sufficient to enable verification of the library's clients. Our technique combines a data-driven learning-based framework to postulate candidate specifications, along with SMT-provided counterexamples to refine these candidates, taking special care to prevent generating specifications that overfit to sampled tests. The resulting specifications form a minimal set of requirements on the behavior of library implementations that ensures safety of a particular client program. Our solution thus provides a new multi-abduction procedure for precise specification inference of data structure libraries guided by client-side verification tasks. Experimental results on a wide range of realistic OCaml data structure programs demonstrate the effectiveness of the approach.