Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/232627.232643acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article
Free access

Complexity of kernel Fun subtype checking

Published: 15 June 1996 Publication History

Abstract

System kernel Fun is an abstract version of the system Fun defined by Cardelli's and Wegner's seminal paper [CW85], and is strictly related to system F≤. Extensions of these two systems are currently the basis of most proposals for strong type systems for object-oriented languages.We study here the problem of subtype checking for system kernel Fun, presenting the following results. We show that the standard kernel Fun subtype checking algorithm has an exponential complexity, and generates an exponential number of different subproblems. We then present a new subtype checking algorithm which has a polynomial complexity. In the process we study how variable names can be managed by a kernel Fun subtype checker which is not based on the De Bruijn encoding, and we show how to perform kernel Fun subtype checking with a "constraint generating" technique.The algorithm we give is described by a set of type rules, which we prove to be equivalent to the standard one. This new presentation of kernel Fun type system is characterized by a "multiplicative" behaviour, and it may open the way to new presentations for system F≤ as well.

References

[1]
Roberto M. Amadio and Luca Caxdelli. Subtyping recursive types. A CM Transactions on Programmzng Languages and Systems, 15(4):575- 631, 1993.
[2]
Martin Abadi and Luca Cardelli. A theory of primitive objects: Second-order systems. In European Symposium on Programming (ESOP), Edinburgh, Scotland, 1994.
[3]
A. Albano, G. Ghelli, and R. Orsini. Fibonacci: A programming language for object databases. Journal of Very Large Data Bases, 4(3):403- 444, 1995.
[4]
Val Breazu-Tannen, Thierry Coquand, Carl Qlunter, and Andre Scedrov. Inheritance as implicit coercion. Information and Computation, 93:172-221, 1991. Also in {GM94}.
[5]
Kim B. Bruce. The equivalence of two semantic definitions for inheritance in object-oriented languages. In Proceedings of Mathematical Foundat,ons of Programming Semantics, Pittsburgh, PA, March 1991.
[6]
Kim B. Bruce. A paradigmatic object-oriented programming language: Design, static typing and semantics. Journal of Functional Programmmg, 4(2), April 1994.
[7]
Kim B. Bruce, Angela Schuett, and Robert van Gent. PolyTOIL: A type-safe polymorphic object-oriented language, extended abstract. In Proc. of European Conference on Object-Oriented Programming (ECOOP), 1995.
[8]
Luca Cardelli. A semantics of multiple inheritance. In G. Kahn, D. MacQueen, and G. Plotkin, editors, Semantics of Data Types, volume 173 of Lecture Notes in Computer Science, pages 51-67. Springer-Verlag, 1984. Full version in Information and Computation 76:138-164, 1988.
[9]
Peter Canning, William Cook, Walt Hill, and Walter Olthoff. Interfaces for strongly-typed object-oriented programming. In OOPSLA 89, pages 457--4(~7, 1989.
[10]
P.-L. Curien and G. Ghelli. Coherence of subsumption, minimum typing and type checking in F<. Mathematical Structures in Computer Science, 2(1):55-91, 1992.
[11]
P.-L. Curien and G. Ghelli. Decidability and confluence of/3rttop< reduction in F<. Information and Computat,on, 109(1, 2):57-114, 1994.
[12]
W.R. Cook, W.L. Hill, and P.S. Canning. Inheritance is not subtyping. In POPL '90, 1990.
[13]
Peter Canning, Walt Hill, and Walter Olthoff. A kernel language for object-oriented programming. Technical Report STL-88-21, Hewlett- Packard Labs, 1988.
[14]
Luca Cardelli and Giuseppe Longo. A semantic basis for Quest. Journal of Functional Programming, 1 (4):417-458, October 1991.
[15]
Luca Cardelli, Simone Martini, John C. Mitchell, and Andre Scedrov. An extension of system F with subtyping. Information and Computation, 109(1-2):4-56, 1994.
[16]
A.B. Compagnoni. Decidability of Higher-Order Subtyping with Intersection Types Proceedings of Computer Science Logic, September 1994.
[17]
Giuseppe Castagna and Benjamin Pierce. Decidable bounded quantification. In POP L '9j. ACM, January 1994.
[18]
L. Cardelli and P. Wegner. On under:standing types, data abstraction and polymorphism. Computing Surveys, 17(4):471-522, December 1985.
[19]
Scott Danforth and Chris Tomlinson. Type theories and object-oriented programming. A CM Comput2ng Surveys, 20(1):29-72, March 1988.
[20]
J. Eifrig, S. Smith, and V. Trifonov. Sound{ polymorphic type inference for objects. In OOPSLA '95, 1995.
[21]
J. Eifrig, S. Smith, V. Trifonov, and A. Zwarico. Application of OOP type theory: State, .decidability, integration. In OOPSLA '9J, 1994.
[22]
Kathleen Fisher and John Mitchell. Notes on typed object-oriented programming. In Proceedings of Theoretical Aspects of Computer Software, Sendal, Japan, pages 844-885. Springer-Verlag, April 1994. LNCS 789.
[23]
G. Ghelli. Proof Theoretic Studies about a M~nzmal Type System Integratzng Inclusion and Parametric PoIymorphism. PhD thesis, Dipartimento di Informatica, Universitk di Pisa, March 1990. Tech. Rep. TD-6/90.
[24]
G. Ghelli. Modelling features of object-oriented languages in second order functional languages with subtypes. In J.W. de Bakker, W.P. de Roever, and G. Rozenberg, editors, Foundations of Object-Oriented Languages, number 489 in LNCS, pages 311-340, Berlin, 1991. Springer-Verlag.
[25]
G. Ghelli. Divergence of F_~ type checking. Technical Report 5/93, Dipartimento di Informatica, Universitk di Pisa, } 993.
[26]
G. Ghelli. Recursive types are not conservative over F<. In M. Bezen and J.F. Groote, editors, Typed Lambda Calculi and Apphcatzons (TLCA) 93, number 664 in LNCS, pages 146- 162, Berlin, March 1993. Springer-Verlag.
[27]
G. Ghelli. Divergence of F< type checking. Theoretical Computer Science, 139(1,2):131-162, 1995.
[28]
Jean-Yves Girard. Linear logic. TheoretzcaI Computer Science, 50:1-102, 1987.
[29]
Carl A. Gunter and John C. Mitchell. Theoretical Aspects of Object-Oriented Programming: Types, Semantics, and Language Design. The MIT Press, 1994.
[30]
G. Ghelli and B. Pierce. Bounded existentials and minimal typing. Available by ftp, 1992.
[31]
Martin Hofmann and Benjamin Pierce. A unifying type-theoretic framework for objects. Jo urnal of Functional Programming, 1995. To appear.
[32]
Dinesh Katiyar and Sriram Sankar. Completely bounded quantification is decidable. In Proceedings of the A CM SIGPLAN Workshop on ML and its Applications, June 1992.
[33]
P.D. Lincoln and J.C. Mitchell. Algorithmic aspects of type inference with subtypes. In POPL '92, pages 293-304, January 1992.
[34]
John C. Mitchell, Furio Honsell, and Kathleen Fisher. A lambda calculus of objects and method specialization. In 1993 IEEE Symposium on Logic in Computer Science, June 1993.
[35]
J.C. Mitchell. Toward a typed foundation for method specialization and inheritance. In POPL '90, 1990.
[36]
Benjamin C. Pierce. Bounded quantification is undecidable. Information and Computatzon, 112(1):131-165, July 1994. Also in {GM94}.
[37]
B.C. Pierce and M. Steffen. Higher-order subtyping. Submitted for publication. A preliminary version appeared in IFIP Working Conference on Programming Concepts, Methods and Calculi (PROCOMET), June 1994.
[38]
Benjamin C. Pierce and David N. Turner. Simple type-theoretic foundations for objectoriented programming. Journal of Functional Programming, 4(2):207-247, April 1994.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP '96: Proceedings of the first ACM SIGPLAN international conference on Functional programming
June 1996
273 pages
ISBN:0897917707
DOI:10.1145/232627
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 15 June 1996

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. polymorphism
  2. subtyping
  3. type checking
  4. type theory

Qualifiers

  • Article

Conference

ICFP96
Sponsor:
ICFP96: International Conference on Functional Programming
May 24 - 26, 1996
Pennsylvania, Philadelphia, USA

Acceptance Rates

ICFP '96 Paper Acceptance Rate 25 of 83 submissions, 30%;
Overall Acceptance Rate 333 of 1,064 submissions, 31%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)86
  • Downloads (Last 6 weeks)24
Reflects downloads up to 23 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2019)Subtyping recursion and parametric polymorphism in kernel funInformation and Computation10.5555/1085478.1709505198:2(71-147)Online publication date: 4-Jan-2019
  • (2019)Subtyping, recursion, and parametric polymorphism in kernel funInformation and Computation10.5555/1085478.1085479198:2(71-147)Online publication date: 4-Jan-2019
  • (2005)Subtyping recursion and parametric polymorphism in kernel funInformation and Computation10.1016/j.ic.2004.11.003198:2(71-147)Online publication date: May-2005
  • (1999)Subtyping recursive types in kernel FunProceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158)10.1109/LICS.1999.782605(137-146)Online publication date: 1999

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media