Converting Java programs to use generic libraries
Thesis (S.M.)--Massachusetts Institute of Technology, Dept. of Electrical Engineering and Computer Science, 2004. === Includes bibliographical references (leaves 121-127). === Java 1.5 will include a type system (called JSR-14) that supports parametric polymorphism, or generic classes. This will bri...
Main Author: | |
---|---|
Other Authors: | |
Format: | Others |
Language: | en_US |
Published: |
Massachusetts Institute of Technology
2005
|
Subjects: | |
Online Access: | http://hdl.handle.net/1721.1/28727 |
id |
ndltd-MIT-oai-dspace.mit.edu-1721.1-28727 |
---|---|
record_format |
oai_dc |
spelling |
ndltd-MIT-oai-dspace.mit.edu-1721.1-287272019-05-02T16:06:49Z Converting Java programs to use generic libraries Donovan, Alan A. A., 1976- Michael D. Ernst. Massachusetts Institute of Technology. Dept. of Electrical Engineering and Computer Science. Massachusetts Institute of Technology. Dept. of Electrical Engineering and Computer Science. Electrical Engineering and Computer Science. Thesis (S.M.)--Massachusetts Institute of Technology, Dept. of Electrical Engineering and Computer Science, 2004. Includes bibliographical references (leaves 121-127). Java 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 practise 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: parameterisation (adding type parameters to class definitions) and instantiation (adding the type arguments at each use of a parameterised class). Parameterisation 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 safely handles all features of the JSR-14 type system, notably the raw types (which provide backward compatibility) and 'unchecked' operations on them. We have implemented our analysis in a tool that automatically inserts type arguments into Java code, and we report its performance when applied to a number of real-world Java programs. by Alan A.A. Donovan. S.M. 2005-09-27T18:00:39Z 2005-09-27T18:00:39Z 2004 2004 Thesis http://hdl.handle.net/1721.1/28727 59554489 en_US M.I.T. theses are protected by copyright. They may be viewed from this source for any purpose, but reproduction or distribution in any format is prohibited without written permission. See provided URL for inquiries about permission. http://dspace.mit.edu/handle/1721.1/7582 127 leaves 6300682 bytes 6316854 bytes application/pdf application/pdf application/pdf Massachusetts Institute of Technology |
collection |
NDLTD |
language |
en_US |
format |
Others
|
sources |
NDLTD |
topic |
Electrical Engineering and Computer Science. |
spellingShingle |
Electrical Engineering and Computer Science. Donovan, Alan A. A., 1976- Converting Java programs to use generic libraries |
description |
Thesis (S.M.)--Massachusetts Institute of Technology, Dept. of Electrical Engineering and Computer Science, 2004. === Includes bibliographical references (leaves 121-127). === Java 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 practise 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: parameterisation (adding type parameters to class definitions) and instantiation (adding the type arguments at each use of a parameterised class). Parameterisation 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 safely handles all features of the JSR-14 type system, notably the raw types (which provide backward compatibility) and 'unchecked' operations on them. We have implemented our analysis in a tool that automatically inserts type arguments into Java code, and we report its performance when applied to a number of real-world Java programs. === by Alan A.A. Donovan. === S.M. |
author2 |
Michael D. Ernst. |
author_facet |
Michael D. Ernst. Donovan, Alan A. A., 1976- |
author |
Donovan, Alan A. A., 1976- |
author_sort |
Donovan, Alan A. A., 1976- |
title |
Converting Java programs to use generic libraries |
title_short |
Converting Java programs to use generic libraries |
title_full |
Converting Java programs to use generic libraries |
title_fullStr |
Converting Java programs to use generic libraries |
title_full_unstemmed |
Converting Java programs to use generic libraries |
title_sort |
converting java programs to use generic libraries |
publisher |
Massachusetts Institute of Technology |
publishDate |
2005 |
url |
http://hdl.handle.net/1721.1/28727 |
work_keys_str_mv |
AT donovanalanaa1976 convertingjavaprogramstousegenericlibraries |
_version_ |
1719034775549771776 |