LoopSCC:面向确定周期内多分支循环的总结方法
LoopSCC: Towards Summarizing Multi-branch Loops within Determinate Cycles
AI总结:
本文提出LoopSCC,一种针对复杂多分支循环的总结方法,通过强连通分量收缩和振荡区间识别,实现高精度循环语义解释,在基准上达100%准确率,并具良好可扩展性。
摘要:
分析包含循环的程序是一项具有挑战性的任务,面临迭代次数不确定和控制流复杂度指数增长等潜在问题。循环总结作为一种用于具体语义解释的静态分析方法,受到越来越多的关注。它生成与循环程序语义等价的符号表达式。然而,当前的循环总结方法仅适用于单分支循环或具有简单循环的多分支循环,无法支持具有不规则分支间转换的复杂循环。在本文中,我们提出了LoopSCC,一种新颖的循环总结技术,以实现对复杂循环的具体语义解释。LoopSCC以单循环路径为粒度分析控制流,并应用强连通分量(简称SCC)进行收缩和简化,得到收缩后的单循环路径图(简称CSG)。基于CSG提供的控制流信息,我们可以将循环总结转换为SCC总结的组合。当SCC包含不规则的分支间转换时,我们提出探索一个收敛范围以识别不同执行路径的确定周期,称为振荡区间。由迭代条件和执行操作组成的循环总结最终可以递归推导得出。我们进行了大量实验,与六种最先进的循环解释方法进行比较,以评估LoopSCC的有效性。结果表明,LoopSCC在解释准确性和应用有效性方面均优于比较方法。特别是,LoopSCC在公开常用基准上实现了100%的解释准确性。对三个大规模程序循环属性的系统研究表明,LoopSCC对真实世界循环程序表现出出色的可扩展性。
英文摘要:
Analyzing programs with loops is a challenging task, suffering from potential issues such as indeterminate number of iterations and exponential growth of control flow complexity. Loop summarization, as a static analysis method for concrete semantic interpretation, receives increasing focuses. It produces symbolic expressions semantically equivalent to the loop program. However, current loop summarization methods are only suitable for single-branch loops or multi-branch loops with simple cycles, without supporting complex loops with irregular branch-to-branch transitions. In this paper, we proposed LoopSCC, a novel loop summarization technique, to achieve concrete semantic interpretation on complex loop. LoopSCC analyzes the control flow at the granularity of single-loop-path and applies the strongly connected components (SCC for short) for contraction and simplification, resulting in the contracted single-loop-path graph (CSG for short). Based on the control flow information provided by the CSG, we can convert the loop summary into a combination of SCC summaries. When an SCC contains irregular branch-to-branch transitions, we propose to explore a convergent range to identify the determinate cycles of different execution paths, referred as oscillatory interval. The loop summarization composed of both iteration conditions and execution operations can eventually be derived recursively. Extensive experiments compared to six state-of-the-art loop interpretation methods are conducted to evaluate the effectiveness of LoopSCC. From the results, LoopSCC outperforms comparative methods in both interpretation accuracy and application effectiveness. Especially, LoopSCC achieves a 100% interpretation accuracy on public common-used benchmark. A systematical study for loop properties on three large-scale programs illustrates that LoopSCC presents outstanding scalability for real-world loop programs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。