Completeness analysis for incomplete object-oriented programs

  • Authors:
  • Jingling Xue;Phung Hua Nguyen

  • Affiliations:
  • Programming Languages and Compilers Group, School of Computer Science and Engineering, University of New South Wales, Sydney, NSW, Australia;Programming Languages and Compilers Group, School of Computer Science and Engineering, University of New South Wales, Sydney, NSW, Australia

  • Venue:
  • CC'05 Proceedings of the 14th international conference on Compiler Construction
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

We introduce a new approach, called completeness analysis, to computing points-to sets for incomplete Java programs such as library modules or applications in the presence of dynamic class loading. One distinctive feature of this work is that the access and modification properties of fields are taken into account. By combining with a whole-program points-to analysis, completeness analysis yields not only the required points-to sets but also determines which points-to sets and call sites are complete (when the pointed-to objects and target methods are statically resolvable) or not. Such a compositional approach yields more precise points-to sets than those computed by the points-to analysis alone. In addition, our technique also determines (for the first time) which objects may be incompletely detectable, i.e., may be missing in some statically computed points-to sets. We provide experimental evidence to demonstrate that better analysis precision in benchmarks is obtained when the field access and modification properties are exploited. In particular, we are able to find significantly more complete and mono call sites in an incomplete program, which is useful in devirtualisation and inlining. Our analysis is simple since it is flow- and context-insensitive and achieves these improvements at reasonably small analysis costs.