Font Size: a A A

Research And Application For Object-Oritented Program Equivalence Transformation Technology

Posted on:2009-09-14Degree:MasterType:Thesis
Country:ChinaCandidate:H WangFull Text:PDF
GTID:2178360242491885Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Program equivalence transformation technology has extensive application prospects in program analysis and assessment technology. Nowadays, the program analysis technology mainly concentrates on comparison of program outputs. It can't find out semantic differences through analysing structures of programs. At present, research results made of which target language is functional language or injunctive language. However, there are few research on equivalance transformation for object-oriented language.In the thesis, we do research in program equivalence transformation technology and its application in program analysis and assessment. Semantic equivalence of program is theoretical foundation of program equivalence transformation technology. Semantic equivalence of program contains execution semantic equivalence, structure semantic equivalence and similar structure semantic equivalence. If the similar structure semantics of two source program are equivalent, one source program can be transformed into another source program.Due to obvious hierarchy of object-oriented program, there are three levels equivalence transformation, which contains program level equivalence transformation, class level equivalence transformation and function level equivalence transformation, for object-oriented program. Program level equivalence transformation is used to show all the information which existed in each class through eliminating inheritance relation between all classes in the program. Class level equivalence transformation is used to show all the information which existed in each function through eliminating method calls between all methods in each class. Meanwhile, the structures of all class are simplified by eliminating redundant methods. Function level equivalence transformation is used to eliminating the diversification of sentence expression through standardizing assignments, expressions and control structures.Based on object-oriented program equivalence transformation technology, we propose a new framework of JAVA porgram automatic assessment system, and implement the prototype. In the system, we use ANTLRWORK to construct a JAVA parser, which is able to generate Abstract Syntax Tree as intermediate language. At the analysis of program structure, we make use of C&K and MOOD software metrics to compute and visualize the metrics information of programs, and generate several graph expression of programs. At equivalence transformation of program, we propose a new method which implements semantically preserving equivalence transformation by three levels that are transformation at program level seperately, transformation at class level, transformation at method level. After equivalence transformation, the program dependance graphs are constructed and the comparison and assessment algorithm is apply to identifying the semantic differences ot two programs and giving an analysis and assessment report.
Keywords/Search Tags:Equivalence Transformation, Semantic Equivalence, Program Standardization, Program Comparison, Assessment
PDF Full Text Request
Related items