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].
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Abadi, M., Cardelli, L.: A Theory of Objects. Springer, Heidelberg (1996)
Bruce, K.B., Cardelli, L., Pierce, B.C.: Comparing object encodings. Information and Computation 155(1-2), 108–133 (1999)
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)
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
Cardelli, L., Wegner, P.: On understanding types, data abstraction, and polymorphism. ACM Comput. Surv. 17, 471–522 (1985)
Ghelli, G., Pierce, B.: Bounded existentials and minimal typing. Theoretical Computer Science 193(1-2), 75–96 (1998)
Hopcroft, J.E., Motwani, R., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation, 3rd edn. Addison Wesley, Reading (2006)
Kaes, S.: Parametric overloading in polymorphic programming languages. In: Ganzinger, H. (ed.) ESOP 1988. LNCS, vol. 300, pp. 131–144. Springer, Heidelberg (1988)
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
Läufer, K.: Type classes with existential types. J. Funct. Program. 6(3), 485–517 (1996)
Mazurak, K., Zdancewic, S.: Type inference for Java 5: Wildcards, F-bounds, and undecidability (2006), http://www.cis.upenn.edu/~stevez/note.html
Mitchell, J.C., Plotkin, G.D.: Abstract types have existential types. ACM TOPLAS 10(3), 470–502 (1988)
Odersky, M.: The Scala language specification version 2.7. Draft (April 2008), http://www.scala-lang.org/docu/files/ScalaReference.pdf
Pierce, B.C.: Bounded quantification is undecidable. Information and Computation 112(1), 131–165 (1994)
Pierce, B.C. (ed.): Advanced Topics in Types and Programming Languages. MIT Press, Cambridge (2005)
Plümicke, M.: Typeless programming in Java 5.0 with wildcards. In: 5th PPPJ. ACM, New York (2007)
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)
Post, E.L.: A variant of a recursivley unsolvable problem. Bulletin of the American Mathematical Society 53, 264–268 (1946)
Russo, C.V.: Types for Modules. PhD thesis, Edinburgh University, Edinburgh, Scotland, LFCS Thesis ECS–LFCS–98–389 (1998)
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
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)
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)
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)
Wehr, S., Thiemann, P.: Subtyping existential types. In: 10th FTfJP, informal proceedings (2008), http://www.informatik.uni-freiburg.de/~wehr/publications/subex.pdf
Wehr, S., Thiemann, P.: JavaGI in the battlefield: Practical experience with generalized interfaces. In: Proc. 8th GPCE, Denver, Colorado, USA. ACM, New York (2009)
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
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)