Finding the source of type errors
Finding the source of type errors
复制标题
查找类型错误的根源
DOI:
10.1145/512644.512648
复制
发表时间:
1986
期刊:
影响因子:
--
通讯作者:
M. Wand
中科院分区:
文献类型:
--
作者:
M. Wand
It is a truism that most bugs are detected only at a great distance from their source. Although polymorphic type-checking systems like those in ML help greatly by detecting potential run-time type errors at compile-time, such systems are still not very helpful for locating the source of a type error. Typically, an error is reported only when the type-checker can proceed no further, even though the programmer's actual error may have occurred much earlier in the text. We describe an algorithm which appears to be quite helpful in isolating and explaining the source of type errors. The algorithm works by keeping track of the <i>reasons</i> the checker makes deductions about the types of variables.