2009 | OriginalPaper | Buchkapitel
Java Type Unification with Wildcards
verfasst von : Martin Plümicke
Erschienen in: Applications of Declarative Programming and Knowledge Management
Verlag: Springer Berlin Heidelberg
Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.
Wählen Sie Textabschnitte aus um mit Künstlicher Intelligenz passenden Patente zu finden. powered by
Markieren Sie Textabschnitte, um KI-gestützt weitere passende Inhalte zu finden. powered by
With the introduction of
Java 5.0
the type system has been extended by parameterized types, type variables, type terms, and wildcards. As a result very complex types can arise. The term
$\tt{Vector}<{\tt{\texttt{?}\ extends\ Vector}<{\tt{AbstractList}<{Integer}>>>}}$
is for example a correct type in
Java 5.0
.
In this paper we present a type unification algorithm for
Java 5.0
type terms. The algorithm unifies type terms, which are in subtype relationship. For this we define
Java 5.0
type terms and its subtyping relation, formally.
As
Java 5.0
allows wildcards as instances of generic types, the subtyping ordering contains infinite chains. We show that the type unification is still finitary. We give a type unification algorithm, which calculates the finite set of general unifiers.