计算机应用与软件
計算機應用與軟件
계산궤응용여연건
COMPUTER APPLICATIONS AND SOFTWARE
2014年
9期
16-21,39
,共7页
错误定位%测试为基础的错误定位%随机错误定位方法
錯誤定位%測試為基礎的錯誤定位%隨機錯誤定位方法
착오정위%측시위기출적착오정위%수궤착오정위방법
Faultlocalisation%Testingbasedfaultlocalisation%Randomtestingbasedfaultlocalisation
运用测试集对程序错误语句定位算法,现在被统称为TBFL(testing based fault localization)方法。目前通行的算法,一般都没有利用测试员、程序员关于测试用例和程序的先验知识,致使这些“资源”白白浪费掉。随机TBFL方法是一类新的TBFL方法,其精神就是在随机理论的框架下,把这些先验知识和实际测试活动结合起来,从而对程序错误语句更好地定位。随机TBFL算法也可以看成是这种类型算法的一般“模式”,人们可以从这个一般性的模式里,开发出不同的算法。基于Santelices等人的思想,对随机TBFL算法作了改进。主要是从测试结果里,构造执行矩阵E和功效矩阵F两个工具,通过它们结合测试集和程序先验知识,对程序语句出错可能性引入两个级别的排序,然后对这两个排序进行“平均”,得到程序语句出错可能性的平均等级排序,它可以作为程序员改正程序错误的导向。还提出两个有关不同TBFL算法比较标准,就这两个标准,在一些具体实例上,该算法和其他一般方法以及随机TBFL方法对比,效果令人满意。
運用測試集對程序錯誤語句定位算法,現在被統稱為TBFL(testing based fault localization)方法。目前通行的算法,一般都沒有利用測試員、程序員關于測試用例和程序的先驗知識,緻使這些“資源”白白浪費掉。隨機TBFL方法是一類新的TBFL方法,其精神就是在隨機理論的框架下,把這些先驗知識和實際測試活動結閤起來,從而對程序錯誤語句更好地定位。隨機TBFL算法也可以看成是這種類型算法的一般“模式”,人們可以從這箇一般性的模式裏,開髮齣不同的算法。基于Santelices等人的思想,對隨機TBFL算法作瞭改進。主要是從測試結果裏,構造執行矩陣E和功效矩陣F兩箇工具,通過它們結閤測試集和程序先驗知識,對程序語句齣錯可能性引入兩箇級彆的排序,然後對這兩箇排序進行“平均”,得到程序語句齣錯可能性的平均等級排序,它可以作為程序員改正程序錯誤的導嚮。還提齣兩箇有關不同TBFL算法比較標準,就這兩箇標準,在一些具體實例上,該算法和其他一般方法以及隨機TBFL方法對比,效果令人滿意。
운용측시집대정서착오어구정위산법,현재피통칭위TBFL(testing based fault localization)방법。목전통행적산법,일반도몰유이용측시원、정서원관우측시용례화정서적선험지식,치사저사“자원”백백낭비도。수궤TBFL방법시일류신적TBFL방법,기정신취시재수궤이론적광가하,파저사선험지식화실제측시활동결합기래,종이대정서착오어구경호지정위。수궤TBFL산법야가이간성시저충류형산법적일반“모식”,인문가이종저개일반성적모식리,개발출불동적산법。기우Santelices등인적사상,대수궤TBFL산법작료개진。주요시종측시결과리,구조집행구진E화공효구진F량개공구,통과타문결합측시집화정서선험지식,대정서어구출착가능성인입량개급별적배서,연후대저량개배서진행“평균”,득도정서어구출착가능성적평균등급배서,타가이작위정서원개정정서착오적도향。환제출량개유관불동TBFL산법비교표준,취저량개표준,재일사구체실례상,해산법화기타일반방법이급수궤TBFL방법대비,효과령인만의。
ThelocalisationalgorithmsofprogramserrorstatementsbyusingtestsuitesarenowcollectivelycalledtheTBFL(testingbased fault localisation)approaches.However,current general algorithms usually do not make use of the prior knowledge about the test cases and programs of testers and programmers,so that they waste these valuable“resources”.Stochastic TBFL is a new kind of TBFL approach,whose spirit is to combine the prior knowledge with actual testing activities under the framework of stochastic theory,so as to better locate program errors.Stochastic TBFL may be regarded as a general pattern of this kind of approach,from which people can develop various algorithms. Inspired by Santelices et las idea,we do an improvement on stochastic TBFL.It is mainly to construct two tools,the executive matrix E and the efficiency matrix F,from the testing results.Then the test suite of program and the prior knowledge are combined through them,and for the probability of program statements to be in error,a two scales ranking is introduced,and then the two rankings are“averaged”,in this way we get the average scale rank of the probability of program statements to be in error,which can be used as the direction for programmers to correct the program errors.Moreover,in this paper we also present two correlated comparative standards for different TBFL algorithms,and in regard to these two standards,the proposed algorithm achieves satisfactory effect on some specific instances in contrast to other general approaches and the stochastic TBFL method.