Covariance and contravariance: conflict without a cause
ACM Transactions on Programming Languages and Systems (TOPLAS)
Simplifying subtyping constraints
Proceedings of the first ACM SIGPLAN international conference on Functional programming
Partial online cycle elimination in inclusion constraint graphs
PLDI '98 Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation
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
Modular type-based reverse engineering of parameterized types in Java code
Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Projection merging: reducing redundancies in inclusion constraint graphs
Proceedings of the 27th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Ultra-fast aliasing analysis using CLA: a million lines of C code in a second
Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation
Type inference for variant object types
Information and Computation - FOOL VII
SAS '96 Proceedings of the Third International Symposium on Static Analysis
Converting Java classes to use generics
OOPSLA '04 Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Converting java programs to use generic libraries
OOPSLA '04 Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley))
Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley))
Variant parametric types: A flexible subtyping scheme for generics
ACM Transactions on Programming Languages and Systems (TOPLAS)
A flow-based approach for variant parametric types
Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
Java type inference is broken: can we fix it?
Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications
Efficiently refactoring java applications to use generic libraries
ECOOP'05 Proceedings of the 19th European conference on Object-Oriented Programming
Inference rules for generic code migration of aspect-oriented programs
Science of Computer Programming
Hi-index | 0.00 |
Variant parametric types represent the successful integration of subtype and parametric polymorphism to support a more flexible subtyping for Java like languages. A key feature that helps strengthen this integration is the use-site variance. Depending on how the fields are used, each variance denotes a covariant, a contravariant, an invariant or a bivariant subtyping. By annotating variance properties on each type argument to a parametric class, programmers can choose various desirable variance properties for each use of the parametric class. Although Java library classes have been successfully refactored to use variant parametric types, these mechanisms are often criticized, due to the difficulty of choosing appropriate variance annotations. Several algorithms have been proposed for automatically refactoring legacy Java code to use generic libraries, but none can support the full flexibility of the use-site variance-based subtyping. This paper addresses this difficulty by proposing a novel interval-based approach to inferring both the variance annotations and the type arguments. Each variant parametric type is regarded as an interval type with two type bounds, a lower bound for writing and an upper bound for reading. We propose a constraint-based inference algorithm that works on a per method basis, as a summary-based analysis.