|
ABSTRACT
We present a new way to generate type-error messages in a polymorphic, implicitly, and strongly typed language (specifically Caml). Our method separates error-message generation from type-checking by taking a fundamentally new approach: we present to programmers small term-level modifications that cause an ill-typed program to become well-typed. This approach aims to improve feedback to programmers with no change to the underlying type-checker nor the compilation of well-typed programs.We have added a prototype implementation of our approach to the Objective Caml system by intercepting type-checker error messages and using the type-checker on candidate changes to see if they succeed. This novel front-end architecture naturally decomposes into (1) enumerating local changes to the abstract syntax tree that may remove type errors, (2) searching for places to try the changes, (3) using the type-checker to evaluate the changes, and (4) ranking the changes and presenting them to the user.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
David T. Barnard, Gwen Clarke, and Nicolas Duncan. Tree-to-tree correction for document trees. Technical Report 95--372, Department of Computing and Information Science, Queen's University, Kingston, January 1995.
|
 |
2
|
|
| |
3
|
Karen Bernstein and Eugene Stark. Debugging type errors (full version). Technical report, State University of New York at Stony Brook, 1995.
|
| |
4
|
Philip Bille. Tree edit distance, alignment distance and inclusion. Technical report, IT University of Copenhagen, April 2003.
|
| |
5
|
Olaf Chitil, Frank Huch, and Axel Simon. Typeview: a tool for understanding type errors. In M. Mohnen and P. Koopman, editors, 12th International Workshop on Implementation of Functional Languages, Aachner Informatik-Berichte, pages 63--69, 2000.
|
| |
6
|
V. Choppella and C. T. Haynes. Diagnosis of ill-typed programs. Technical Report 426, Indiana University, December 1994.
|
| |
7
|
Dominic Duggan. Correct type explanation. In ACM Workshop on ML, pages 49--58, 1998.
|
| |
8
|
|
| |
9
|
|
| |
10
|
|
| |
11
|
Bastiaan J. Heeren. Top Quality Type Error Messages. PhD thesis, Universiteit Utrecht, The Netherlands, September 2005.
|
 |
12
|
|
| |
13
|
Yang Jun, Greg Michaelson, and Phil Trinder. Explaining polymorphic types. The Computer Journal, 45(4):436--452, 2002.
|
 |
14
|
|
| |
15
|
Bruce J. McAdam. On the unification of substitutions in type inference. In Kevin Hammond, Anthony J.T. Davie, and Chris Clack, editors, Implementation of Functional Languages (IFL~'98), volume 1595 of LNCS, pages 139--154. Springer-Verlag, September 1998.
|
| |
16
|
Bruce J. McAdam. Repairing Type Errors in Functional Programs. PhD thesis, Laboratory for Foundatations of Computer Science, The University of Edinburgh, 2001.
|
| |
17
|
|
 |
18
|
|
 |
19
|
|
 |
20
|
|
 |
21
|
|
|