Abstract
We formulate and experiment with type-based primitives (such as fold and unfold operations) for out-of-core processing of functional data structures. We follow the view that recursive data types are fixed points of polynomial type constructors. This view leads to a clear separation of the semantics and the implementations of recursive data types. We provide monadic implementations of the type-based primitives so that the intermediate data structures used for the executions of the primitives can be placed in out-of-core storage. The parametric module facility of Objective Caml is further used to package the out-of-core implementations. The resulting out-of-core user code retains the same program structure of the in-core user code and can be as elegant.
This research is supported, in part, by National Science Council of Taiwan under contract NSC 89-2213-E-001-005.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
The caml language. Web site at caml.inria.fr.
Roland Backhouse, Patrick Jansson, Johan Jeuring, and Lambert Meertens. Generic programming: An introduction. In Advanced Functional Programming, pages 28–115, 1999. Lecture Notes in Computer Science, Vol. 1608, Springer-Verlag.
Richard Bird and Oege de Moor. Algebra of Programming. Prentice Hall, 1997.
Chih-Ping Chen and Paul Hudak. Rolling your own mutable ADT: A connection between linear types and monads. In The 24th Symposium on Principles of Programming Languages, pages 54–66. ACM Press, January 1997.
David A. Espinosa. Semantic Lego. PhD thesis, Graduate School of Arts and Sciences, Columbia University, 1995.
Maarten Fokkinga. Monadic maps and folds for arbitrary datatypes. In Memoranda Informatica, pages 94–28. University of Twente, June 1994.
Patrick Jansson and Johan Jeuring. Polyp: A polytypic programming language extension. In The 24th Symposium on Principles of Programming Languages, pages 470–482. ACM Press, January 1997.
Patrick Jansson and Johan Jeuring. Polytypic compact printing and parsing. In European Symposium on Programming, pages 324–333, 1999. Lecture Notes in Computer Science, Vol. 1576, Springer-Verlag.
Sheng Liang, Paul Hudak, and Mark Jones. Monad transformers and modular interpreters. In The 22nd Symposium on Principles of Programming Languages, pages 333–343. ACM Press, 1995.
Erik Meijer, Maarten Fokkinga, and Ross Paterson. Functional programming with bananas, lenses, envelopes and bared wire. In Functional Programming Languages and Computer Architecture, pages 124–144, August 1991. Lecture Notes in Computer Science, Vol. 523, Springer-Verlag.
Erik Meijer and Johan Jeuring. Merging monads and folds for functional programming. In Advanced Functional Programming, pages 228–266, May 1995. Lecture Notes in Computer Science, Vol. 925, Springer-Verlag.
Robert Endre Tarjan. Data Structures and Network Algorithms. Society for Industrial and Applied Mathematics, 1983.
Philip Wadler. Monads for functional programming. In Advanced Functional Programming, pages 24–52, May 1995. Lecture Notes in Computer Science, Vol. 925, Springer-Verlag.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Chuang, TR., Mu, SC. (1999). Out-of-Core Functional Programming with Type-Based Primitives. In: Pontelli, E., Santos Costa, V. (eds) Practical Aspects of Declarative Languages. PADL 2000. Lecture Notes in Computer Science, vol 1753. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-46584-7_3
Download citation
DOI: https://doi.org/10.1007/3-540-46584-7_3
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66992-0
Online ISBN: 978-3-540-46584-3
eBook Packages: Springer Book Archive