Corpus ID: 10557242

Generalizing Hindley-Milner Type Inference Algorithms

@inproceedings{Heeren2002GeneralizingHT,
  title={Generalizing Hindley-Milner Type Inference Algorithms},
  author={Bastiaan Heeren and Jurriaan Hage and S. Doaitse Swierstra},
  year={2002}
}
Type inferencing according to the standard algorithms W and M often yields uninformative error messages. Many times, this is a consequence of a bias inherent in the algorithms. The method developed here is to first collect constraints from the program, and to solve these afterwards, possibly under the influence of a heuristic. We show the soundness and completeness of our algorithm. The algorithms W and M turn out to be deterministic instances of our method, giving the correctness for W and M… Expand
Type Processing by Constraint Reasoning
TLDR
This paper considers typing problems as constraint problems and shows which constraint algorithms are required to support various typing questions and uses a light weight constraint reasoning formalism, Constraint Handling Rules, to generate suitable algorithms for many popular extensions to Hindley/Milner types. Expand
Scripting the type inference process
TLDR
It is shown how four techniques which influence the behaviour of constraint-based type inference processes can help to generate error messages which are conceptually closer to the domain for which the library was developed. Expand
Constraint Based Type Inferencing in Helium
The Helium compiler implements a significant subset of the functional programming language Haskell. One of the major motivations for developing it was to yield understandable and appropriate typeExpand
Type inference and optimisation for an impure world
TLDR
It is argued that it is more important for a compiler to be able to reason about the behaviour of a program, than for the language to be purely functional in a formal sense. Expand
Parametric Type Inferencing for Helium
TLDR
This paper documents the implementation of the Helium type inferencer, a compiler for a large subset of Haskell under development at Universiteit Utrecht, which can be parameterized in a number of ways. Expand
Untangling Type Inference and Scope Analysis *
Many modern functional programming languages support record types, parametric polymorphism and type inference. Allowing the same field name for two different records causes a problem in theseExpand
Really Natural Linear Indexed Type Checking
TLDR
It is shown how to reduce type checking for (a simple extension of) DFuzz to constraint solving over a first-order theory of naturals and real numbers which, although undecidable, can often be handled in practice by standard numeric solvers. Expand
Interactive type debugging in Haskell
TLDR
This paper illustrates the facilities for type debugging of Haskell programs in the Chameleon programming environment with reasoning about constraint satisfiability and implication to find minimal justifications of type errors, and to explain unexpected types that arise. Expand
Uniqueness Typing Redefined
TLDR
The type system of Clean is modified to allow for higher-rank types and to explicitly associate type constraints (attribute inequalities) with type schemes. Expand
Explaining ML Type Errors by Data Flows
We present a novel approach to explaining ML type errors: Since the type system inhibits data flows that would abort the program at run-time, our type checker identifies as explanations those dataExpand
...
1
2
3
...

References

SHOWING 1-10 OF 21 REFERENCES
On the unification of substitutions in type inference
TLDR
A new operation is introduced which allows greater control over the use of substitutions so that this bias can be removed in type inference algorithms so that clearer error messages may then be produced. Expand
A Generalization of Hybrid Let-Polymorphic Type Inference Algorithms
We present a generalized let-polymorphic type inference algorithm, prove that any of its instances is sound and complete with respect to the Hindley/Milner let-polymorphic type system, and find aExpand
Explaining Type Inference
TLDR
A modification of the unification algorithm used in Hindley-Milner type inference is presented, which allows the specific reasoning which led to a program variable having a particular type to be recorded for type explanation. Expand
Hindley/Milner style type systems in constraint form
TLDR
This papers presents a purely constraint{based formulation of Hindley/Milner style type systems which enjoys much nicer logical properties than previous approaches and presents a solution to the open problem of type inference in non-regular theories. Expand
Correcting Errors in the Curry System
TLDR
An interesting correspondence between the automaton constructed in Cox's method and a graphical representation of the term called sharing graphs is found, which allows us to read back a term from the maximal consistent subset of this set. Expand
A Theory of Type Polymorphism in Programming
  • R. Milner
  • Computer Science
  • J. Comput. Syst. Sci.
  • 1978
TLDR
This work presents a formal type discipline for polymorphic procedures in the context of a simple programming language, and a compile time type-checking algorithm w which enforces the discipline. Expand
Proofs about a folklore let-polymorphic type inference algorithm
TLDR
This article formally defines the context-sensitive, top-down type inference algorithm “<inline-equation>”, proves its soundness and completeness, and shows a distinguishing property that it always stops earlier than <inline-Equation> <f><sc>M</sc></f></inline- equation> if the input program is ill typed. Expand
Debugging Type Errors (Full version)
TLDR
It is argued that an extended type definition, which assigns types to open expressions as well as closed expressions, can serve as the basis for a programming environment that helps programmers debug type errors. Expand
A maximum-flow approach to anomaly isolation in unification-based incremental type inference
TLDR
A language-based editor for a variant of ML that uses a novel approach to the isolation of likely causes of user errors that permits a new level of quality in the process of helping users when inputs are, for one reason or another, invalid. Expand
Explaining type errors in polymorphic languages
TLDR
This paper describes an approach that maintains the deductive steps of type inference and the reasons for type instantiations that could be used in an interactive system to guide the programmer to the source of a type error or to explain why the compiler assigned a particular type to an expression. Expand
...
1
2
3
...