Font Size: a A A

The Application Of Forward Computation Of Dynamic Slices In Locating Program Faults

Posted on:2020-05-08Degree:MasterType:Thesis
Country:ChinaCandidate:X Y QiuFull Text:PDF
GTID:2518306503971969Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Usually,most of the work in software testing is time consuming and expensive,the most expensive of which is error location,and the improvement of error location technology can reduce the workload of testing.At present,the methods of program error location mainly include program dynamic and static slicing,spectrum-based statement analysis,etc.Dynamic slicing can remove statements that do not affect the value of variables in target statement by analyzing the dependencies of the related variables in the test run,and shift the focus to related program statements to reduce the scope of investigation.The spectrum-based fault localization(SFL)derives from the principle of similarity consistency in clustering analysis,and the similarity coefficients is based on dynamic test results and different spectrum information obtained from the test.Generally,the SFL method neglects the factor that the statement is executed but does not affect the result of the slice,but the statement unrelated to the result of the slices is still counted,this fact affect the calculation of suspicion degree.In another case,some statements are executed many times,but the spectrum statistics only records weather the distinct statement is executed,the frequency of execution is not cared,All these factors lead to the deviation of the localization effect.To solve this problem,this paper presents a method of the coverage frequency fault location based on program slicing.First,the execution frequency of each statement under each test case is counted,the dynamic slices including the control dependence and data dependence statements affecting the variables of interest points under each test case are obtained by forward computation algorithm.If the statements in the execution path under the corresponding test case are included in the slice result set,then the real statement execution frequency is remained,otherwise the frequency value is set to zero.The experimental results demonstrate that the approach proposed can increase the efficiency of fault localization.The main work of this paper is as follows:(1)Program slicing contain static slicing and dynamic slicing.Static slicing analysis all possible program execution path,while dynamic slicing only obtain these statements that affect variable values at the target point under a specific input,the slices are more smaller.The dynamic slicing algorithm commonly used include forward computation and backward computation.Program slicing based on backward computation needs to track backward the execution path of the program,it needs large space cost.On the other hand,for the forward computing method,when the program is executed,the latest dynamic slices of all program variables are computed and recorded,it need to track back the execution and calculate again.In this paper,the forward slicing algorithm is described in detail and improvements that reducing redundancy existing in the current algorithm is proposed.(2)In SFL,users only pays attention to the information of covered of statement coverage,but does not utilize the frequency characteristic that may affect the result of localization,that may lead to the estimation of some statement's fault possibility.The FLSF counts the sentence frequency of each statement,and normalize the value of each sentence frequency to[0,1] to reach the requirement for the evaluation formula.According to the characteristics of FLSF and dynamic slicing,this paper proposes a method to locate errors by combining FLSF with forward dynamic slicing.The main purpose of this method is to remove the irrelevant subset of program statements in execution path,set the frequency value of irrelevant statements in statement spectrum matrix to zero,and then calculate the suspicious value for each statement.The effectiveness and stability of this method are compared with the result from SFL or FLSF.(3)In order to verify the effectiveness of FLSF based on dynamic slicing,experiments were taken under SIEMENS SUITE and only the versions has one error in the suite were selected as the test cases.The cost of error detection under SFL,FLSF and FLSF based on dynamic slicing was compared under different suspicion evaluation methods.On the other hand,34 versions of TCAS program were selected to compare the approach proposed with others respectively.The results show the percentage of total faults located is different according to the same percentage of codes examined in different method,it is concluded that the proposed method(FLSF based on dynamic slicing)has more advantages in locating fault.
Keywords/Search Tags:fault localization, program spectrum, program slices, automated debugging
PDF Full Text Request
Related items