1998 · 19 citations · 23 references
ComputingComputer ScienceAlgorithmsProgramming LanguagesTheory Of ComputationAbstract InterpretationConstraint SatisfactionData TypesType CheckingType SystemsCompletenessData Type InferencePolymorphic Type SystemsPolymorphic TypesPolymorphism StudiesSubtypingType InferenceType Polymorphism
We present a subtyping extension to the Hindley/Milner type system that is based on name inequivalence. This approach allows the subtype relation to be defined by incremental construction of polymorphic records and datatypes, in a way that subsumes the basic type systems of both languages like ML and Java. As the main contribution of the paper, we describe a partial type inference algorithm for the extended system which favours succinctness over generality, in the sense that it never infers types with subtype constraints. The algorithm is based on an efficient approximating constraint solver, and is able to type a wide range of programs that utilize subtyping and polymorphism in a non-trivial way. Since constrained types are not inferred, the algorithm cannot be complete; however, we provide a completeness result w.r.t. the Hindley/Milner type system as a form of characterizing lower bound.
23
A theory of type polymorphism in programming
Robin Milner · Journal of Computer and System Sciences · 1978 · 2.2K citations · Full text
Type inclusion constraints and type inference
Alex Aiken, Edward L. Wimmers · 1993 · 260 citations
John C. Mitchell · 1984 · 206 citations · Full text
Benjamin C. Pierce, David N. Turner · 1998 · 155 citations
Computing, Computer Science, Natural Language Processing +16