Precise concrete type inference for object-oriented languages
Authors:
Open Access
- 1 October 1994
- journal article
- conference paper
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 29 (10) , 324-340
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.Keywords
This publication has 11 references indexed in Scilit:
- Soft typing with conditional types1994
- Safe and decidable type checking in an object-oriented language1993
- Making pure object-oriented languages practical1991
- Soft typing1991
- Automatic construction of sparse data flow evaluation graphs1991
- Interactive type analysis and extended message splitting; optimizing dynamically-typed object-oriented programs1990
- A type system for Smalltalk1990
- Customization: optimizing compiler technology for SELF, a dynamically-typed object-oriented programming language1989
- Self: The power of simplicity1987
- Inferring types in Smalltalk1981