Precise Identification of Side-Effect-Free Methods in Java

  • Authors:
  • Atanas Rountev

  • Affiliations:
  • Ohio State University

  • Venue:
  • ICSM '04 Proceedings of the 20th IEEE International Conference on Software Maintenance
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

Knowing which methods do not have side effects is necessary in a variety of software tools for program understanding, restructuring, optimization, and verification. We present a general approach for identifying side-effect-free methods in Java software. Our technique is parameterized by class analysis and is designed to work on incomplete programs. We present empirical results from two instantiations of the approach, based on Rapid Type Analysis and on points-to analysis. In our experiments with several components, on average 22% of the investigated methods were identified as free of side effects. We also present a precision evaluation which shows that the approach achieves almost perfect precision 驴 i.e., it almost never misses methods that in reality have no side effects. These results indicate that very precise identification of side-effect-free methods is possible with simple and inexpensive analysis techniques, and therefore can be easily incorporated in software tools.