Precise concrete type inference for object-oriented languages

  • Authors:
  • John Plevyak;Andrew A. Chien

  • Affiliations:
  • Department of Computer Science, 1304 W. Springfield Avenue, Urbana, IL;Department of Computer Science, 1304 W. Springfield Avenue, Urbana, IL

  • Venue:
  • OOPSLA '94 Proceedings of the ninth annual conference on Object-oriented programming systems, language, and applications
  • Year:
  • 1994

Quantified Score

Hi-index 0.00

Visualization

Abstract

Concrete type information is invaluable for program optimization. The determination of concrete types in object-oriented languages is a flow sensitive global data flow problem. It is made difficult by dynamic dispatch (virtual function invocation) and first class functions (and selectors)—the very program structures for whose optimization its results are most critical. Previous work has shown that constraint-based type inference systems can be used to safely approximate concrete types [15], but their use can be expensive and their results imprecise.We present an incremental constraint-based type inference which produces precise concrete type information for a much larger class of programs at lower cost. Our algorithm extends the analysis in response to discovered imprecisions, guiding the analysis' effort to where it is most productive. This produces precise information at a cost proportional to the type complexity of the program. Many programs untypable by previous approaches or practically untypable due to computational expense, can be precisely analyzed by our new algorithm. Performance results, precision, and running time, are reported for a number of concurrent object-oriented programs. These results confirm the algorithm's precision and efficiency.