Paper record

W1969093922

Coercion and type inference

John C. Mitchell

Year
1984
Venue
ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL)
References
14
Cited by
220

Details and counts from OpenAlex.

Abstract

A simple semantic model of automatic coercion is proposed. This model is used to explain four rules for inferring polymorphic types and providing automatic coercions between types. With the addition of a fifth rule, the rules become semantically complete but the set of types associated with an expression may be undecidable. An efficient type checking algorithm based on the first four rules is presented. The algorithm is guaranteed to find a type whenever a type can be deduced using the four inference rules. The type checking algorithm may be modified so that calls to type conversion functions are inserted at compile time.