Information and Media Technologies
Online ISSN : 1881-0896
ISSN-L : 1881-0896
Computing
Improving Error Messages in Type System
Cynthia KustantoYukiyoshi Kameyama
著者情報
ジャーナル フリー

2010 年 5 巻 4 号 p. 1241-1254

詳細
抄録
We propose a type inference algorithm for a polymorphic type system which provides improved error messages. While the standard type inference algorithms often produce unnecessarily long or incomplete error messages, our algorithm provides relevant and complete information for type errors. It is relevant in the sense that all the program points and types in the output of our algorithm contribute to some type error, and is complete in the sense that, for each type error, our algorithm identifies not only two conflicting types, but also all types which conflict with each other. The latter property is particularly useful for debugging programs with lists or case branches. Our algorithm keeps track of the set of program points that are relevant to each type. To achieve completeness, we introduce a new type variable which represents a conflict among two or more incompatible types, and extend the unification algorithm to handle the special type variable appropriately. Finally, we argue that our algorithm is more efficient than those in the literature when there are more than two conflicting types in the given expression.
著者関連情報
© 2010 Information Processing Society of Japan
前の記事 次の記事
feedback
Top