Subtyping recursive types in kernel Fun

The problem of defining and checking a subtype relation between recursive types was studied in Armadio and Cardelli (1993) for a first order type system, but for second order systems, which combine subtyping and parametric polymorphism, only negative results are known. This paper studies the problem of subtype checking for recursive types in system kernel Fun, a typed /spl lambda/-calculus with subtyping and bounded second order polymorphism. Along the lines of Armadio and Cardelli (1993), we study the definition of a subtype relation over kernel Fun recursive types, and then we present a subtyping algorithm which is sound and complete with respect to this relation. We show that the natural extension of the techniques introduced in Armadio and Cardelli (1993) to compare first order recursive types gives a non complete algorithm. We prove the completeness and correctness of a different algorithm, which also admits an efficient implementation.

[1]  Luca Cardelli,et al.  A Semantic Basis for Quest , 1991, J. Funct. Program..

[2]  Jens Palsberg,et al.  Efficient recursive subtyping , 1992, POPL '93.

[3]  Giorgio Ghelli,et al.  Complexity of kernel Fun subtype checking , 1996, ICFP '96.

[4]  Luca Cardelli,et al.  Comparing Object Encodings , 1997, TACS.

[5]  Martín Abadi,et al.  A Theory of Objects , 1996, Monographs in Computer Science.

[6]  Carl A. Gunter Semantics of programming languages: structures and techniques , 1993, Choice Reviews Online.

[7]  Dario Colazzo,et al.  Subtyping Recursive Types in Kernel Fun , preliminary draftDario Colazzo , 1999 .

[8]  Felice Cardone,et al.  Relational Semantics for Recursive Types and Bounded Quantification , 1989, ICALP.

[9]  Giorgio Ghelli Recursive Types Are not Conservative over F , 1993, TLCA.

[10]  Robin Milner,et al.  Edinburgh LCF , 1979, Lecture Notes in Computer Science.

[11]  Luca Cardelli,et al.  An Extension of System F with Subtyping , 1991, TACS.

[12]  John C. Mitchell,et al.  Theoretical aspects of object-oriented programming: types, semantics, and language design , 1994, Choice Reviews Online.

[13]  Giorgio Ghelli,et al.  Divergence of F< Type Checking , 1995, Theor. Comput. Sci..

[14]  Giorgio Ghelli,et al.  Modelling Features of Object-Oriented Languages in Second Order Functional Languages with Subtypes , 1990, REX Workshop.

[15]  Jozef Gruska Foundations of Computing , 1997 .

[16]  Martín Abadi,et al.  Syntactic considerations on recursive types , 1996, Proceedings 11th Annual IEEE Symposium on Logic in Computer Science.

[17]  Giorgio Ghelli,et al.  Coherence of Subsumption, Minimum Typing and Type-Checking in F<= , 1992, Math. Struct. Comput. Sci..

[18]  Benjamin C. Pierce,et al.  Bounded quantification is undecidable , 1992, POPL '92.

[19]  Luca Cardelli,et al.  Subtyping recursive types , 1991, POPL '91.

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

[21]  Fritz Henglein,et al.  Coinductive Axiomatization of Recursive Type Equality and Subtyping , 1998, Fundam. Informaticae.

[22]  John C. Mitchell,et al.  The Development of Type Systems for Object-Oriented Languages , 1995, Theory Pract. Object Syst..

[23]  John J. Donovan,et al.  Systems programming , 1973, CSC '73.

[24]  Aaas News,et al.  Book Reviews , 1893, Buffalo Medical and Surgical Journal.

[25]  Greg Nelson,et al.  Systems programming in modula-3 , 1991 .

[26]  Scott Danforth,et al.  Type theories and object-oriented programmimg , 1988, CSUR.

[27]  Giorgio Ghelli,et al.  Coherence of Subsumption , 1990, CAAP.