Font Size: a A A

The Research And Implementation Of Dynamic Slicing System For C++ Program

Posted on:2009-06-13Degree:MasterType:Thesis
Country:ChinaCandidate:Y J WuFull Text:PDF
GTID:2178360272977150Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Program slicing is a technology of analyzing and understanding program. The technology of process-oriented program slicing is becoming more mature. However, object-oriented program slicing, especially object-oriented dynamic program slicing developed quite late and is still in the beginning stage at present. Traditional algorithms usually get dynamic program slices by building dependence graphs of the programs, but dependence graphs take lots of memory space, so they are inefficient. Xiangyu Zhang and others put forward a new algorithm called LP (Limited Preprocess) for dynamic program slicing. This algorithm makes good use of dependent information in the program without building a dependence graph, so this algorithm has some advantages, such as saving memory space, improving calculation efficiency, but it is only used for process-oriented program.This paper makes a deep study on object-oriented dynamic program slicing. Based on the advantages of LP algorithm, this paper improves this algorithm by considering the features of C++ language, and then proposes a new dynamic slicing algorithm for C++ object-oriented program. The new algorithm expands the concept of functions with taking member functions as global functions so as to solve slicing for member functions; The new algorithm expands the concept of function calls with taking sending message to objects as function calls so as to solve slicing for implicit function calls; The new algorithm uses the way of "object-variable" to store the interested variables so as to distinguish common variables, data members of object, and object variables which LP can't. This new algorithm can deal with the features of C++ program, such as polymorphic, inheritance and encapsulation, and is much more efficient than other C++ program slicing algorithms.Based on the proposed algorithm, this paper designs and implements a prototype system (CPP-SLICER) for C++ dynamic program slicing. The system uses a lexical analyzer and a grammar analyzer, which we have developed, to get the information of programs and uses program instrumentation to get the executed trace. After being tested, it can deal with the features of C++ program. At last, in order to make the system a better application to the field of program debugging, it is integrated into VC6.0 development environment by using the technique of COM (Component Object Model).
Keywords/Search Tags:Object-Oriented, Dynamic Program Slicing, Dependence Graph, Program Instrumentation, Demand-Driven, COM
PDF Full Text Request
Related items