Show simple item record

Converting Java Programs to Use Generic Libraries

dc.date.accessioned2005-12-22T01:26:03Z
dc.date.accessioned2018-11-24T10:24:04Z
dc.date.available2005-12-22T01:26:03Z
dc.date.available2018-11-24T10:24:04Z
dc.date.issued2004-03-30
dc.identifier.urihttp://hdl.handle.net/1721.1/30456
dc.identifier.urihttp://repository.aust.edu.ng/xmlui/handle/1721.1/30456
dc.description.abstractJava 1.5 will include a type system (called JSR-14) that supports parametric polymorphism, or generic classes. This will bring many benefits to Java programmers, not least because current Java practice makes heavy use of logically-generic classes, including container classes.Translation of Java source code into semantically equivalent JSR-14 source code requires two steps: parameterization (adding type parameters to class definitions) and instantiation (adding the type arguments at each use of a parameterized class). Parameterization need be done only once for a class, whereas instantiation must be performed for each client, of which there are potentially many more. Therefore, this work focuses on the instantiation problem. We present a technique to determine sound and precise JSR-14 types at each use of a class for which a generic type specification is available. Our approach uses a precise and context-sensitive pointer analysis to determine possible types at allocation sites, and a set-constraint-based analysis (that incorporates guarded, or conditional, constraints) to choose consistent types for both allocation and declaration sites. The technique handles all features of the JSR-14 type system, notably the raw types that provide backward compatibility. We have implemented our analysis in a tool that automatically inserts type parameters into Java code, and we report its performance when applied to a number of real-world Java programs.
dc.format.extent20 p.
dc.format.extent39929459 bytes
dc.format.extent1693357 bytes
dc.language.isoen_US
dc.titleConverting Java Programs to Use Generic Libraries


Files in this item

FilesSizeFormatView
MIT-CSAIL-TR-2004-015.pdf1.693Mbapplication/pdfView/Open
MIT-CSAIL-TR-2004-015.ps39.92Mbapplication/postscriptView/Open

This item appears in the following Collection(s)

Show simple item record