Type inference with subtypes
Ryan D. Stansifer · ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL) · 1988
We give an algorithm for type inference in a language with functions, records, and variant records. A similar language was studied by Cardelli who gave a type checking algorithm. This language is interesting because it captures aspects of object-oriented programming using subtype polymorphism. We give a type system for deriving types of expressions in the language and prove the type inference algorithm is sound, i.e., it returns a type derivable from the proof system. We also prove that the type the algorithm finds is a “principal” type, i.e., one which characterizes all others. The approach taken here is due to Milner for universal polymorphism. The result is a synthesis of subtype polymorphism and universal polymorphism.
Cited by 52 works. doi:10.1145/73560.73568
Authors
References
- A theory of type polymorphism in programming
- Principal type-schemes for functional programs
- The principle type-scheme of an object in combinatory logic
- Login: a logic programming language with built-in inheritance
- A semantics of multiple inheritance
- Coercion and type inference
- Complete Type Inference for Simple Objects
- Basic polymorphic typechecking
- Partial polymorphic type inference is undecidable
- Implementing RUSSELL