Articles
Type Inference using Constraint Handling Rules

https://doi.org/10.1016/S1571-0661(04)80346-3Get rights and content
Under a Creative Commons license
open access

Abstract

In this paper we present an implementation of the general system for type inference algorithms HM(X), using Prolog and Constraint Handling Rules. In our implementation the difference between the general aspects of the type inference algorithms and the constraint resolution module becomes clearer, when compared to other implementations of the same systems, usually made in a functional programming language. In the constraint module, solving equality constraints, here implemented by Prolog unification, is completely separated from constraint simplification, which is made by a solver implemented in CHR for each system. CHR rules become a clear and natural way of specifying the simplification mechanism.

Cited by (0)