Abstract
We discuss polymorphism, overloading and coercions. A simple applicative language with these features and the data type constructors function, record, list and sum are defined. Then we introduce a formal system of deduction. It is used to fix the notion of type inference. Certain properties of the system, which are caused by the intention to base an efficient typing algorithm on it, are discussed. These properties, which are merely restrictions, then lead to considerable simplifications of the deduction system. Finally we define an algorithm which, given a term, computes a set of types for this term. This set of types is the smallest one containing a representative of every legal type t of a term, where t represents t` if t is a subtype of t`.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
L. Oamas, R. Milner Principal Type-Schemes for Functional Languages Proc. 9th Annual Principles of Programming Languages Symposium (POPL) 1982 pp. 207–212
M. Coppo, M. Deziani-Ciancaglini, B. Venneri Functional Characters of Solvable Terms Zeitschr. f. mathem. Logik und Gründl, der Mathematik 27, pp 45–58 (1981)
W. Henhapl, G. Snelting Context Relations - A Concept for Incremental Context Analysis in Program Fragments these proceedings
T. Letschert Type Inference in the Presence of Polymorphism, Overloading and Coercions Part I TH Darmstadt, FB Informatik, Report PU1R7-83 (1983) Part II in preparation
D.B. McQueen, R. Sethi A Semantic Model of Types for Applicative Languages ACM Symp. on Lisp and Functional Programming 1982 pp 243–252
R. Milner A Theory of Type Polymorphism in Programming Languages. Journal of Comp, and System Science 17 pp 348–375 (1978)
J.C. Reynolds Using Category Theory to Design Implicit Conversions and Generic Operators Lecture Notes in Computer Science 94, pp 211–258 (1980)
J.C. Reynolds The Essence of Algol in: International Symposium on Algorithmic Languages edited by deBakker and vanVliet, North-Holland Pub. Comp. (1981), pp 245–372
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1984 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Letschert, T. (1984). Type Inference in the Presence of Overloading, Polymorphism and Coercions. In: Ammann, U. (eds) Programmiersprachen und Programmentwicklung. Informatik-Fachberichte, vol 77. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-69393-9_4
Download citation
DOI: https://doi.org/10.1007/978-3-642-69393-9_4
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-12905-9
Online ISBN: 978-3-642-69393-9
eBook Packages: Springer Book Archive