Hostname: page-component-8448b6f56d-m8qmq Total loading time: 0 Render date: 2024-04-20T02:58:07.622Z Has data issue: false hasContentIssue false

Implementing a functional spreadsheet in clean

Published online by Cambridge University Press:  07 November 2008

Walter A. C. A. J De Hoon
Affiliation:
Computing Science Institute, University of Nijmegen, Toernooiveld 1, 6525 ED Nijmegen, The Netherlands (e-mail: marko@cs.kun.nl)
Luc M. W. J Rutten
Affiliation:
Computing Science Institute, University of Nijmegen, Toernooiveld 1, 6525 ED Nijmegen, The Netherlands (e-mail: marko@cs.kun.nl)
Marko C. J. D van Eekelen
Affiliation:
Computing Science Institute, University of Nijmegen, Toernooiveld 1, 6525 ED Nijmegen, The Netherlands (e-mail: marko@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.

It has been claimed that recent developments in the research on the efficiency of code generation and on graphical input/output interfacing have made it possible to use a functional language to write efficient programs that can compete with industrial applications written in a traditional imperative language. As one of the early steps in verifying this claim, this paper describes a first attempt to implement a spreadsheet in a lazy, purely functional language. An interesting aspect of the design is that the language with which the user specifies the relations between the cells of the spreadsheet is itself a lazy, purely functional and higher order language as well, and not some special dedicated spreadsheet language. Another interesting aspect of the design is that the spreadsheet incorporates symbolic reduction and normalisation of symbolic expressions (including equations). This introduces the possibility of asking the system to prove equality of symbolic cell expressions: a property which can greatly enhance the reliability of a particular user-defined spreadsheet. The resulting application is by no means a fully mature product. It is not intended as a competitor to commercially available spreadsheets. However, with its higher order lazy functional language and its symbolic capabilities it may serve as an interesting candidate to fill the gap between calculators with purely functional expressions and full-featured spreadsheets with dedicated non-functional spreadsheet languages. This paper describes the global design and important implementation issues in the development of the application. The experience gained and lessons learnt during this project are discussed. Performance and use of the resulting application are compared with related work.

Type
Research Article
Copyright
Copyright © Cambridge University Press 1995

References

Achten, P. M. and Plasmeijer, M. J. (1995) The Ins and Outs of Clean I/O. J. Functional Programming 5(1), pp. 81110.CrossRefGoogle Scholar
Barendregt, H. P., van Eekelen, M. C. J. D.Glauert, J. R. W., Kennaway, J. R., Plasmeijer, M. J. and Sleep, M. R. (1987) Term Graph Rewriting. In: de Bakker, J. W., Nijman, A. J. and Treleaven, P. C. eds., Proc. Parallel Architectures and Languages Europe, Eindhoven, The Netherlands. Lecture Notes in Computer Science Vol, 259, pp. 141158. Springer-Verlag.CrossRefGoogle Scholar
Barendsen, E. and Smetsers, J. E. W. (1993) Conventional and Uniqueness Typing in Graph Rewrite Systems (extended abstract). In: Shyamasundar, R. K., ed., Proc. 13th Conference on the Foundations of Software Technology and Theoretical Computer Science,Bombay, India,December1517. Lecture Notes in Computer Science Vol 761, pp. 4151. Springer-Verlag.CrossRefGoogle Scholar
Boon, J. (1994) A Purely Functional Spreadsheet. Third Year Project Report. University of York, UK.Google Scholar
Brus, T., van Eekelen, M. C. J. D., van Leer, M. O. and Plasmeijer, M. J. (1987) Clean: A Language for Functional Graph Rewriting. In: Kahn, G., ed., Proc. 3rd International Conference on Functional Programming Languages and Computer Architecture,Portland, Oregon, USA.CrossRefGoogle Scholar
Carlsson, M. and Hallgren, Th. (1993) Fudgets – A Graphical User Interface in a Lazy Functional Language. In: Proc. Conference on Functional Programming Languages and Computer Architecture,Copenhagen, Denmark, pp. 321330. ACM Press.CrossRefGoogle Scholar
Cartwright, R. and Boehm, B. (1990) Exact Real Arithmetic, formulating real numbers as functions. In: Turner, D. A., ed., Research Topics in Functional Programming, University of Texas at Austin Year of Programming Series, pp. 4364. Addison Wesley.Google Scholar
Casimir, and Rommert, (1992) Real Programmers Don't Use Spreadsheets. ACM SIGPLAN Notices 27(6): 1016.CrossRefGoogle Scholar
Du, W. and Wadge, W. W. (1990) The Eductive Implementation of a Three-Dimensional Spreadsheet. Software - Practice and Experience 20(11): 10971114.Google Scholar
Harvey, B. and Wright, M. (1994) Simply Scheme: Introducing Computer Science. MIT Press.Google Scholar
de Hoon, W. A. C. A. J. (1993) Designing a spreadsheet in a pure functional graph rewriting language. Computer Science Master Thesis 300, University of Nijmegen, The Netherlands.Google Scholar
de Hoon, W. A. C. A. J., Rutten, L. M. W. J. and van Eekelen, M. C. J. D. (1994) FunSheet: A Functional Spreadsheet. In: Proc. 6th International Workshop on the Implementation of Functional Languages,Norwich, UK, pp. 11.111.24.Google Scholar
Litecky, C. (1990) Spreadsheet Macro Programming: a Critique with Emphasis on Lotus 1-2-3. J. Systems and Software 13(3): 197200.CrossRefGoogle Scholar
Nöcker, E. G. J. M. H., Smetsers, J. E. W., van Eekelen, M. C. J. D. and Plasmeijer, M. J. (1991) Concurrent Clean. In: Aarts, E. H. L., van Leeuwen, J. and Rem, M., eds., Proc: Parallel Architectures and Languages Europe, Eindhoven, The Netherlands, pp. 202219. Springer-Verlag.CrossRefGoogle Scholar
Peyton Jones, S. L. and Wadler, P. (1993) Imperative Functional Programming. In: Proc. 20th Annual ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages,Charleston, SC, pp. 7184.CrossRefGoogle Scholar
Plasmeijer, M. J. and van Eekelen, M. C. J. D. (1993) Functional Programming and Parallel Graph Rewriting. Addison-Wesley.Google Scholar
Plasmeijer, M. J. and van Eekelen, M. C. J. D. (1995) Clean 1.0 Reference Manual. Technical Report, University of Nijmegen, The Netherlands (in preparation), draft available at http://www.cs.kun.nl/nclean.Google Scholar
Pountain, D. (1994) Functional Programming Comes of Age. Byte Magazine 19(8): 183184.Google Scholar
Smetsers, J. E. W., Barendsen, E., van Eekelen, M. C. J. D. and Plasmeijer, M. J. (1993) Guaranteeing Safe Destructive Updates through a Type System with Uniqueness Information for Graphs. In: Schneider, H. J. and Ehrig, H., eds., Proc. Workshop Graph Transformations in Computer Science, Schloss Dagstuhl, Germany. Lecture Notes in Computer Science Vol 776. Springer-Verlag.Google Scholar
Turner, D. A. (1990) An Approach to Functional Operating Systems. In: Turner, D. A. (editor), Research topics in Functional Programming, pp. 199217. Addison-Wesley Publishing Company.Google Scholar
Vuillemin, J. (1987). Arithmétic réelle exacte par les fractions continues. Technical Report 760, INRIA, France.Google Scholar
Wray, S. C. and Fairbairn, J. (1989) Non-strict languages – Programming and Implementation. The Computer Journal 32(2): 142151.CrossRefGoogle Scholar
Yoder, A. and Cohn, D. L. (1994) Real Spreadsheets for Real Programmers. Technical Report 94–9, University of Notre Dame.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.