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

用于符号执行的高效循环导航

Efficient Loop Navigation for Symbolic Execution

Jan Obdrzalek, Marek Trtik

摘要:

符号执行是软件验证和测试中一种非常成功和流行的技术。符号执行的一个关键限制是处理包含循环的代码。问题是,即使是一个循环也可以生成大量不同的符号执行路径,对应于不同的循环迭代次数,并通过循环采取各种路径。我们介绍了一种技术,给定一个起始位置以上的一些循环和目标位置的任何地方低于这些循环,返回这两个位置之间的可行路径,如果这样的路径存在。该技术从程序中推断出一系列约束系统,并使用它们来引导符号执行朝向目标。在到达一个循环时,它迭代地解决适当的约束系统,以找出通过这个循环的路径,或者,是否继续在循环之下。为了构造约束系统,我们将在循环中修改的变量的值表示为通过循环执行给定路径的次数的函数。我们已经建立了一个原型实现我们的技术,并将其与最先进的符号执行工具的简单程序循环。结果表明,在运行时间显着改善。我们发现我们的算法在几秒钟内完成,而其他工具在一小时内没有完成。我们的方法也表现出非常好的结果的情况下,当目标位置是不可到达的任何可行路径。

英文摘要:

Symbolic execution is a successful and very popular technique used in software verification and testing. A key limitation of symbolic execution is in dealing with code containing loops. The problem is that even a single loop can generate a huge number of different symbolic execution paths, corresponding to different number of loop iterations and taking various paths through the loop. We introduce a technique which, given a start location above some loops and a target location anywhere below these loops, returns a feasible path between these two locations, if such a path exists. The technique infers a collection of constraint systems from the program and uses them to steer the symbolic execution towards the target. On reaching a loop it iteratively solves the appropriate constraint system to find out which path through this loop to take, or, alternatively, whether to continue below the loop. To construct the constraint systems we express the values of variables modified in a loop as functions of the number of times a given path through the loop was executed. We have built a prototype implementation of our technique and compared it to state-of-the-art symbolic execution tools on simple programs with loops. The results show significant improvements in the running time. We found instances where our algorithm finished in seconds, whereas the other tools did not finish within an hour. Our approach also shows very good results in the case when the target location is not reachable by any feasible path.

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

↑