To the top

Page Manager: Webmaster
Last update: 9/11/2012 3:13 PM

Tell a friend about this page
Print version

Subtypes in Polymorphic F… - University of Gothenburg, Sweden Till startsida
Sitemap
To content Read more about how we use cookies on gu.se

Subtypes in Polymorphic Functional Languages

Licentiate thesis
Authors Thomas Hallgren
Date of public defense 1993-02-01
ISBN 91-7032-791-2
Publication year 2013
Published at Department of Computer Science and Engineering (GU)
Language en
Links www.cse.chalmers.se/~hallgren/lic-a...
Keywords type systems, polymorphism, subtypes, functional languages, ML, type inference
Subject categories Computer science

Abstract

This thesis is about type systems, and in particular type systems that extend or are otherwise close to the type system used in the functional language ML. ML meant a big step forward for type systems used in practical programming languages. Two main novelties with the ML type system, as compared to for example Pascal, are polymorphism and automatic type inference. Another important feature of ML is the powerful data type declarations and the associated pattern matching mechanism. The thesis consists of two interleaved parts: an overview of various type systems relating to ML (part A), and a presentation of a new extension of ML with subtypes (part B). The overview part covers, in varying detail, concepts like polymorphism, universally quantified types, existentially quantified types, conjunction types, different forms of subtyping, bounded quantification, type classes in Haskell and automatic type inference. The purpose of the extension of ML presented in part B is to provide the subtype relations available for variant types in the language Fun (described by L. Cardelli and P. Wegner) through new kinds of type declarations. These declarations allows the programmer to define subtypes or supertypes by removing or adding constructors from an existing type. It is also possible to form the union of previously defined data types. To implement the extension of ML, we examine some existing type systems that have the key ingredients needed: polymorphism, subtypes and automatic type inference. We choose to work with Fuh & Mishra's type system with constraint sets. This type system is not the ideal solution for the kind of subtypes provided by our extension. To be able to use Fuh & Mishra's type inference algorithm we make some restrictions to our extension. The type inference algorithm is extended to handle pattern matching. Keywords: type systems, polymorphism, subtypes, functional languages, ML, type inference

Page Manager: Webmaster|Last update: 9/11/2012
Share:

The University of Gothenburg uses cookies to provide you with the best possible user experience. By continuing on this website, you approve of our use of cookies.  What are cookies?