数据驱动的图书馆规范溯因推理
Data-Driven Abductive Inference of Library Specifications
摘要:
程序员经常利用数据结构库来提供有用的和可重用的抽象。利用这些库的程序的模块化验证自然依赖于捕获关于库期望如何访问和操纵这些数据结构的重要属性的规范。然而,这些规范往往缺失或不完整,使客户很难相信他们正在安全地使用库。当库源代码也不可用时,通常情况下,推断有意义的规范的挑战会进一步加剧。在本文中,我们提出了一种新的数据驱动的溯因推理机制,推断规范库的方法足以使验证库的客户端。我们的技术结合了一个数据驱动的基于学习的框架来假设候选规范,以及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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。