Publisher
The University of Arizona.Rights
Copyright © is held by the author. Digital access to this material is made possible by the University Libraries, University of Arizona. Further transmission, reproduction or presentation (such as public display or performance) of protected items is prohibited except with permission of the author.Abstract
The purpose of this paper is to familiarize a beginner with the field of type inference. By the end, the reader should be comfortable with common concepts in type inference and understand how to implement it. The paper introduces types and the lambda calculus as preliminary concepts that are important to understand when reading papers in the field. It walks through a simple example to build the reader’s intuition for type inference and motivate further discussion. Then, it delves into the unification process, which appears when solving the type equations that are generated according to typing rules. This paper focuses specifically on type inference for the Hindley-Milner type system, which is readily applied to functional programming languages. Hindley-Milner typing provides parametric polymorphism and guarantees that code is well-typed. The limitations and potential extensions to Hindley-Milner typing are examined by considering the ideas contributed by various papers in the field. Use of type inference in real-world programming languages is explored to show its practical applications and how it can benefit programmers. My implementation of unification and type inference algorithms discussed can be found at https://github.com/gavinvogt/type-inference-survey.Type
Electronic thesistext
Degree Name
B.S.Degree Level
bachelorsDegree Program
Computer ScienceHonors College