Skip to main content

On the Decidability of Subtyping with Bounded Existential Types

  • Conference paper
Book cover Programming Languages and Systems (APLAS 2009)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5904))

Included in the following conference series:

Abstract

Bounded existential types are a powerful language feature for modeling partial data abstraction and information hiding. However, existentials do not mingle well with subtyping as found in current object-oriented languages: the subtyping relation is already undecidable for very restrictive settings.

This paper considers two subtyping relations defined by extracting the features specific to existentials from current language proposals (JavaGI, WildFJ, and Scala) and shows that both subtyping relations are undecidable. One of the two subtyping relations remains undecidable even if bounded existential types are removed.

With the goal of regaining decidable type checking for the JavaGI language, the paper also discusses various restrictions including the elimination of bounded existentials from the language as well as possible amendments to regain some of their features.

A preliminary version of this work was presented at FTfJP 2008 [24].

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abadi, M., Cardelli, L.: A Theory of Objects. Springer, Heidelberg (1996)

    MATH  Google Scholar 

  2. Bruce, K.B., Cardelli, L., Pierce, B.C.: Comparing object encodings. Information and Computation 155(1-2), 108–133 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  3. Cameron, N., Drossopoulou, S., Ernst, E.: A model for Java with wildcards. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 2–26. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  4. Cameron, N., Ernst, E., Drossopoulou, S.: Towards an existential types model for Java wildcards. In: FTfJP, informal proceedings (2007), http://www.doc.ic.ac.uk/~ncameron/papers/cameron_ftfjp07_full.pdf

  5. Cardelli, L., Wegner, P.: On understanding types, data abstraction, and polymorphism. ACM Comput. Surv. 17, 471–522 (1985)

    Article  Google Scholar 

  6. Ghelli, G., Pierce, B.: Bounded existentials and minimal typing. Theoretical Computer Science 193(1-2), 75–96 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  7. Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation, 3rd edn. Addison Wesley, Reading (2006)

    Google Scholar 

  8. Kaes, S.: Parametric overloading in polymorphic programming languages. In: Ganzinger, H. (ed.) ESOP 1988. LNCS, vol. 300, pp. 131–144. Springer, Heidelberg (1988)

    Google Scholar 

  9. Kennedy, A.J., Pierce, B.C.: On decidability of nominal subtyping with variance. In: FOOL/WOOD, informal proceedings (January 2007), http://foolwood07.cs.uchicago.edu/program/kennedy-abstract.html

  10. Läufer, K.: Type classes with existential types. J. Funct. Program. 6(3), 485–517 (1996)

    Article  MATH  Google Scholar 

  11. Mazurak, K., Zdancewic, S.: Type inference for Java 5: Wildcards, F-bounds, and undecidability (2006), http://www.cis.upenn.edu/~stevez/note.html

  12. Mitchell, J.C., Plotkin, G.D.: Abstract types have existential types. ACM TOPLAS 10(3), 470–502 (1988)

    Article  Google Scholar 

  13. Odersky, M.: The Scala language specification version 2.7. Draft (April 2008), http://www.scala-lang.org/docu/files/ScalaReference.pdf

  14. Pierce, B.C.: Bounded quantification is undecidable. Information and Computation 112(1), 131–165 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  15. Pierce, B.C. (ed.): Advanced Topics in Types and Programming Languages. MIT Press, Cambridge (2005)

    MATH  Google Scholar 

  16. Plümicke, M.: Typeless programming in Java 5.0 with wildcards. In: 5th PPPJ. ACM, New York (2007)

    Google Scholar 

  17. Plümicke, M.: Java type unification with wildcards. In: Seipel, D., Hanus, M., Wolf, A. (eds.) INAP/WLP 2007. LNCS (LNAI), vol. 5437, pp. 223–240. Springer, Heidelberg (2009)

    Google Scholar 

  18. Post, E.L.: A variant of a recursivley unsolvable problem. Bulletin of the American Mathematical Society 53, 264–268 (1946)

    Article  MathSciNet  Google Scholar 

  19. Russo, C.V.: Types for Modules. PhD thesis, Edinburgh University, Edinburgh, Scotland, LFCS Thesis ECS–LFCS–98–389 (1998)

    Google Scholar 

  20. Torgersen, M., Ernst, E., Hansen, C.P.: Wild FJ. In: FOOL, informal proceedings (2005), http://homepages.inf.ed.ac.uk/wadler/fool/program/14.html

  21. Torgersen, M., Ernst, E., Hansen, C.P., von der Ahé, P., Bracha, G., Gafter, N.: Adding wildcards to the Java programming language. Journal of Object Technology 3(11), 97–116 (2004)

    Google Scholar 

  22. Wadler, P., Blott, S.: How to make ad-hoc polymorphism less ad-hoc. In: Proc. 16th ACM Symp. POPL, Austin, Texas, USA. ACM Press, New York (1989)

    Google Scholar 

  23. Wehr, S., Lämmel, R., Thiemann, P.: JavaGI: Generalized interfaces for Java. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 347–372. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  24. Wehr, S., Thiemann, P.: Subtyping existential types. In: 10th FTfJP, informal proceedings (2008), http://www.informatik.uni-freiburg.de/~wehr/publications/subex.pdf

  25. Wehr, S., Thiemann, P.: JavaGI in the battlefield: Practical experience with generalized interfaces. In: Proc. 8th GPCE, Denver, Colorado, USA. ACM, New York (2009)

    Google Scholar 

  26. Wehr, S., Thiemann, P.: On the decidability of subtyping with bounded existential types (extended edition). Technical report, Universität Freiburg (September 2009), ftp://ftp.informatik.uni-freiburg.de/documents/reports/report250/report00250.ps.gz

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Wehr, S., Thiemann, P. (2009). On the Decidability of Subtyping with Bounded Existential Types. In: Hu, Z. (eds) Programming Languages and Systems. APLAS 2009. Lecture Notes in Computer Science, vol 5904. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-10672-9_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-10672-9_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-10671-2

  • Online ISBN: 978-3-642-10672-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics