An extension of HM(X) with bounded existential and universal data-types

We propose a conservative extension of HM(X), a generic constraint-based type inference framework, with bounded existential (a.k.a. abstract) and universal (a.k.a. polymorphic) data-types. In the first part of the article, which remains abstract of the type and constraint language (i.e. the logic X), we introduce the type system, prove its safety and define a type inference algorithm which computes principal typing judgments. In the second part, we propose a realistic constraint solving algorithm for the case of structural sub-typing, which handles the non-standard construct of the constraint language generated by type inference: a form of bounded universal quantification.

[1]  Nigel Perry,et al.  The Implementation of Practical Functional Programming Languages , 2005 .

[2]  Vincent Simonet,et al.  Type Inference with Structural Subtyping: A Faithful Formalization of an Efficient Constraint Solver , 2003, APLAS.

[3]  Didier Rémy,et al.  Extending ML with Semi-Explicit Higher-Order Polymorphism , 1997, TACS.

[4]  Martin Odersky,et al.  Colored local type inference , 2001, POPL '01.

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

[6]  François Pottier A Semi-Syntactic Soundness Proof for HM(X) , 2001 .

[7]  Martin Odersky,et al.  Putting type annotations to work , 1996, POPL '96.

[8]  Alexander Aiken,et al.  Program Analysis Using Mixed Term and Set Constraints , 1997, SAS.

[9]  Martin Odersky,et al.  Type Inference with Constrained Types , 1999, Theory Pract. Object Syst..

[10]  Jerzy Tiuryn Subtype inequalities , 1992, [1992] Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science.

[11]  Prateek Mishra,et al.  Polymorphic Subtype Inference: Closing the Theory-Practice Gap , 1989, TAPSOFT, Vol.2.

[12]  François Pottier,et al.  A Versatile Constraint-Based Type Inference System , 2000, Nord. J. Comput..

[13]  Sylvain Conchon,et al.  JOIN(X): Constraint-Based Type Inference for the Join-Calculus , 2001, ESOP.

[14]  John C. Mitchell,et al.  Abstract types have existential types , 1985, POPL.

[15]  Didier Rémy,et al.  Semi-Explicit First-Class Polymorphism for ML , 1999, Inf. Comput..

[16]  Alexander Aiken,et al.  Flow-sensitive type qualifiers , 2002, PLDI '02.

[17]  John C. Mitchell,et al.  Type inference with simple subtypes , 1991, Journal of Functional Programming.

[18]  Fritz Henglein,et al.  The complexity of subtype entailment for simple types , 1997, Proceedings of Twelfth Annual IEEE Symposium on Logic in Computer Science.

[19]  Michel Mauny,et al.  An Implementation of Caml-Light with existential types , 1994 .

[20]  François Pottier,et al.  Information flow inference for ML , 2003, TOPL.

[21]  Viktor Kuncak,et al.  Structural subtyping of non-recursive types is decidable , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[22]  Vincent Simonet,et al.  An extension of HM(X) with bounded existential and universal data-types , 2003, ICFP '03.

[23]  John C. Mitchell,et al.  Lower bounds on type inference with subtypes , 1995, POPL '95.

[24]  John C. Mitchell,et al.  Abstract types have existential type , 1988, TOPL.

[25]  Didier Rémy,et al.  MLF: raising ML to the power of system F , 2003, ACM SIGPLAN Notices.

[26]  Benjamin C. Pierce,et al.  Local type inference , 1998, POPL '98.

[27]  A. K. Wmght Polymorphism for imperative languages without imperative types , 1993 .