Skip to main content

Efficient data representation in polymorphic languages

  • Functional Programming
  • Conference paper
  • First Online:
Programming Language Implementation and Logic Programming (PLILP 1990)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 456))

  • 178 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Luca Cardelli. The Functional Abstract Machine. Polymorphism, 1(1), 1983.

    Google Scholar 

  2. Luca Cardelli. Typeful programming. Technical Report 45, DEC Systems Research Center, 1989.

    Google Scholar 

  3. Luca Cardelli and Peter Wegner. On understanding types, data abstraction, and polymorphism. Computing surveys, 17(4), 1985.

    Google Scholar 

  4. Luis Damas and Robin Milner. Principal type-schemas for functional programs. In Proc. Symp. Principles of Programming Languages, 1982.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. Brian W. Kernighan and Dennis M. Ritchie. The C programming language. Addison-Wesley, second edition 1988.

    Google Scholar 

  7. P. J. Landin. The mechanical evaluation of expressions. The Computer Journal, pages 308–320, 1964.

    Google Scholar 

  8. David C. J. Matthews. Poly manual. Technical Report 63, Computer Laboratory, University of Cambridge, 1985.

    Google Scholar 

  9. Robin Milner, Mads Tofte, and Robert Harper. The definition of Standard ML. The MIT Press, 1990.

    Google Scholar 

  10. John Peterson. Untagged data in tagged environments: choosing optimal representations at compile-time. In Functional Programming Languages and Computer Architecture, 1989.

    Google Scholar 

  11. Gordon D. Plotkin. A structural approach to operational semantics. Technical Report DAIMI FN-19, Aarhus University, 1981.

    Google Scholar 

  12. J. C. Reynolds. Toward a theory of type structure. In Colloquium on Programming, volume 19 of Lecture Notes in Computer Science. Springer-Verlag, 1974.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Pierre Deransart Jan Maluszyński

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

Publish with us

Policies and ethics