Finding the source of type errors

  • Authors:
  • Mitchell Wand

  • Affiliations:
  • -

  • Venue:
  • POPL '86 Proceedings of the 13th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
  • Year:
  • 1986

Quantified Score

Hi-index 0.00

Visualization

Abstract

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 reasons the checker makes deductions about the types of variables.