Dependent Types with Subtyping and Late-Bound Overloading

We present a calculus with dependent types, subtyping, and late-bound overloading. Besides its theoretical interest this work is motivated by several practical needs that range form the definition of logic encodings to proof specialization and reuse and to object-oriented extension of the SML module system. The theoretical study of this calculus is not straightforward. While confluence is relatively easy to prove, subject reduction is much harder. We were not able to add overloading to any existing system with dependent types and subtyping, and prove subject reduction. This is why we also define here as by-product a new subtyping system for dependent types that improves previous systems and enjoys several properties (notably the transitivity elimination property). The calculus with overloading is then obtained as a conservative extension of this new system. Another difficult point is strong normalization, which is a necessary condition to the decidability of subtyping and typing relations. The calculus with overloading is not strongly normalizing. However, we show that a reasonably useful fragment of the calculus enjoys this property and that its strong normalization implies the decidability of its subtyping and typing relations. The article is divided into two parts: the first three scetions provide a general overview of the systems and its motivations and can be read separately; the remaining sections develop the formal study.

[1]  Mariangiola Dezani-Ciancaglini,et al.  A filter lambda model and the completeness of type assignment , 1983, Journal of Symbolic Logic.

[2]  Rance Cleaveland,et al.  Implementing mathematics with the Nuprl proof development system , 1986 .

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

[4]  Mark Lillibridge,et al.  A type-theoretic approach to higher-order modules with sharing , 1994, POPL '94.

[5]  Robin Milner,et al.  Definition of standard ML , 1990 .

[6]  David B. MacQueen Using dependent types to express modular structure , 1986, POPL '86.

[7]  Giuseppe Castagna,et al.  Programmation modulaire avec surcharge et liaison tardive , 1996 .

[8]  Craig Chambers,et al.  Object-Oriented Multi-Methods in Cecil , 1992, ECOOP.

[9]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[10]  David Aspinall,et al.  Subtyping with Singleton Types , 1994, CSL.

[11]  Xavier Leroy,et al.  Manifest types, modules, and separate compilation , 1994, POPL '94.

[12]  Zhaohui Luo,et al.  Coercive Subtyping in Type Theory , 1996, CSL.

[13]  Linda G. DeMichiel,et al.  The Common Lisp Object System: An Overview , 1987, ECOOP.

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

[15]  Thierry Coquand,et al.  Pattern Matching with Dependent Types , 1992 .

[16]  Simon L. Peyton Jones,et al.  Imperative functional programming , 1993, POPL '93.

[17]  Giuseppe Castagna,et al.  A calculus for overloaded functions with subtyping , 1992, LFP '92.

[18]  Giuseppe Castagna,et al.  A Semantics for Lambda&-early: A Calculus with Overloading and Early Binding , 1993, TLCA.

[19]  Judicaël Courant,et al.  A Module Calculus for Pure Type Systems , 1997, TLCA.

[20]  Frank Harary,et al.  What is a System , 1981 .

[21]  David B. MacQueen Modules for standard ML , 1984, LFP '84.

[22]  Alex K. Simpson,et al.  Computational Adequacy in an Elementary Topos , 1998, CSL.

[23]  Patrick Lincoln,et al.  Linear logic , 1992, SIGA.

[24]  Giuseppe Castagna,et al.  Object-Oriented Programming A Unified Foundation , 1997, Progress in Theoretical Computer Science.

[25]  Giuseppe Castagna,et al.  Covariance and contravariance: conflict without a cause , 1995, TOPL.

[26]  Mariangiola Dezani-Ciancaglini,et al.  An extension of the basic functionality theory for the λ-calculus , 1980, Notre Dame J. Formal Log..

[27]  John C. Mitchell,et al.  The essence of ML , 1988, POPL '88.

[28]  Furio Honsell,et al.  A framework for defining logics , 1993, JACM.

[29]  David Aspinall,et al.  Subtyping dependent types , 1996, Proceedings 11th Annual IEEE Symposium on Logic in Computer Science.

[30]  Gang Chen Subtyping Calculus of Construction (Extended Abstract) , 1997, MFCS.

[31]  Jan Zwanenburg,et al.  Pure Type Systems with Subtyping , 1999, TLCA.

[32]  Zhaohui Luo,et al.  Coercive Subtyping , 1995 .

[33]  William W. Tait,et al.  Intensional interpretations of functionals of finite type I , 1967, Journal of Symbolic Logic.

[34]  Adriana B. Compagnoni,et al.  Typed operational semantics for higher-order subtyping , 2003, Inf. Comput..