POPL '98 Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Making the future safe for the past: adding genericity to the Java programming language
Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Featherweight Java: a minimal core calculus for Java and GJ
Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
On Variance-Based Subtyping for Parametric Types
ECOOP '02 Proceedings of the 16th European Conference on Object-Oriented Programming
Adding wildcards to the Java programming language
Proceedings of the 2004 ACM symposium on Applied computing
Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley))
Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley))
Improving type error messages for generic java
Proceedings of the 2009 ACM SIGPLAN workshop on Partial evaluation and program manipulation
An Interval-Based Inference of Variant Parametric Types
ESOP '09 Proceedings of the 18th European Symposium on Programming Languages and Systems: Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009
Corrective hints for type incorrect generic Java programs
Proceedings of the 2010 ACM SIGPLAN workshop on Partial evaluation and program manipulation
JavaGI: The Interaction of Type Classes with Interfaces and Inheritance
ACM Transactions on Programming Languages and Systems (TOPLAS)
Taming wildcards in Java's type system
Proceedings of the 32nd ACM SIGPLAN conference on Programming language design and implementation
Type checking modular multiple dispatch with parametric polymorphism and multiple inheritance
Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
Improving type error messages for generic Java
Higher-Order and Symbolic Computation
Java wildcards meet definition-site variance
ECOOP'12 Proceedings of the 26th European conference on Object-Oriented Programming
Harmonizing classes, functions, tuples, and type parameters in virgil iii
Proceedings of the 34th ACM SIGPLAN conference on Programming language design and implementation
Hi-index | 0.00 |
Java 5, the most recent major update to the Java Programming Language, introduced a number of sophisticated features, including a major extension to the type system. While the technical details of these new features are complex, much of this complexity is hidden from the typical Java developer by an ambitious type inference mechanism. Unfortunately, the extensions to the Java 5 type system were so novel that their technical details had not yet been thoroughly investigated in the research literature. As a result, the Java 5 compiler includes a pragmatic but flawed type inference algorithm that is, by design, neither sound nor locally complete. The language specification points out that neither of these failures is catastrophic: the correctness of potentially-unsound results must be verified during type checking; and incompleteness can usually be worked around by manually providing the method type parameter bindings for a given call site. This paper dissects the type inference algorithm of Java 5 and proposes a signficant revision that is sound and able to calculate correct results where the Java 5 algorithm fails. The new algorithm is locally complete with the exception of a difficult corner case. Moreover, the new algorithm demonstrates that several arbitrary restrictions in the Java type system---most notably the ban on lower-bounded type parameter declarations and the limited expressibility of intersection types---are unnecessary. We hope that this work will spur the evolution of a more coherent, more comprehensive generic type system for Java.