Skip to main content

Compositional Explanation of Types and Algorithmic Debugging of Type Errors

Chitil, Olaf (2001) Compositional Explanation of Types and Algorithmic Debugging of Type Errors. In: Proceedings of the sixth ACM SIGPLAN international conference on Functional programming. ACM, New York, USA, pp. 193-204. ISBN 1-58113-415-0. (doi:10.1145/507635.507659) (KAR id:13568)

Abstract

The type systems of most typed functional programming languages are based on the Hindley-Milner type system. A practical problem with these type systems is that it is often hard to understand why a program is not type correct or a function does not have the intended type. We suggest that at the core of this problem is the difficulty of explaining why a given expression has a certain type. The type system is not defined compositionally. We propose to explain types using a variant of the Hindley-Milner type system that defines a compositional type explanation graph of principal typings. We describe how the programmer understands types by interactive navigation through the explanation graph. Furthermore, the explanation graph can be the foundation for algorithmic debugging of type errors, that is, semi-automatic localisation of the source of a type error without even having to understand the type inference steps. We implemented a prototype of a tool to explore the usefulness of the proposed methods.

Item Type: Book section
DOI/Identification number: 10.1145/507635.507659
Uncontrolled keywords: Hindley Milner type system
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming,
Divisions: Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
Depositing User: Olaf Chitil
Date Deposited: 24 Nov 2008 17:58 UTC
Last Modified: 16 Nov 2021 09:51 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/13568 (The current URI for this page, for reference purposes)

University of Kent Author Information

  • Depositors only (login required):

Total unique views for this document in KAR since July 2020. For more details click on the image.