Abstract
Languages with polymorphic types (e.g. ML) have traditionally been implemented using Lisp-like data representations—everything has to fit in one word, if necessary by being heap-allocated and handled through a pointer. The reason is that, in contrast with conventional statically-typed languages such as Pascal, it is not possible to assign one unique type to each expression at compile-time, an absolute requirement for using more efficient representations (e.g. unallocated multi-word values). In this paper, we show how to take advantage of the static polymorphic typing to mix correctly two styles of data representation in the implementation of a polymorphic language: specialized, efficient representations are used when types are fully known at compile-time; uniform, Lisp-like representations are used otherwise.
Preview
Unable to display preview. Download preview PDF.
References
Luca Cardelli. The Functional Abstract Machine. Polymorphism, 1(1), 1983.
Luca Cardelli. Typeful programming. Technical Report 45, DEC Systems Research Center, 1989.
Luca Cardelli and Peter Wegner. On understanding types, data abstraction, and polymorphism. Computing surveys, 17(4), 1985.
Luis Damas and Robin Milner. Principal type-schemas for functional programs. In Proc. Symp. Principles of Programming Languages, 1982.
Jean-Yves Girard. Interprétation fonctionnelle et élimination des coupures de l'arithmétique d'ordre supérieur. Thèse d'Etat, Université Paris VII, 1972.
Brian W. Kernighan and Dennis M. Ritchie. The C programming language. Addison-Wesley, second edition 1988.
P. J. Landin. The mechanical evaluation of expressions. The Computer Journal, pages 308–320, 1964.
David C. J. Matthews. Poly manual. Technical Report 63, Computer Laboratory, University of Cambridge, 1985.
Robin Milner, Mads Tofte, and Robert Harper. The definition of Standard ML. The MIT Press, 1990.
John Peterson. Untagged data in tagged environments: choosing optimal representations at compile-time. In Functional Programming Languages and Computer Architecture, 1989.
Gordon D. Plotkin. A structural approach to operational semantics. Technical Report DAIMI FN-19, Aarhus University, 1981.
J. C. Reynolds. Toward a theory of type structure. In Colloquium on Programming, volume 19 of Lecture Notes in Computer Science. Springer-Verlag, 1974.
Author information
Authors and Affiliations
Editor information
Copyright information
© 1990 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Leroy, X. (1990). Efficient data representation in polymorphic languages. In: Deransart, P., Maluszyński, J. (eds) Programming Language Implementation and Logic Programming. PLILP 1990. Lecture Notes in Computer Science, vol 456. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0024189
Download citation
DOI: https://doi.org/10.1007/BFb0024189
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-53010-7
Online ISBN: 978-3-540-46298-9
eBook Packages: Springer Book Archive