数组携带符号执行用于函数契约生成
Array-Carrying Symbolic Execution for Function Contract Generation
AI总结:
本文提出了一种符号执行框架,用于处理数组操作中的函数契约生成问题,通过携带数组段的不变式和 assigns 信息,提升了对复杂数组操作的分析能力。
摘要:
函数契约生成是程序分析中的经典问题,旨在对程序中的多个过程进行自动化分析。该问题在过程间分析中是基础性的,其中首先通过生成函数契约获得函数的属性,然后将生成的契约作为构建块来分析整个程序。典型的函数契约生成目标包括前/后条件和 assigns 信息(指定了函数执行过程中对程序变量和内存段的修改信息)。在涉及数组操作的程序中,函数契约生成中的关键点是对数组段的处理,这在推断此类段的不变式和 assigns 信息时带来了挑战。为了解决这一挑战,我们提出了一种新颖的符号执行框架,该框架在数组的连续段上携带不变式和 assigns 信息。我们实现该框架作为 LLVM 中的原型,并进一步将其原型与 ACSL 断言格式和 Frama-C 软件验证平台集成。在对文献中的各种基准和现实库中的函数进行实验评估后,我们的框架能够处理确实涉及数组信息传递的数组操作函数,并且超越了现有方法。
英文摘要:
Function contract generation is a classical problem in program analysis that targets the automated analysis of functions in a program with multiple procedures. The problem is fundamental in inter-procedural analysis where properties of functions are first obtained via the generation of function contracts and then the generated contracts are used as building blocks to analyze the whole program. Typical objectives in function contract generation include pre-/post-conditions and assigns information (that specifies the modification information over program variables and memory segments during function execution). In programs with array manipulations, a crucial point in function contract generation is the treatment of array segments that imposes challenges in inferring invariants and assigns information over such segments. To address this challenge, we propose a novel symbolic execution framework that carries invariants and assigns information over contiguous segments of arrays. We implement our framework as a prototype within LLVM, and further integrate our prototype with the ACSL assertion format and the Frama-C software verification platform. Experimental evaluation over a variety of benchmarks from the literature and functions from realistic libraries shows that our framework is capable of handling array manipulating functions that indeed involve the carry of array information and are beyond existing approaches.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。