Font Size: a A A

Program Slicing Techniques And Its Application In Object-Oriented Software Metrics And Software Test

Posted on:2001-12-11Degree:DoctorType:Dissertation
Country:ChinaCandidate:B X LiFull Text:PDF
GTID:1118360155474057Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Program slicing is a program analyzing technique that reduces programs to those statements that are relevant for a particular computation. A slice provides the answer to the question "What program statements potentially affect the value of variable v at statement s? "Mark Weiser introduced program slicing because he made the observation that programmers have some abstractions about the program in mind during debugging. When debugging a program one follows the dependence from the erroneous statement s back to the influencing parts of the program. These statements may influence s either because they decide whether s is executed or because they define a variable that is used by s. Program slicing computes these dependence automatically and thus assists the programmer in a lot a error prone tasks, such as debugging, testing, software maintenance, program integration, and software quality assurance. Object-oriented programming languages have attracted more and more attention during the last years since they allow one to write programs that are more flexible, reusable and maintainable. However, the concepts of classes, objects, inheritance, polymorphism, and dynamic binding represent new challenges for static program analysis. They make representation and analysis techniques, developed for imperative language programs, inadequate for use with object-oriented programs. In this thesis, we should study the object-oriented program slicing techniques and its applications in object-oriented software metrics and reuse. The main contribution of this thesis are as follows: 1. A scheme for extending traditional system dependence graph based on object orientation is presented to compute object-oriented program slice, and make the system dependence graph(SDG) suiting for representing object-oriented program(called OOSDG) is constructed by combining SDG with class dependence subgraph(ClDS), class hierarchy subgraph(CHS) and virtual function call graph(VFCG). The extension of syntax and semantics and function of SDG are discussed. Meantime, the algorithm for constructing OOSDG is provided, and application view is also analyzed at the end of chapter 3. 2. It is an efficient way to use system dependence graph in slicing object-oriented program. But SDG is too complicated, so it may produce mistakes during constructing SDG, which will lead to not exact result. In chapter 4, the simplified system dependence graph (SSDG) is presented, which ignores nodes and edges representing parameter-in or parameter-out and summary edges. Meantime, the concept of coarse-grained slice for object-oriented program is defined, its properties are discussed, the relationships between coarse-grained slice and fine-grained slice are compared, the algorithm for constructing coarse-grained slice is presented, and the implementation is also discussed at the end of this chapter. 3. In chapter 5, a new hierarchy slicing approach is presented suits for object-oriented program. The main idea of hierarchy slice and algorithm are also discussed in this chapter, and the application of hierarchy slicing algorithm is also presented at the end of this chapter. 4. People usually use statistical or information-flow based method to measure object-oriented properties during studying object-oriented metrics, such as basic metric, CK metrics and Aoki metrics etc. In chapter 6, a framework based on program slicing is introduced to measure coupling in JAVA, and a kind of more precise metric method than those based on information-flow is got by measuring couple relationship in JAVA source code. 5. In chapter 7, the basic concepts of abstract data slice and intra-class slice are created at first. Then, the cohesion existing in JAVA language is discussed based on these slices. Finally, the data cohesion, method cohesion and class cohesion are presented and solved by analyzing the relationship between these slice and data, method or class. 6. Software reuse can be realized at implement level, design level, and software architecture level. Implement level software reuse means reusing existed program code; Design level software reuse means reusing existed design information of software system; Architecture reuse is the most effective software reuse. It's mainly the reuse of formalized software architecture. The formalized software architecture treats the frame organization of software and global structure design as reuse object. We study the relevant aspects about these three-level software reuse and present a reusable leveled Abstract Slice Model(ASM). 7. In chapter 8, we study the design and implementation of JSMRS-a JAVA Software Metric and Reuse System. The main idea of JSMRS is determining a subset of JAVA syntax, producing Abstract Syntax Tree(AST) of JAVA source code, translating the AST to Code Information Tree(CIT) by optimizing, creating multi-level dependence graph based on CIT, computing hierarchy slice of relevant program, measuring coupling and cohesion of JAVA based on slices from slice library, and reengineering system with Slice Abstract Model.
Keywords/Search Tags:Object-Oriented
PDF Full Text Request
Related items