Type inclusion constraints and type inference

We present a general algorithm for solving systems of inclusion constraints over type expressions. The constraint language includes function types, constructor types, and liberal intersection and union types. We illustrate the application of our constraint solving algorithm with a type inference system for the lambda calculus with constants. In this system, every pure lambda term has a (computable) type and every term typable in the Hindley/Milner system has all of its Hindley/Milner types. Thus, the inference system is an extension of the Hindley/Milner system that can type a very large set of lambda terms.

[1]  J. A. Robinson,et al.  A Machine-Oriented Logic Based on the Resolution Principle , 1965, JACM.

[2]  Alexander Aiken,et al.  Solving systems of set constraints , 1992, [1992] Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science.

[3]  Robert Cartwright,et al.  Soft typing , 2004, SIGP.

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

[5]  Mitchell Wand,et al.  Type Inference for Partial Types is Decidable , 1992, ESOP.

[6]  Prateek Mishra,et al.  Declaration-free type checking , 1985, POPL.

[7]  Robert Cartwright,et al.  Soft typing , 1991, PLDI '91.

[8]  Jens Palsberg,et al.  Efficient inference of partial types , 1992, Proceedings., 33rd Annual Symposium on Foundations of Computer Science.

[9]  Satish R. Thatte,et al.  Type Inference with Partial Types , 1988, Theor. Comput. Sci..

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

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

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

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

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

[15]  Alexander Aiken,et al.  Implementing Regular Tree Expressions , 1991, FPCA.

[16]  R. Hindley The Principal Type-Scheme of an Object in Combinatory Logic , 1969 .

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