Font Size: a A A

Gathering Dynamic Information Of Object-oriented Program Based On Static Information

Posted on:2006-09-12Degree:MasterType:Thesis
Country:ChinaCandidate:C ZhangFull Text:PDF
GTID:2168360155953185Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
For economical and political or other reasons, the development period of software systems is very long. Today some legacy system has been used for more than twenty years. In their lifecycle, software must be continuously updated for the user requirement and the environment change. But it is a very difficult task to change the software systems. Sightless upgrade or maintenance can not only reduce the software quality, but also be very expensive, if the original system is insufficiently understood and analyzed especially when the documents is incomplete or different from the system. In the 50's and 60's, people's concern focuses on the effective computing problem. The decomposition of the sophisticate system is mainly based on "control stream". Later the data entity and data stream are taken as the kernel problems, the data-oriented model is being used. The object-oriented model represents a balanced point on both data and computing in software system. The analyses on sophisticate system are based on objects and classes structures as well as their relationship. The purpose of adverse engineering is to restructure this object-oriented model, it includes the contents on data which is mainly static and the content on computing which is mainly dynamic; afterward the system is restructured to increase its quality or add something to this model to realize it to fill the user's additional needs. The present paper firstly discussed the extracting process of the static information. The code location mechanism for components was introduced in the ANTLR tool, then the AST(Absolute Syntax Tree) of the Java Program is visited, in the same time the static information is extracted. Then the conception of anchor point and trace object were introduced. The present paper introduced how to extend the source code according to above structures. There are four kinds of extended code: the code for message, the code for instance assigning statement, the code for method return value and the code for service. The code for instance assigning statement and code for method return value used partial code replacement strategy, the other two kinds used code inserting strategy. The extended source code combined with the service package are recompiled and run. Its output records and persisted static information are analyzed by output order, which produce the message stream we want. To achieve more precise and detailed message stream, the present paper discussed the alias instance variable on three conditions which are assignment, the combination of virtual parameters and actual parameters and returning value of method. The main idea is trying to make clear the creation and transfer of the object, which can enrich our knowledge for the program. The author made an analysis tool for java program according to the theory of the paper, and talked about the analysis process on java program based on object by this tool. The index of the trace object andthe location of the program components are extended to the source code , the over long extended code and too many output records are avoided. The result of static analysis is re-instanced in the process of dynamic analysis, the message stream is produced by the two kinds of information. The method of this paper can effectively control the produced data quantities which is good to analyze large-scale program. The author gave the algorithm of tracing the output of the running extended code, the data structures of the algorithm were also introduced. Because of cycle effect, there are many contents that can be compacted in the final message stream, it is easier to understand after compacting. The present paper also introduced compacted express of information. The branch and cycle is two basic program structures. There are some work for us to do in the combination of static information and dynamic information of the two structures. The paper is just the beginning of adverse engineering based on the combination of static information and dynamic information, the acquired information stream contains both static information and dynamic information, but they are in the form of plain text which is not favor to view. They need to be visualized, the information can be transformed to both sequence graph and collaborate graph. We also assumed that the object system have a suite of test cases, we can perform a dynamic analysis for each test case, which can form a group of message streams and dynamic views, which are the references for...
Keywords/Search Tags:Object-oriented
PDF Full Text Request
Related items