Advertisement

First class file I/O

  • Marco Pil
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1268)

Abstract

In most functional languages little attention has been paid to file I/O. The file system is poorly typed at best and some classes of objects, in particular functions, cannot be stored on disk at all. In this article we present a mature type system for typing files. We also discuss briefly how we plan to implement the storage of functions in files. We make use of the concept of dynamic types, as introduced in Abadi et al., which provide an interface between statically and dynamically typed parts of a program. We have modified the concept of dynamic types to include polymorphic types in a natural way and we are implementing this modified system of dynamic types in the functional language Clean. We have developed a simple run-time matching algorithm for the dynamic type checks. We present some of the problems we encountered when the system of dynamic types is implemented to its full extent in a language that already has an elaborate type system. Finally we show that the same concepts that we used for constructing the file system can be used for communication between independently running programs in general.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [ACP89]
    M. Abadi, L. Cardelli, B. Pierce, G. Plotkin. Dynamic typing in a statically typed language, ACM Transactions on Programming Languages and Systems 13(2):237–268, 1991.Google Scholar
  2. [ACP91]
    M. Abadi, L. Cardelli, B. Pierce, D. Rémy. Dynamic typing in polymorphic languages, In: Journal of Functional Programming 5(1):111–130, Cambridge University Press 1995.Google Scholar
  3. [BS93]
    E. Barendsen and J. Smetsers. Uniqueness Typing for Functional Languages with Graph Rewriting Semantics, to appear in MSCS.Google Scholar
  4. [CBC90]
    R. Connor, A.Brown, Q Cutts, A. Dearie, R. Morrison and J. Rosenberg. Type Equivalence Checking in Persistent Object Systems, In: Implementing Persistent Object Bases pp.151–164, Morgan Kaufman 1990Google Scholar
  5. [PE93]
    M. van Eekelen, M. Plasmeijer. Functional Programming and Parallel Graph Rewriting, Addison-Wesley 1993.Google Scholar
  6. [PE97]
    M. van Eekelen, M. Plasmeijer. Concurrent Clean 1.0 language report, Computing Science Institute, University of Nijmegen, http://www.cs.kun.nl/~clean/Clean.Cleanbook.html.Google Scholar
  7. [LM93]
    X. Leroy, M. Mauny. Dynamics in ML, In: Journal of Functional Programming 3(4), Cambridge University Press 1995.Google Scholar
  8. [MBC89]
    R. Morrison, A.Brown, R. Carrick, R. Connor, A. Dearie, and M. Atkinson. The Napier Type System, In: Persistent Object Systems pp.3–18, Springer-Verlag 1989.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1997

Authors and Affiliations

  • Marco Pil
    • 1
  1. 1.Computing Science InstituteUniversity of NijmegenNijmegenThe Netherlands

Personalised recommendations