一种基于层次切片的软件错误定位方法  被引量:6

Software fault localization based on hierarchical slicing

在线阅读下载全文

作  者:许高阳[1] 李必信[1] 孙小兵[1] 陶传奇[1] 

机构地区:[1]东南大学计算机科学与工程学院,南京210096

出  处:《东南大学学报(自然科学版)》2010年第4期692-698,共7页Journal of Southeast University:Natural Science Edition

基  金:国家自然科学基金资助项目(60773105);国家高技术研究发展计划(863计划)资助项目(2007AA01Z141);教育部新世纪优秀人才支持计划资助项目(NCET-06-0466)

摘  要:提出了一种基于层次切片模型适合面向对象语言的错误定位方法.首先分别在包层、类层、方法层删去通过测试的包、类和方法,缩小软件错误存在的范围;其次,在语句层将删减后的程序按抽象语法树划分成若干模块,统计模块内变量使用的数目;通过动态分析,选取一组测试用例计算其执行历史;根据模块内使用变量数目的规模,采用逐步求精算法,计算产生错误测试用例的程序执行历史与静态分析过程中所产生模块的交集及交集的后向切片,直至实现错误定位.实验数据表明:该方法能够查出前期定位程序中绝大部分错误的位置,尤其适用在方法调用比较少的程序中.在方法调用比较频繁的程序中,由于在调用语句处迭代调用逐步求精算法,效率会降低.A novel HSM(hierarchical slicing model)-based fault localization technique is proposed for object-oriented programs.Firstly,the scope of fault localization is reduced by deleting packages,classes and methods which have passed the tests,then the reduced program will be partitioned into some modules based on AST(abstract syntax tree) by analyzing statements,and further,the number of variables within each module are computed independently.Then,execution history is computed based on a set of test cases.Finally,according to the size of the variables used in the modules,the intersection of each module and its backward slice are iteratively calculated using the SSA(stepwise slicing algorithm) until faults are eventually localized.Experimental results show that: the method can locate the most faults early,especially in the program with less method calling relationship.The SSA is called iteratively in the program where the method is called more frequently.Thus,the efficiency is reduced.

关 键 词:层次切片模型 抽象语法树 执行历史 逐步求精 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象