dc.contributor.author | Salcianu, Alexandru | |
dc.contributor.author | Rinard, Martin | |
dc.contributor.other | Computer Architecture | |
dc.date.accessioned | 2005-12-22T01:31:05Z | |
dc.date.available | 2005-12-22T01:31:05Z | |
dc.date.issued | 2004-05-17 | |
dc.identifier.other | MIT-CSAIL-TR-2004-030 | |
dc.identifier.other | MIT-LCS-TR-949 | |
dc.identifier.uri | http://hdl.handle.net/1721.1/30470 | |
dc.description.abstract | We present a new method purity analysis for Java programs.A method is pure if it does not mutate any location that exists in the program state right before method invocation.Our analysis is built on top of a combined pointer and escape analysis for Java programs and is capable of determining that methods are pure even when the methods do heap mutation, provided that the mutation affects only objects created after the beginning of the method. Because our analysis extracts a precise representation of the region of the heap that each method may access, it is able to provide useful information even for methods with externally visible side effects. In particular, it can recognize read-only parameters (a parameter is read-only if the method does not mutate any objects transitively reachable from the parameter) and safe parameters (a parameter is safe if it is read-only and the method does not create any new externally visible paths in the heap to objects transitively reachable from the parameter). The analysis can also generate regular expressions that characterize the externally visible heap locations that the method mutates.We have implemented our analysis and used it to analyze several data structure implementations. Our results show that our analysis effectively recognize a variety of pure methods, including pure methods that allocate and mutate complex auxiliary data structures. Even if the methods are not pure, our analysis can provide information which may enable developers to usefully bound the potential side effects of the method. | |
dc.format.extent | 16 p. | |
dc.format.extent | 28889089 bytes | |
dc.format.extent | 1207932 bytes | |
dc.format.mimetype | application/postscript | |
dc.format.mimetype | application/pdf | |
dc.language.iso | en_US | |
dc.relation.ispartofseries | Massachusetts Institute of Technology Computer Science and Artificial Intelligence Laboratory | |
dc.title | A Combined Pointer and Purity Analysis for Java Programs | |