SPLASH 2014
Mon 20 - Fri 24 October 2014 Portland, Oregon, United States
Thu 23 Oct 2014 11:37 - 12:00 at Salon E - Type Systems Chair(s): Ravi Chugh

Wildcard annotations can improve the generality of Java generic libraries, but require heavy manual effort. We present an algorithm for refactoring and inferring more general type instantiations of Java generics using wildcards. Compared to past approaches, our work is practical and immediately applicable: we assume no changes to the Java type system, while taking into account all its intricacies. Our system allows users to select declarations (variables, method parameters, return types, etc.) to generalize and considers declarations not declared in available source code. It then per- forms an inter-procedural flow analysis and a method body analysis, in order to generalize type signatures. We evaluate our technique on six Java generic libraries. We find that 30% of available declarations of variant type signatures can be generalized—i.e., relaxed with more general wildcard types. On average, 228 other declarations need to be updated when a declaration is generalized, showing that this refactoring would be too tedious and error-prone to perform manually.

Video: http://www.infoq.com/presentations/java-generics-wildcards

Refactoring Java Generics by Inferring Wildcards, In Practice (oopsla2014-altidor.pdf)702KiB

Thu 23 Oct

oopsla2014
10:30 - 12:00: OOPSLA - Type Systems at Salon E
Chair(s): Ravi ChughUniversity of Chicago
oopsla2014141405300000010:30 - 10:52
Talk
Thomas W. BartensteinSUNY Binghamton, Yu David LiuState University of New York (SUNY) Binghamton
Link to publication File Attached
oopsla2014141405435000010:52 - 11:15
Talk
Nada AminEPFL, Tiark RompfPurdue & Oracle Labs, Martin OderskyEcole Polytechnique Federale de Lausanne
Link to publication File Attached
oopsla2014141405570000011:15 - 11:37
Talk
Esteban Allende, Johan FabryUniversity of Chile, Ronald GarciaUniversity of British Columbia, Éric TanterUniversity of Chile
Link to publication
oopsla2014141405705000011:37 - 12:00
Talk
John AltidorUniversity of Massachusetts, Yannis SmaragdakisUniversity of Athens
Link to publication File Attached