Advertisement

Decidability of higher-order subtyping with intersection types

  • Adriana B. Compagnoni
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 933)

Abstract

The combination of higher-order subtyping with intersection types yields a typed model of object-oriented programming with multiple inheritance [11]. The target calculus, F ω , a natural generalization of Girard's system Fω with intersection types and bounded polymorphism, is of independent interest, and is our subject of study.

Our main contribution is the proof that subtyping in F ω is decidable. This yields as a corollary the decidability of subtyping in F ω , its intersection free fragment, because the F ω subtyping system is a conservative extension of that of F ω .

The calculus presented in [8] has no reductions on types. In the F ω subtyping system the presence of β∧-conversion — an extension of β-conversion with distributivity laws — drastically increases the complexity of proving the decidability of the subtyping relation. Our proof consists of, firstly, defining an algorithmic presentation of the subtyping system of F ω , secondly, proving that this new presentation is sound and complete with respect to the original one, and finally, proving that the algorithm always terminates.

Moreover, we establish basic structural properties of the language of types of F ω such as strong normalization and Church-Rosser.

Among the novel aspects of the present solution is the use of term rewriting techniques to present intersection types, which clearly splits the computational semantics (reduction rules) from the syntax (inference rules) of the system. Another original feature is the use of a choice operator to model the behavior of variables during subtype checking.

Keywords

Normal Form Intersection Type Reduction Rule Choice Operator Strong Normalization 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    H. P. Barendregt, M. Coppo, and M. Dezani-Ciancaglini. A filter lambda model and the completeness of type assignment. Journal of Symbolic Logic, 48(4):931–940, 1983.Google Scholar
  2. [2]
    Kim Bruce and John Mitchell. PER models of subtyping, recursive types and higher-order polymorphism. In Proceedings of the Nineteenth ACM Symposium on Principles of Programming Languages, Albequerque, NM, January 1992.Google Scholar
  3. [3]
    Peter Canning, William Cook, Walter Hill, Walter Olthoff, and John Mitchell. Fbounded quantification for object-oriented programming. In Fourth International Conference on Functional Programming Languages and Computer Architecture, pages 273–280, September 1989.Google Scholar
  4. [4]
    Luca Cardelli. A semantics of multiple inheritance. Information and Computation, 76:138–164, 1988. Preliminary version in Semantics of Data Types, Kahn, MacQueen, and Plotkin, eds., Springer-Verlag LNCS 173, 1984.CrossRefGoogle Scholar
  5. [5]
    Luca Cardelli. Notes about F >ω. Unpublished manuscript, October 1990.Google Scholar
  6. [6]
    Luca Cardelli and Peter Wegner. On understanding types, data abstraction, and polymorphism. Computing Surveys, 17(4), December 1985.Google Scholar
  7. [7]
    Felice Cardone and Mario Coppo. Two extensions of Curry's type inference system. In Odifreddi [20], pages 19–76.Google Scholar
  8. [8]
    Giuseppe Castagna and Benjamin Pierce. Decidable bounded quantification. In Proceedings of Twenty-First Annual ACM Symposium on Principles of Programming Languages, Portland, OR. ACM, January 1994.Google Scholar
  9. [9]
    Adriana Compagnoni. Higher-Order Subtyping with Intersection Types. PhD thesis, University of Nijmegen, The Netherlands, January 1995.Google Scholar
  10. [10]
    Adriana B. Compagnoni. Subtyping in F ω is decidable. Technical Report ECS-LFCS-94-281, LFCS, University of Edinburgh, January 1994.Google Scholar
  11. [11]
    Adriana B. Compagnoni and Benjamin C. Pierce. Multiple inheritance via intersection types. Mathematical Structures in Computer Science, 1995. To appear. Preliminary version available as University of Edinburgh technical report ECS-LFCS-93-275 and Catholic University Nijmegen computer science technical report 93-18, Aug. 1993.Google Scholar
  12. [12]
    William R. Cook, Walter L. Hill, and Peter S. Canning. Inheritance is not subtyping. In Seventeenth Annual ACM Symposium on Principles of Programming Languages, pages 125–135, San Francisco, CA, January 1990. Also in [18].Google Scholar
  13. [13]
    M. Coppo and M. Dezani-Ciancaglini. A new type-assignment for λ-terms. Archiv. Math. Logik, 19:139–156, 1978.CrossRefGoogle Scholar
  14. [14]
    Pierre-Louis Curien and Giorgio Ghelli. Coherence of subsumption: Minimum typing and type-checking in F . Mathematical Structures in Computer Science, 2:55–91, 1992. Also in [18].Google Scholar
  15. [15]
    Giorgio Ghelli. Proof Theoretic Studies about a Minimal Type System Integrating Inclusion and Parametric Polymorphism. PhD thesis, Università di Pisa, March 1990. Technical report TD-6/90, Dipartimento di Informatica, Università di Pisa.Google Scholar
  16. [16]
    Giorgio Ghelli, January 1994. Message to the Types mailing list.Google Scholar
  17. [17]
    Jean-Yves Girard. Interprétation fonctionelle et élimination des coupures de l'arithmétique d'ordre supérieur. PhD thesis, Université Paris VII, 1972.Google Scholar
  18. [18]
    Carl A. Gunter and John C. Mitchell. Theoretical Aspects of Object-Oriented Programming: Types, Semantics, and Language Design. The MIT Press, 1994.Google Scholar
  19. [19]
    John C. Mitchell. Toward a typed foundation for method specialization and inheritance. In Proceedings of the 17th ACM Symposium on Principles of Programming Languages, pages 109–124, January 1990. Also in in [18].Google Scholar
  20. [20]
    Piergiorgio Odifreddi, editor. Logic and Computer Science. Number 31 in APIC Studies in Data Processing. Academic Press, 1990.Google Scholar
  21. [21]
    Benjamin C. Pierce. Programming with Intersection Types and Bounded Polymorphism. PhD thesis, Carnegie Mellon University, December 1991. Available as School of Computer Science technical report CMU-CS-91-205.Google Scholar
  22. [22]
    Benjamin C. Pierce and David N. Turner. Simple type-theoretic foundations for object-oriented programming. Journal of Functional Programming, 4(2):207–247, April 1994.Google Scholar
  23. [23]
    Martin Steffen and Benjamin Pierce. Higher-order subtyping. In IFIP Working Conference on Programming Concepts, Methods and Calculi (PROCOMET), June 1994. An earlier version appeared as University of Edinburgh technical report ECS-LFCS-94-280 and Universität Erlangen-Nürnberg Interner Bericht IMMD7-01/94, February 1994.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1995

Authors and Affiliations

  • Adriana B. Compagnoni
    • 1
  1. 1.Laboratory for Foundations of Computer Science, Department of Computer ScienceUniversity of EdinburghUK

Personalised recommendations