引用本文: | 苏小红,龚丹丹,王甜甜,马培军.一种新的过程间静态切片快速算法[J].哈尔滨工业大学学报,2015,47(5):25.DOI:10.11918/j.issn.0367-6234.2015.05.005 |
| SU Xiaohong,GONG Dandan,WANG Tiantian,MA Peijun.A new fast algorithm for interprocedural static slicing[J].Journal of Harbin Institute of Technology,2015,47(5):25.DOI:10.11918/j.issn.0367-6234.2015.05.005 |
|
摘要: |
针对传统的基于PDG、SDG的程序切片算法需要计算与程序切片无关的数据依赖而导致计算复杂度高的问题,提出一种新的过程间静态切片快速算法.该算法无需使用PDG、SDG的程序中间表示形式,而是根据TOKEN序列和复合语句控制结构信息表,将程序表示为idUCf五元结构,并在此基础上计算程序的过程间静态切片.实验结果表明,该算法在保证多层嵌套结构程序的静态切片完整性的前提下,充分考虑了函数调用信息,降低了时间与空间复杂度.本算法只计算与切片相关的数据依赖、控制依赖以及函数调用信息,计算复杂度低. |
关键词: 系统依赖图 静态切片 TOKEN序列 控制依赖 数据依赖 |
DOI:10.11918/j.issn.0367-6234.2015.05.005 |
分类号:TP311 |
基金项目:国家自然科学基金(1,2);上海市自然科学基金(15ZR1421400). |
|
A new fast algorithm for interprocedural static slicing |
SU Xiaohong, GONG Dandan, WANG Tiantian, MA Peijun
|
(School of Computer Science and Technology,Harbin Institute of Technology,150001 Harbin,China)
|
Abstract: |
The data dependences irrelevant to program slicing should be calculated in traditional static program slicing algorithms based on PDG and SDG. To deal with this problem, a new fast algorithm for interprocedural static slicing is proposed in this paper, in which the program is represented as idUCF 5-tuple structure according to TOKEN and the information about control-flow of compound statement, and the interprocedural static slicing is calculated without using of intermediate representation of program, such as PDG and SDG. Experimental results show that the proposed method takes the information about function call into full account, reduces time and space complexity and ensures the integrity of static slicing for program with multi-nested structure. The algorithm only calculates the data dependence, control dependence and function call relevant to slicing. Thus, it has a low computation complexity. |
Key words: system dependence graph static slicing TOKEN control dependence data dependence |