相似执行路径的生成是代码分析和检测的基础性工作之一,现有的方法通常以程序的行为序列或结构为分析对象,通过改变关键谓词的取值等方法来进行分析,但由于缺乏必要的引导信息导致生成的相似路径的有效性较低,另外由于路径的谓词集合较长而难以求解也降低了分析的精度.提出基于动态协同双向映射的分析方法,通过对程序控制流图的表示形式进行扩展,结合后向符号分析的方法生成候选路径的最弱前置条件,并以此为引导信息使用编辑距离的方法通过改变距离因子的取值来生成有针对性的相似路径集合.实验结果表明,与现有的方法相比,该方法的准确性和效率有明显的优势.
Similar execution paths generation is one of the fundamental tasks in code analysis and detection. The current methods usually target to the program behavior or program structure,and change the value of key predicates,but these methods has a low effectiveness due to the lack of the necessary guidance information,Meanwhile,the predicates set has a large size and usually hard to solve,thus it will reduce the analyze precision as well. A technique of similar execution paths generation based on dynamic synergy bidirectional mapping is proposed in this paper. According to extend the shape of Control Flow Graph and use the backward symbolic analysis,the weakest precondition of the candidate path is generated,which can be used as the guidance information to generate pointed similar execution paths set according to the edit distance via changing the distance factor.The experimental results show that this method has the advantage of precision and anti-inference.