Heuristics For Type Error Discovery And Recovery In Helium
Stc
Date: 2006-11-02
Time: 11:45
Room: BBL room 471
Title: Heuristics for type error discovery and recovery in Helium
Abstract
Type error messages that are reported for incorrect functional programs can
be difficult to understand. The reason for this is that most type inference
algorithms proceed in a mechanical, syntax-directed way, and are unaware of
inference techniques used by experts to explain type inconsistencies. We
formulate type inference as a constraint problem, and analyze the collected
constraints to improve the error messages (and, as a result, programming
efficiency).
A special data structure, the type graph, is used to detect global
properties of a program, and furthermore enables us to uniformly implement
a large collection of heuristics which try to discover which is the most
likely constraint to cause the type inconsistency. Some of these heuristics
even suggest corrections to the programmer.
Our work has been fully implemented in Helium and has been used for a
number of years in the FP programming course. We give some statistics
derived from programs logged by the Helium compiler that give some insight
into the effects of using heuristics.