ACM Transactions on Programming Languages and Systems · 1998 · 115 citations · 9 references
ComputingComputer ScienceAlgorithmsFormal MethodsTheory Of ComputationDeductive ReasoningDeductive VerificationTheorem ProvingType CheckingType SystemsCompletenessData Type InferenceDatatypes TheoryPolymorphic Type SystemsPolymorphic TypesType InferenceType Theory
The Hindley/Milner let-polymorphic type inference system has two different algorithms: one is the de facto standard Algorithm 𝒲 that is bottom-up (or context-insensitive), and the other is a “folklore” algorithm that is top-down (or context-sensitive). Because the latter algorithm has not been formally presented with its soundness and completeness proofs, and its relation with the 𝒲 algorithm has not been rigorously investigated, its use in place of (or in combination with) 𝒲 is not well founded. In this article, we formally define the context-sensitive, top-down type inference algorithm (named “M”), prove its soundness and completeness, and show a distinguishing property that M always stops earlier than 𝒲 if the input program is ill typed. Our proofs can be seen as theoretical justifications for various type-checking strategies being used in practice.
9
A theory of type polymorphism in programming
Robin Milner · Journal of Computer and System Sciences · 1978 · 2.2K citations · Full text
Principal type-schemes for functional programs
Robin Milner · 1982 · 1.1K citations
Benjamin C. Pierce, David N. Turner · 1998 · 155 citations
Computing, Computer Science, Natural Language Processing +16
Finding the source of type errors
Mitchell Wand · 1986 · 135 citations