Download: PDF.

“Implementing Purity and Side Effect Analysis for Java Programs” by David Graf. Mar. 2006. Semester project.

Abstract

I present an implementation of a new method purity analysis for Java programs, which is described in [1]. A method is pure if it does not mutate any location that exists in the program state right before method invocation. The analysis is built on top of a combined pointer and escape analysis for Java programs and is capable of determining whether methods are pure even if they do heap mutation, provided that the mutation affects only objects created after the beginning of the method.

My implementation is able to parse and analyze methods of Java Bytecode and writes the results into an XML-file that can be parsed and used by tools which need purity information. Additionally, the analyzer is able to export analyzer information of analyzed methods that can be reparsed and reused by later analyses.

I have tested the implementation on several test cases. Apart from some parsing problems, the analyzer runs correctly and in acceptable time. The parsing is based on an external tool which has problems with a few classes of the Java runtime environment. The results of the analyzer show that the analysis effectively recognizes a variety of pure methods, including pure methods that allocate and mutate complex auxiliary data structures.

To test and present my analyzer, I have additionally implemented a GUI which shows all information that is saved and computed by the analyzer.

Download: PDF.

BibTeX entry:

@unpublished{DGraf06,
   author = {David Graf},
   title = {{Implementing Purity and Side Effect Analysis for Java Programs}},
   month = mar,
   note = {Semester project}
}

Back to the student projects sorted by date or by category.


(This webpage was created with bibtex2web.)