Improving Error Messages in Type System

DOI
  • Kustanto Cynthia
    Department of Computer Science, Graduate School of Systems and Information Engineering, University of Tsukuba
  • Kameyama Yukiyoshi
    Department of Computer Science, Graduate School of Systems and Information Engineering, University of Tsukuba

抄録

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.

収録刊行物

詳細情報 詳細情報について

  • CRID
    1390001205263666816
  • NII論文ID
    130000418484
  • DOI
    10.11185/imt.5.1241
  • ISSN
    18810896
  • 本文言語コード
    en
  • データソース種別
    • JaLC
    • CiNii Articles
  • 抄録ライセンスフラグ
    使用不可

問題の指摘

ページトップへ