Abstract
Union, intersection and recursive types are type constructions which make it possible to formulate very precise types. However, because of type checking difficulties related to the simultaneous use of these constructions, they have only found little use in programming languages. One of the problems is subtyping. We show how the subtype decision problem may be solved by an encoding into regular tree expressions, and prove soundness and completeness with respect to the classical ideal model for types [MPS86].
As a part of the work we show how the structure of values may be described by trees, and how the metric space of ideals may be related to a metric space of sets of trees. The proof techniques applied here may be of independent interest.
Preview
Unable to display preview. Download preview PDF.
References
Roberto M. Amadio and Luca Cardelli. Subtyping recursive types. In Conference Record of the Eighteenth Annual ACM Symposium on Principles of Programming Languages (POPL'91), pages 104–118, ACM Press, 1991. Extended abstract. Full version in [AC92].
Roberto M. Amadio and Luca Cardelli. Subtyping Recursive Types. Technical Report 133, INRIA, Institut National de Recherche en Informatique et en Automatique, Lorraine, February 1992.
Alexander Aiken and Brian M. Murphy. Implementing regular tree expressions. In J. Hughes, editor, Proceedings of the 5th A CM Conference on Functional Programming Languages and Computer Architecture (FPCA '91), Cambridge, MA, USA, August 1991, volume 523 of Lecture Notes in Computer Science, pages 427–447, Springer-Verlag, 1991.
Alexander Aiken and Brian M. Murphy. Static type inference in a dynamically typed language. In Conference Record of the Eighteenth Annual ACM Symposium on Principles of Programming Languages (POPL '91), pages 279–290, ACM Press, 1991.
Alexander Aiken and Edward L. Wimmers. Solving systems of set constraints (extended abstract). In Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science (LICS'92), Santa Cruz, California, June 1992, pages 329–340, IEEE Computer Society, IEEE Computer Society Press, 1992.
Alexander Aiken and Edward L. Wimmers. Type inclusion constraints and type inference. In Proceedings of the 6th ACM Conference on Functional Programming Languages and Computer Architecture (FPCA '93), Copenhagen, Denmark, June 1993, pages 31–41, ACM Press, 1993.
Robert Cartwright and Mike Fagan. Soft typing. In Proceedings of the ACM SIGPLAN'91 Conference on Programming Language Design and Implementation (PLDI'91), pages 278–292, ACM Press, 1991.
Luca Cardelli and Peter Wegner. On understanding types, data abstraction, and polymorphism. Computing Surveys, 17(4):471–522, 1985.
Flemming M. Damm. Subtyping with Union Types, Intersection Types and Recursive Types. Technical Report, Department of Computer Science, The Technical University of Denmark, 1994. Forthcoming.
Tim Freeman and Frank Pfenning. Refinement types for ML. In Proceedings of the ACM SIGPLAN'91 Conference on Programming Language Design and Implementation (PLDI'91), pages 268–277, ACM Press, 1991.
Ferenc Gécseg and Magnus Steinby. Tree Automata. Akadémiai Kiadó, Budapest, 1984.
R. Gilleron, S. Tison, and M. Tommasi. Solving systems of set constraints with negated subset relationships. In Proceedings of the 34th Annuel Symposium on Foundations of Computer Science (FOCS'93), pages 372–380, IEEE Computer Society, IEEE Computer Society Press, 1993.
David MacQueen, Gordon Plotkin, and Ravi Sethi. An ideal model for recursive polymorphic types. Information and Control, 71:95–130, 1986.
Prateek Mishra and Uday S. Reddy. Declaration-free type checking. In Conference Record of the Twelfth Annual ACM Symposium on Principles of Programming Languages (POPL'85), pages 7–21, 1985.
Benjamin C. Pierce. Programming with Intersection Types, Union Types and Polymorphism. Technical Report CMU-CS-91-106, Carnegie Mellon University, 1991.
W.A. Sutherland. Introduction to metric and topological spaces. Oxford University Press, 1975.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Damm, F.M. (1994). Subtyping with union types, intersection types and recursive types. In: Hagiya, M., Mitchell, J.C. (eds) Theoretical Aspects of Computer Software. TACS 1994. Lecture Notes in Computer Science, vol 789. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-57887-0_121
Download citation
DOI: https://doi.org/10.1007/3-540-57887-0_121
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-57887-1
Online ISBN: 978-3-540-48383-0
eBook Packages: Springer Book Archive