Subtyping First-Class Polymorphic Components

  • João Costa Seco
  • Luís Caires
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3444)


We present a statically typed, class-based object oriented language where classes are first class polymorphic values. A main contribution of this work is the design of a type system that combines first class polymorphic values with structural equirecursive types and admits a subtyping algorithm which is arguably much simpler than existing alternatives. Our development is modular and can be easily instantiated for either a Kernel-Fun or a \(F_{\leq}^{\top}\) style of subtyping discipline.


  1. 1.
    Abadi, M., Cardelli, L.: A Theory of Objects. Springer, Heidelberg (1996)MATHGoogle Scholar
  2. 2.
    Amadio, R.M., Cardelli, L.: Subtyping recursive types. ACM Transactions on Programming Languages and Systems 15(4), 575–631 (1993)CrossRefGoogle Scholar
  3. 3.
    Brandt, M., Henglein, F.: Coinductive axiomatization of recursive type equality and subtyping. In: de Groote, P., Hindley, J.R. (eds.) TLCA 1997. LNCS, vol. 1210, pp. 63–81. Springer, Heidelberg (1997)Google Scholar
  4. 4.
    Castagna, G., Pierce, B.: Corrigendum: Decidable bounded quantification. In: Proceedings of the Twenty-Second ACM Symposium on Principles of Programming Languages (POPL), Portland, Oregon. ACM Press, New York (1995)Google Scholar
  5. 5.
    Colazzo, D., Ghelli, G.: Subtyping recursive types in Kernel Fun. In: 14th Symp. on Logic in Computer Science (LICS 1999), pp. 137–146 (1999)Google Scholar
  6. 6.
    Cook, W.R., Hill, W.L., Canning, P.S.: Inheritance is not subtyping. In: Gunter, C.A., Mitchell, J.C. (eds.) Theoretical Aspects of Object-Oriented Programming: Types, Semantics, and Language Design, pp. 497–518. The MIT Press, Cambridge (1994)Google Scholar
  7. 7.
    Curien, P.-L., Ghelli, G.: Coherence of subsumption, minimum typing and type-checking in F  ≤ . In: Theoretical aspects of object-oriented programming: types, semantics, and language design, pp. 247–292. MIT Press, Cambridge (1994)Google Scholar
  8. 8.
    Gabbay, M., Pitts, A.: A New Approach to Abstract Syntax with Variable Binding. Formal Aspects of Computing 13(3–5), 341–363 (2002)MATHCrossRefGoogle Scholar
  9. 9.
    Gapeyev, V., Levin, M., Pierce, B.: Recursive subtyping revealed. In: Proc. of the Intl. Conference on Functional Programming, ICFP (2000)Google Scholar
  10. 10.
    Gauthier, N., Pottier, F.: Numbering matters: First-order canonical forms for second-order recursive types. In: Proc. of the 2004 ACM SIGPLAN Intl. Conference on Functional Programming (ICFP 2004), pp. 150–161 (2004)Google Scholar
  11. 11.
    Ghelli, G.: Recursive types are not conservative over F ≤ . In: Bezem, M., Groote, J.F. (eds.) TLCA 1993. LNCS, vol. 664. Springer, Heidelberg (1993)CrossRefGoogle Scholar
  12. 12.
    Ghelli, G.: Divergence of F ≤  type checking. Theoretical Computer Science 139(1-2), 131–162 (1995)MATHCrossRefMathSciNetGoogle Scholar
  13. 13.
    Igarashi, A., Pierce, B., Wadler, P.: Featherweight Java: A minimal core calculus for Java and GJ. In: Meissner, L. (ed.) Proc. of the 1999 ACM SIGPLAN Conf. on Object-Oriented Programming, Systems, Languages & Applications (OOPSLA 1999), N.Y., vol. 34(10), pp. 132–146 (1999)Google Scholar
  14. 14.
    Jeffrey, A.: A symbolic labelled transition system for coinductive subtyping of F μ ≤ . In: 16th Annual IEEE Symposium on Logic in Computer Science (June 2001)Google Scholar
  15. 15.
    Bettini, B.V.L., Bono, V.: Subtyping mobile classes and mixins. In: FOOL 10 (2003)Google Scholar
  16. 16.
    Pierce, B.C.: Bounded quantification is undecidable. In: Gunter, C.A., Mitchell, J.C. (eds.) Theoretical Aspects of Object-Oriented Programming: Types, Semantics, and Language Design, pp. 427–459. MIT Press, Cambridge (1994)Google Scholar
  17. 17.
    Pierce, B.C.: Types and Programming Languages. The MIT Press, Cambridge (2002)Google Scholar
  18. 18.
    Seco, J.C., Caires, L.: A basic model of typed components. In: Proc. of the European Conf. on Object-Oriented Programming, ECOOP (2000)Google Scholar
  19. 19.
    Seco, J.C., Caires, L.: The parametric component calculus. Technical Report UNL-DI-7-2002, FCT-UNL (2002)Google Scholar
  20. 20.
    Seco, J.C., Caires, L.: Subtyping first class polymorphic components. Technical Report UNL-DI-1-2005, FCT-UNL (2004)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • João Costa Seco
    • 1
  • Luís Caires
    • 1
  1. 1.Departamento de InformáticaUniversidade Nova de Lisboa 

Personalised recommendations