Dynamic purity analysis for java programs

  • Authors:
  • Haiying Xu;Christopher J. F. Pickett;Clark Verbrugge

  • Affiliations:
  • McGill University, Montreal, PQ, Canada;McGill University, Montreal, PQ, Canada;McGill University, Montreal, PQ, Canada

  • Venue:
  • PASTE '07 Proceedings of the 7th ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

The pure methods in a program are those that exhibit functional or side effect free behaviour, a useful property in many contexts. However, existing purity investigations present primarily staticresults. We perform a detailed examination of dynamic method purityin Java programs using a JVM-based analysis. We evaluate multiple purity definitions that range from strong to weak, consider purity forms specific to dynamic execution, and accomodate constraintsimposed by an example consumer application, memoization. We show that while dynamic method purity is actually fairly consistent between programs, examining pure invocation counts and the percentage of the byte code instruction stream contained within some pure method reveals great variation. We also show that while weakening purity definitions exposes considerable dynamic purity, consumer requirements can limitthe actual utility of this information.