Results 1 
1 of
1
Proofs about a Folklore LetPolymorphic Type Inference Algorithm
 ACM Transactions on Programming Languages and Systems
, 1998
"... The Hindley/Milner letpolymorphic type inference system has two different algorithms: one is the de facto standard Algorithm W that is bottomup (or contextinsensitive), and the other is a "folklore" algorithm that is topdown (or contextsensitive). Because the latter algorithm has not ..."
Abstract

Cited by 57 (1 self)
 Add to MetaCart
(Show Context)
The Hindley/Milner letpolymorphic type inference system has two different algorithms: one is the de facto standard Algorithm W that is bottomup (or contextinsensitive), and the other is a "folklore" algorithm that is topdown (or contextsensitive). Because the latter algorithm has not been formally presented with its soundness and completeness proofs, and its relation with the W algorithm has not been rigorously investigated, its use in place of (or in combination with) W is not well founded. In this article, we formally define the contextsensitive, topdown type inference algorithm (named "M"), prove its soundness and completeness, and show a distinguishing property that M always stops earlier than W if the input program is ill typed. Our proofs can be seen as theoretical justifications for various typechecking strategies being used in practice.