Abstract
This paper introduces a new form of type expressions which represent partial type information. These expressions are meant to capture the type information statically derivable from heterogeneous objects. The new monotypes form a lattice of subtypes and require type inference based on inclusion constraints. We discuss the existence and form of principle types under this extension and present a semi-decision procedure for the well-typing problem which can be restricted to a form that terminates for most practical programs. The partial type information derivable for heterogeneous entities is not sufficient to guarantee type-correctness for many of their uses. We therefore introduce a notion of statically generated dynamic type checks. Finally, all these elements are pulled together to sketch the derivation of a static system for "plausibility checking" which identifies the applications which may require a dynamic check and catches many type errors.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Cardelli, L. (1984), A Semantics of Multiple Inheritance, Semantics of Data Types, International Symposium, LNCS 173.
Cardelli, L. and Wegner, P. (1985), On Understanding Types, Data Abstraction and Polymorphism, Computing Surveys 17 (4).
Clement, et al (1986), A Simple Applicative Language: Mini-ML, Proceedings of 1986 ACM Conference on LISP and FP, Cambridge, Mass.
Damas, L. and Milner, R. (1982), Principle Type-schemes for Functional Programs, Proceedings of the 9th POPL, Albuquerque, NM.
Milner, R. (1978), A Theory of Type Polymorphism in Programming, JCSS 17.
Fuh, Y.-C. and Mishra, P. (1987), Type Inference with Subtypes, manuscript.
Mitchell, J. (1984), Lambda Calculus Models of Typed Programming Languages, PhD. Thesis, M.I.T.
Reynolds, J. (1985), Three Approaches to Type Structure, TAPSOFT 1985, LNCS 186.
Scott, D. (1982), Domains for Denotational Semantics, Proceedings of ICALP'82.
Wand, M. (1987), Complete Type Inference for Simple Objects, Proceedings of 1987 IEEE Symposium on Logic in Computer Science.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1988 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Thatte, S. (1988). Type inference with partial types. In: Lepistö, T., Salomaa, A. (eds) Automata, Languages and Programming. ICALP 1988. Lecture Notes in Computer Science, vol 317. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-19488-6_146
Download citation
DOI: https://doi.org/10.1007/3-540-19488-6_146
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-19488-0
Online ISBN: 978-3-540-39291-0
eBook Packages: Springer Book Archive