基于双向反馈的高效排序函数终止性分析
Efficient Ranking Function-Based Termination Analysis with Bi-Directional Feedback
AI总结:
本文提出终止性分析框架Syndicate,通过双向反馈同时指导排序函数与循环不变量的搜索,在提升可证明终止程序数量的同时降低平均证明时间,性能优于现有工具。
摘要:
合成排序函数是证明循环终止性的常用技术。排序函数必须有界,并且对于所有可达程序状态,在每次迭代中按指定量递减。然而,可达程序状态集合通常是未知的,通常使用循环不变量对其进行过近似。因此,证明循环的终止性需要同时搜索排序函数和循环不变量。现有的基于排序函数的终止性分析技术大致可分为三类:(i)独立合成排序函数和不变量;(ii)将不变量合成与排序函数合成合并为单个查询;(iii)从排序函数合成向不变量合成提供有限反馈以指导不变量合成。这些方法要么搜索空间过大,要么在较小的独立搜索空间中探索效率低下。在这项工作中,我们提出了一个新颖的终止性分析框架 Syndicate,它利用双向反馈来指导排序函数和不变量的搜索,从而增加了可被证明终止的程序数量,并相比基线减少了证明终止所需的平均时间。Syndicate 具有通用性,允许对模板、子过程和参数进行不同的实例化,为用户提供了优化排序函数合成的灵活性。根据所使用的模板,Syndicate 具有相对完备性和高效性,优于现有技术中最多只能保证其中一种性质的方法。值得注意的是,尽管与基线相比方法更简单,Syndicate 在已证明的基准数量和平均运行时间方面的性能与现有工具相当或更优。
英文摘要:
Synthesizing ranking functions is a common technique for proving the termination of loops. A ranking function must be bounded and decrease by a specified amount with each iteration for all reachable program states. However, the set of reachable program states is often unknown, and loop invariants are typically used to overapproximate it. So, proving the termination of a loop requires searching for both a ranking function and a loop invariant. Existing ranking function-based termination analysis techniques can be broadly categorized as (i) those that synthesize the ranking function and invariants independently, (ii) those that combine invariant synthesis with ranking function synthesis into a single query, and (iii) those that offer limited feedback from ranking function synthesis to guide invariant synthesis. These approaches either suffer from having too large a search space or inefficiently exploring the smaller, individual search spaces. In this work, we present a novel termination analysis framework Syndicate, which exploits bi-directional feedback to guide the searches for both ranking functions and invariants, increasing the number of programs that can be proven to terminate and reduces the average time needed to prove termination compared to baselines. Syndicate is general and allows different instantiations of templates, subprocedures, and parameters, offering users the flexibility to optimize the ranking function synthesis. Depending on the templates used, Syndicate is relatively complete and efficient, outperforming existing techniques that achieve at most one of these guarantees. Notably, despite a simpler approach compared to the baselines, Syndicate's performance is either comparable to or better than existing tools in terms of the number of benchmarks proved and average runtime.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。