Designing type inference for typed object-oriented languages

Type-checked object-oriented languages have typically been designed with extremely simple type systems. However, there has recently been intense interest in extending such languages with more sophisticated types and subtyping relationships. JAVA and C# are mainstream languages that have been success...

Full description

Bibliographic Details
Other Authors: Cartwright, Robert
Format: Others
Language:English
Published: 2011
Subjects:
Online Access:http://hdl.handle.net/1911/62026
id ndltd-RICE-oai-scholarship.rice.edu-1911-62026
record_format oai_dc
spelling ndltd-RICE-oai-scholarship.rice.edu-1911-620262013-05-01T03:46:37ZDesigning type inference for typed object-oriented languagesComputer ScienceType-checked object-oriented languages have typically been designed with extremely simple type systems. However, there has recently been intense interest in extending such languages with more sophisticated types and subtyping relationships. JAVA and C# are mainstream languages that have been successfully extended with generic classes and methods; SCALA, FORTRESS, and X10 are new languages that adopt more advanced typing features, such as arrows, tuples, unions, intersections, dependent types, and existentials. Presently, the type inference performed by these languages is unstable and evolving. This thesis explores problems arising in the design of a type inference specification for such languages. We first present a formal description of subtyping in the context of a variety of advanced typing features. We then demonstrate how our formal subtyping algorithm can be easily re-expressed to produce a type inference algorithm, and observe that this algorithm is general enough to address a variety of important type-checking problems. Finally, we apply this theory to a case study of the JAVA language's type system. We express JAVA'S types and inference algorithm in terms of our formal theory and note a variety of opportunities for improvement. We then describe the results of applying an improved type inference implementation to a selection of existing JAVA code, noting that, without introducing significant backwards-incompatibility problems for these programs, we've managed to significantly reduce the need for annotated method invocations.Cartwright, Robert2011-07-25T02:05:26Z2011-07-25T02:05:26Z2010ThesisTextapplication/pdfhttp://hdl.handle.net/1911/62026eng
collection NDLTD
language English
format Others
sources NDLTD
topic Computer Science
spellingShingle Computer Science
Designing type inference for typed object-oriented languages
description Type-checked object-oriented languages have typically been designed with extremely simple type systems. However, there has recently been intense interest in extending such languages with more sophisticated types and subtyping relationships. JAVA and C# are mainstream languages that have been successfully extended with generic classes and methods; SCALA, FORTRESS, and X10 are new languages that adopt more advanced typing features, such as arrows, tuples, unions, intersections, dependent types, and existentials. Presently, the type inference performed by these languages is unstable and evolving. This thesis explores problems arising in the design of a type inference specification for such languages. We first present a formal description of subtyping in the context of a variety of advanced typing features. We then demonstrate how our formal subtyping algorithm can be easily re-expressed to produce a type inference algorithm, and observe that this algorithm is general enough to address a variety of important type-checking problems. Finally, we apply this theory to a case study of the JAVA language's type system. We express JAVA'S types and inference algorithm in terms of our formal theory and note a variety of opportunities for improvement. We then describe the results of applying an improved type inference implementation to a selection of existing JAVA code, noting that, without introducing significant backwards-incompatibility problems for these programs, we've managed to significantly reduce the need for annotated method invocations.
author2 Cartwright, Robert
author_facet Cartwright, Robert
title Designing type inference for typed object-oriented languages
title_short Designing type inference for typed object-oriented languages
title_full Designing type inference for typed object-oriented languages
title_fullStr Designing type inference for typed object-oriented languages
title_full_unstemmed Designing type inference for typed object-oriented languages
title_sort designing type inference for typed object-oriented languages
publishDate 2011
url http://hdl.handle.net/1911/62026
_version_ 1716584850768527360