MIT Libraries logoDSpace@MIT

MIT
View Item 
  • DSpace@MIT Home
  • Computer Science and Artificial Intelligence Lab (CSAIL)
  • LCS Publications
  • LCS Technical Reports (1974 - 2003)
  • View Item
  • DSpace@MIT Home
  • Computer Science and Artificial Intelligence Lab (CSAIL)
  • LCS Publications
  • LCS Technical Reports (1974 - 2003)
  • View Item
JavaScript is disabled for your browser. Some features of this site may not work without it.

Inference of Generic Types in Java

Author(s)
Donovan, Alan; Ernst, Michael D.
Thumbnail
DownloadMIT-LCS-TR-889.pdf (347.1Kb)
Metadata
Show full item record
Abstract
Future versions of Java will include support for parametric polymorphism, or generic classes. This will bring many benefits to Java programmers, not least because current Java practise makes heavy use of pseudo-generic classes. Such classes (for example, those in package java.util) have logically generic specifications and documentation, but the type system cannot prove their patterns of use to be safe. This work aims to solve the problem of automatic translation of Java source code into Generic Java (GJ) source code. We present two algorithms that together can be used to translate automatically a Java source program into a semantically-equivalent GJ program with generic types. The first algorithm infers a candidate generalisation for any class, based on the methods of that class in isolation. The second algorithm analyses the whole program; it determines a precise parametric type for every value in the program. Optionally, it also refines the generalisations produced by the first analysis as required by the patterns of use of those classes in client code.
Date issued
2003-03
URI
https://hdl.handle.net/1721.1/149981
Series/Report no.
MIT-LCS-TR-889

Collections
  • LCS Technical Reports (1974 - 2003)

Browse

All of DSpaceCommunities & CollectionsBy Issue DateAuthorsTitlesSubjectsThis CollectionBy Issue DateAuthorsTitlesSubjects

My Account

Login

Statistics

OA StatisticsStatistics by CountryStatistics by Department
MIT Libraries
PrivacyPermissionsAccessibilityContact us
MIT
Content created by the MIT Libraries, CC BY-NC unless otherwise noted. Notify us about copyright concerns.