Font Size: a A A

Dynamic Analysis Technology For Java Programs Based On Daikon

Posted on:2005-08-11Degree:MasterType:Thesis
Country:ChinaCandidate:D X YangFull Text:PDF
GTID:2168360125950647Subject:Computer system architecture
Abstract/Summary:PDF Full Text Request
For lacking scientific management of software project and corresponding documents, there are tremendous abstruse codes. For one thing, the designers of these codes maybe have left the company and other people could not understand the realization of these codes' function. For another, the work for annotating these codes is very obscurity and difficulty, which is hard to carry. What's more, most of these so-called abstruse codes still have their value for reusing and the blocks of realizing same function are much very expensive. Under such circumstance, Daikon, a tool for coding analysis could help us address the problems mentioned above. By using Daikon, program maybe much easier to understand and at the same time programmer can cost much less time in annotating for the codes. For the first step, Daikon discovers invariants through dynamic (runtime) analysis of program executions, then sends the result for static analysis by other tools, such as tool for ESC/Java. The recognized invariants could be added into the source comments as annotating and also could be got separately as formalized specifications. Besides, Daikon can also assist in software evolution to prevent program degeneration .The paper illustrates several principles, technologies and implementation methods of Daikon ,and describes the architecture of Daikon as well . The paper also proposes some improvements about principles of Daikon and offers one solution of improved implementation. The paper combines several results of individual tests for Daikon into one convincingly and synthetically. Front ends for Daikon help Daikon to deal with all kinds of programming languages (such as Java, C, C++, Perl and IOA). Front ends add observing codes into the analyzed source code to observe the value of variables and send the type declaration information of the variables to Daikon.Daikon just analyzes the probability of the invariants .If the probability of one invariant is too big, which means the invariant just happens accidentally, the invariant will be discarded .If the amount of different value tuples which support the invariant is too little, the invariant will be discarded too.Daikon gives the way to deal with the contradictory invariants it produces. Daikon will attempt to find a small subset of the invariants that aren't mutually consistent, and remove one invariant, repeating this process until the remaining invariants are consistent. But it has some drawbacks: the choice of which invariant to remove is somewhat arbitrary,the result maybe isn't the most representative invariant list. The thesis provides a kind of improved idea to make use of "heuristic reduction of attributes" strategy instead of "arbitrary" strategy. Through this improvement Daikon can get a optimum invariants set which is consistent.Whenever two or more variables are determined to be equal,one of them is chosen as anonical and the others are removed from the pool of variables to be derived from or analyzed, reducing both computation time and output size.The paper finds that this "anonical strategy" sometimes has some bad effect, it makes the invariants result not intuitionistic enough .Sometimes the invariants result needs to be infered manually to be got the real meaning . But Daikon can suppress the "anonical strategy" to deal with that problem , although some redundant invariants will be got after that.The Daikon makes use of program slicing ideology for object-oriented language to create its main architecture. It can deal with well about object-oriented language features such as dynamic binding, multiple level inheritance, polymorphism, excepting handling, etc. The paper describes the detailed working flow of Daikon . The time and space cost of dynamic invariant inference is very important ,it grows with the number of program points and variables instrumented, number of invariants checked, and number of test cases run. However, the cost of inference is hard to predict. Many kinds of invariants can't be inferred because of the lim...
Keywords/Search Tags:Technology
PDF Full Text Request
Related items