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

面向实用线性整数算术(LIA)循环不变式自动化的概率保证

Probabilistic Guarantees for Practical LIA Loop Invariant Automation

Ashish Kumar, Jilaun Zhang, Saeid Tizpaz-Niari, Gang Tan

AI总结:

针对数据驱动循环不变式推断缺乏理论保证的问题,提出结合模拟退火、SMT求解器与计算几何ε-网的方法,通过实分析优化搜索、并行提升成功率,实现工具DLIA2性能对标先进水平且在特定程序子类上优于GSpacer。

摘要:

尽管程序的形式化安全验证需求至关重要,但发现循环不变式仍是一项重大挑战。静态分析是推断循环不变式的核心技术,但通常依赖于对底层理论的大量假设。由动态分析与机器学习算法支撑的数据驱动方法,已在部分高难度程序的循环不变式推断中展现出优异性能。然而,当前最先进的数据驱动技术无法为循环不变式的发现提供理论保证。我们提出一种新技术,结合模拟退火(SA)搜索算法、SMT求解器与计算几何,为数据驱动方法的循环不变式推断提供概率保证。该方法通过实分析优化SA搜索以定义搜索空间,并采用并行机制提升成功概率。为确保算法收敛,我们引入了计算几何中的核心概念ε-网。我们的工具DLIA2实现了上述算法,性能与当前最先进技术相当。我们还识别出一类程序子类,在该子类上我们的表现优于现有最先进工具GSpacer。

英文摘要:

Despite the crucial need for formal safety and security verification of programs, discovering loop invariants remains a significant challenge. Static analysis is a primary technique for inferring loop invariants but often relies on substantial assumptions about underlying theories. Data-driven methods supported by dynamic analysis and machine learning algorithms have shown impressive performance in inferring loop invariants for some challenging programs. However, state-of-the-art data-driven techniques do not offer theoretical guarantees for finding loop invariants. We present a novel technique that leverages the simulated annealing (SA) search algorithm combined with SMT solvers and computational geometry to provide probabilistic guarantees for inferring loop invariants using data-driven methods. Our approach enhances the SA search with real analysis to define the search space and employs parallelism to increase the probability of success. To ensure the convergence of our algorithm, we adapt e-nets, a key concept from computational geometry. Our tool, DLIA2, implements these algorithms and demonstrates competitive performance against state-of-the-art techniques. We also identify a subclass of programs, on which we outperform the current state-of-the-art tool GSpacer.

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

↑