Skip to main content

Decidability of higher-order subtyping with intersection types

  • Conference paper
  • First Online:
Book cover Computer Science Logic (CSL 1994)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 933))

Included in the following conference series:

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.

This research was supported by the Dutch organization for scientific research, NWO-SION project Typed lambda calculus, 612-316-030, and by EPSRC GRANT, GR/G 55792 Constructive logic as a basis for program development.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  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. 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. 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. 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.

    Article  Google Scholar 

  5. Luca Cardelli. Notes about F ω> . Unpublished manuscript, October 1990.

    Google Scholar 

  6. Luca Cardelli and Peter Wegner. On understanding types, data abstraction, and polymorphism. Computing Surveys, 17(4), December 1985.

    Google Scholar 

  7. Felice Cardone and Mario Coppo. Two extensions of Curry's type inference system. In Odifreddi [20], pages 19–76.

    Google Scholar 

  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. Adriana Compagnoni. Higher-Order Subtyping with Intersection Types. PhD thesis, University of Nijmegen, The Netherlands, January 1995.

    Google Scholar 

  10. Adriana B. Compagnoni. Subtyping in F ω is decidable. Technical Report ECS-LFCS-94-281, LFCS, University of Edinburgh, January 1994.

    Google Scholar 

  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. 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. M. Coppo and M. Dezani-Ciancaglini. A new type-assignment for λ-terms. Archiv. Math. Logik, 19:139–156, 1978.

    Article  Google Scholar 

  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. 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. Giorgio Ghelli, January 1994. Message to the Types mailing list.

    Google Scholar 

  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. 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. 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. Piergiorgio Odifreddi, editor. Logic and Computer Science. Number 31 in APIC Studies in Data Processing. Academic Press, 1990.

    Google Scholar 

  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. 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. 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 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Leszek Pacholski Jerzy Tiuryn

Rights and permissions

Reprints and permissions

Copyright information

© 1995 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Compagnoni, A.B. (1995). Decidability of higher-order subtyping with intersection types. In: Pacholski, L., Tiuryn, J. (eds) Computer Science Logic. CSL 1994. Lecture Notes in Computer Science, vol 933. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0022246

Download citation

  • DOI: https://doi.org/10.1007/BFb0022246

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-60017-6

  • Online ISBN: 978-3-540-49404-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics