Hostname: page-component-76fb5796d-qxdb6 Total loading time: 0 Render date: 2024-04-26T05:06:29.264Z Has data issue: false hasContentIssue false

Partially strict non-recursive data types

Published online by Cambridge University Press:  07 November 2008

Eric Nöcker
Affiliation:
Faculty of Mathematics and Computer Science, University of Nijmegen, Toernooiveld 1, 6525 ED Nijmegen, The Netherlands (e-mail: {eric,sjakie}@cs.kun.nl)
Sjaak Smetsers
Affiliation:
Faculty of Mathematics and Computer Science, University of Nijmegen, Toernooiveld 1, 6525 ED Nijmegen, The Netherlands (e-mail: {eric,sjakie}@cs.kun.nl)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

Values belonging to lazy data types have the advantage that sub-components can be accessed without evaluating the values as a whole: unneeded components remain unevaluated. A disadvantage is that often a large amount of space and time is required to handle lazy data types properly. Many special constructor cells are needed to ‘glue’ the individual parts of a composite object together and to store it in the heap. We present a way of representing data in functional languages which makes these special constructor cells superfluous. In some cases, no heap at all is needed to store this data. To make this possible, we introduce a new kind of data type: (partially) strict non-recursive data types. The main advantage of these types is that an efficient call-by-value mechanism can be used to pass arguments. A restrictive subclass of (partially) strict non-recursive data types, partially strict tuples, is treated more comprehensively. We also give examples of important classes of applications. In particular, we show how partially strict tuples can be used to define very efficient input and output primitives. Measurements of applications written in Concurrent Clean which exploit partially strict tuples have shown that speedups of 2 to 3 times are reasonable. Moreover, much less heap space is required when partially strict tuples are used.

Type
Articles
Copyright
Copyright © Cambridge University Press 1993

References

Achten, P. M., van Groningen, J. H. G. and Plasmeijer, M. J. 1992. High level specification of I/O in functional languages. In International Workshop on Functional Languages, Glasgow, UK, Springer-Verlag (to appear).Google Scholar
Burn, G. L. 1987. Evaluation transformers - a model for the parallel evaluation of functional languages (extended abstract). In Conference on Functional Programming Languages and Computer Architecture, Portland, OR, 446470. Springer-Verlag.CrossRefGoogle Scholar
Cooley, J. M. and Tukey, J. W. 1965. An algorithm for the machine calculation of complex Fourier series. Math. Computing, 19: 297301.CrossRefGoogle Scholar
van Groningen, J. H. G., Nöcker, E. and Smetsers, J. E. W. 1991. Efficient heap management in the concrete ABC machine. In Third International Workshop on Implementation of Functional Languages on Parallel Architectures, Southampton, UK, 383393. Technical Report Series CSTR91-07.Google Scholar
Heerink, G. 1990. Enkele Benchmarks voor Functionele Talen, University of Nijmegen, Stage Report, 03.Google Scholar
Hudak, P., Peyton Jones, S. L., Wadler, P. L., Arvind, , Boutel, B., Fairbairn, J., Fasel, J., Guzman, K., Hammond, K., Hughes, J., Johnsson, T., Kieburtz, R., Nikhil, R. S., Partain, W. and Peterson, J. 1992. Report on the functional programming language Haskell, version 1.2, Special Issue of SIGPLAN Notices, 27, 05.Google Scholar
Johnsson, T. 1987. Compiling Lazy Functional Programming Languages. PhD Thesis, Chalmers University, Göteborg, Sweden.Google Scholar
Koopman, P. W. M., van Eekelen, M. C. J. D., Nöcker, E., Plasmeijer, M. J. and Smetsers, J. E. W. 1990. The ABC-machine: a sequential stack-based abstract machine for graph rewriting. University of Nijmegen, Netherlands, Technical Report 90–22, 12.Google Scholar
Nöcker, E. 1990. Strictness analysis based on abstract reduction. In Second International Workshop on Implementation of Functional Languages on Parallel Architectures. University of Nijmegen, Netherlands, Technical Report 90-16, 297321.Google Scholar
Nöcker, E. and Smetsers, J. E. W. 1990. Partially strict data types. In Second International Workshop on Implementation of Functional Languages on Parallel Architectures, University of Nijmegen, Netherlands, Technical Report 90-16, 237255.Google Scholar
Nöcker, E., Smetsers, J. E. W., van Eekelen, M. C. J. D. and Plasmeijer, M. J. 1991. Concurrent clean. In Parallel Architectures and Languages Europe (PARLE ‘91), Eindhoven, Netherlands, 202219, Springer-Verlag.CrossRefGoogle Scholar
Peyton Jones, S. L. and Launchbury, L. 1991. Unboxed values as first class citizens. In Conference on Functional Programming Languages and Computer Architecture (FPCA ‘91),Cambridge, MA,636666, Springer-Verlag.CrossRefGoogle Scholar
Peyton Jones, S. L. and Salkild, J. 1989. The spineless tagless G-machine. In Conference on Functional Programming Languages and Computer Architecture (FPCA ‘89),London, UK,184201, Addison Wesley.Google Scholar
Plasmeijer, M. J., van Eekelen, M. C. J. D., Nöcker, E. and Smetsers, J. E. W. 1991. The Concurrent Clean System - Functional programming on the Macintosh. In 7th International Conference of the Apple European University Consortium, Paris.Google Scholar
Smetsers, J. E. W., Nöcker, E., van Groningen, J. H. G. and Plasmeijer, M. J. 1991. Generating efficient code for lazy functional languages. In Conference on Functional Programming Languages and Computer Architecture (FPCA ‘91),Cambridge, MA,592617, Springer-Verlag.CrossRefGoogle Scholar
Turner, D. A. 1985. Miranda: A non-strict functional language with polymorphic types. In Conference on Functional Programming Languages and Computer Architecture (FPCA ‘85),Nancy, France, 116, Springer-Verlag.CrossRefGoogle Scholar
Wadler, P. and Hughes, R. J. M. 1987. Projections for strictness analysis. In Conference on Functional Programming Languages and Computer Architecture (FPCA ‘87),Portland, OR,385407, Springer-Verlag.CrossRefGoogle Scholar
Submit a response

Discussions

No Discussions have been published for this article.