Abstract:
Abstract. Concrete types and abstract types are different and serve different purposes. Concrete types, the focus of this paper, are essential to support compilation, application delivery, and debugging in object-oriented environments. Concrete types should not be obtained from explicit type declarations because their presence limits polymorphism unacceptably. This leaves us with type inference. Unfortunately, while polymorphism demands the use of type inference, it has also been the hardest challenge for type inference. We review previous type inference algorithms that analyze code with parametric polymorphism and then present a new one: the cartesian product algorithm. It improves precision and efficiency over previous algorithms and deals directly with inheritance, rather than relying on a preprocessor to expand it away. Last, but not least, it is conceptually simple. The cartesian product algorithm has been used in the Self system since late 1993. We present measurements to document its performance and compare it against several previous algorithms.
Citations
|
1266
|
Abstract interpretation : a unified lattice model for the static analysis of programs by construction or approximation of fixpoints
– Cousot, Cousot
- 1977
|
|
801
|
A theory of type polymorphism in programming
– Milner
- 1978
|
|
483
|
Self: the power of simplicity, in
– Ungar, Smith
- 1987
|
|
208
|
Object-oriented type inference
– Palsberg, Schwartzbach
- 1991
|
|
158
|
Precise Concrete Type Inference for Object-Oriented Languages
– Plevyak, Chien
- 1994
|
|
154
|
Object-Oriented Multi-Methods in Cecil
– Chambers
- 1992
|
|
143
|
An Efficient Implementation of SELF – a Dynamically-Typed Object-Oriented Language Based on Prototypes
– Chambers, Ungar, et al.
- 1989
|
|
139
|
Optimizing Dynamically-Dispatched Calls With RunTime Type Feedback
– Hölzle, Ungar
- 1994
|
|
127
|
Making Pure Object-Oriented Languages Practical
– Chambers, Ungar
- 1991
|
|
104
|
A Fast Algorithm for Computing Longest Common Subsequences
– Hunt, Szymanski
- 1977
|
|
91
|
Multi-way versus one-way constraints in user interfaces: Experience with the DeltaBlue algorithm
– Sannella, Maloney, et al.
- 1993
|
|
83
|
Type Inference of SELF: Analysis of Objects with Dynamic and Multiple Inheritance
– Agesen, Palsberg, et al.
- 1993
|
|
77
|
Making type-inference practical
– Oxhj, Palsberg, et al.
- 1992
|
|
56
|
A Type System for Smalltalk
– Graver, Johnson
- 1990
|
|
50
|
Constraint-based type inference and parametric polymorphism
– Agesen
- 1994
|
|
49
|
Obtaining Sequential Efficiency for Concurrent Object-Oriented Languages
– Plevyak, Zhang, et al.
- 1995
|
|
44
|
Inferring types in smalltalk
– Suzuki
- 1981
|
|
38
|
Type-Checking and Type-Inference for Object-Oriented Programming Languages
– Graver
- 1989
|
|
37
|
Compile-time analysis of object-oriented programs
– Vitek, Horspool, et al.
- 1992
|
|
35
|
Sifting out the Gold: Delivering Compact Applications from an Exploratory Object-oriented Programming Environment
– Agesen, Ungar
- 1994
|
|
31
|
Type-Checking Smalltalk
– Johnson
- 1986
|
|
4
|
How to use Self 3.0
– Agesen, Bak, et al.
- 1993
|
|
2
|
Static Typing is not Important for Efficiency
– Hlzle, Why
- 1991
|
|
2
|
Static Typing Without Explicit Types
– Phillips, Shepard
- 1994
|