Dependence Analysis Based on Dynamic Slicing for Debugging
Chen Zhen qiang 1, Xu Bao wen 1,2 1 Department of Computer Science & Engineering, Southeast University, Nanjing 210096, China; 2 State Key Laboratory of Software Engineering, Wuhan University, Wuhan 430072, China
Dynamic program slicing is an effective technique for narrowing the errors to the relevant parts of a program when debugging. Given a slicing criterion, the dynamic slice contains only those statements that actually affect the variables in the slicing criterion. This paper proposes a dynamic slicing method based on static dependence analysis. It uses the program dependence graph and other static information to reduce the information needed to be traced during program execution. Thus, the efficiency is dramatically improved while the precision is not depressed. The slicing criterion is modified to fit for debugging. It consists of file name and the line number at which the statement is.