Improving Error Messages in Type System
スポンサーリンク
概要
- 論文の詳細を見る
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-09-22
著者
-
Cynthia Kustanto
Department of Computer Science, Graduate School of Systems and Information Engineering, University o
-
Yukiyoshi Kameyama
Department of Computer Science, Graduate School of Systems and Information Engineering, University o
-
Cynthia Kustanto
Department Of Computer Science Graduate School Of Systems And Information Engineering University Of
-
Yukiyoshi Kameyama
Department Of Computer Science Graduate School Of Systems And Information Engineering University Of