Type inference for recursively constrained types and its application to OOP

Abstract We define a powerful type inference mechanism with application to object-oriented programming. The types inferred are recursively constrained types, types that come with a system of constraints. These types may be viewed as generalizations of recursive types and F-bounded polymorphic types, the forms of type that are necessary to properly encode object typings. The base language we study, I-Soop, incorporates state and records, the two features critical to encode objects in a non-object-oriented language. Soundness and completeness of the type inference algorithm are established by operational means. Our method for establishing these properties is somewhat novel. We illustrate how the algorithm may be fruitfully applied to infer types of object-oriented programs.

[1]  Jens Palsberg,et al.  Safety Analysis Versus Type Inference for Partial Types , 1992, Inf. Process. Lett..

[2]  Samuel N. Kamin,et al.  Two semantic models of object-oriented languages , 1994 .

[3]  Didier Rémy,et al.  Programming Objects with ML-ART, an Extension to ML with Abstract and Record Types , 1994, TACS.

[4]  John C. Reynolds,et al.  Three Approaches to Type Structure , 1985, TAPSOFT, Vol.1.

[5]  John C. Mitchell,et al.  F-bounded polymorphism for object-oriented programming , 1989, FPCA.

[6]  Prateek Mishra,et al.  Type Inference with Subtypes , 1990, Theor. Comput. Sci..

[7]  Luca Cardelli,et al.  A Semantics of Multiple Inheritance , 1984, Information and Computation.

[8]  Jens Palsberg,et al.  Object-oriented type systems , 1994, Wiley professional computing.

[9]  Stefan Kaes Type inference in the presence of overloading, subtyping and recursive types , 1992, LFP '92.

[10]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[11]  Ryan Stansifer,et al.  Type inference with subtypes , 1988, POPL '88.

[12]  Scott F. Smith,et al.  Application of OOP Type Theory: State, Decidability, Integragtion , 1994, OOPSLA.

[13]  D. Kozen,et al.  Efficient Inference of Partial Types , 1992 .

[14]  Akinori Yonezawa,et al.  A Complete Type Inference System for Subtyped Recursive Types , 1994, TACS.

[15]  Martín Abadi,et al.  A semantics of object types , 1994, Proceedings Ninth Annual IEEE Symposium on Logic in Computer Science.

[16]  Andrew A. Chien,et al.  Precise Concrete Type Inference for Object-Oriented Languages , 1994, OOPSLA.

[17]  Gordon D. Plotkin,et al.  An ideal model for recursive polymorphic types , 1984, Inf. Control..

[18]  Mads Tofte,et al.  Type Inference for Polymorphic References , 1990, Inf. Comput..

[19]  Kim B. Bruce Safe type checking in a statically-typed object-oriented programming language , 1993, POPL '93.

[20]  Alexander Aiken,et al.  Type inclusion constraints and type inference , 1993, FPCA '93.

[21]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

[22]  V. Trifonov,et al.  A Simple Interpretation of OOP in a Language with , 1993 .

[23]  William R. Cook,et al.  Inheritance is not subtyping , 1989, POPL '90.

[24]  Matthias Felleisen,et al.  A Syntactic Approach to Type Soundness , 1994, Inf. Comput..

[25]  Peter Buneman,et al.  Theoretical Aspects of Object-Oriented Programming , 1994 .

[26]  Jens Palsberg,et al.  Making Type Inference Practical , 1992, ECOOP.

[27]  John C. Mitchell,et al.  Coercion and type inference , 1984, POPL.

[28]  Gordon D. Plotkin,et al.  An Ideal Model for Recursive Polymorphic Types , 1986, Inf. Control..

[29]  D. Kozen,et al.  Ecien t Inference of Partial Types , 1994 .

[30]  Scott F. Smith,et al.  An interpretation of typed OOP in a language with state , 1995, LISP Symb. Comput..