Abstract
Clean is a functional language based on Term Graph Rewriting. It is specially designed to make the development of real world applications possible by using a pure functional language.
In this paper we first give a short overview of the most important basic features of the language Clean among which it’s Term Graph Rewriting semantics. Of particular importance for practical use is Clean’s uniqueness typing enabling destructive updates of arbitrary objects and the creation of direct interfaces with the outside world, all within a purely functional framework.
After this overview we will focus on a new language feature, which is currently being added. The new version of Clean offers a hybrid type system with both static as well as dynamic typing. Expressions, which are dynamically typed, are called Dynamics. With help of Dynamics one can create mobile expressions, which can be passed to other Clean applications. Dynamics can be used to make plug-ins which will be type checked at run-time. Typically, 30% of the code of an application is needed for storing (converting data to string) and retrieving (by means of a parser) of data. With Dynamics one can store and retrieve not only data but also code (!) with just one instruction.
The implementation effort needed to support Dynamics is quite large: it not only involves dynamic type checking but also dynamic type unification, dynamic linking, just-in-time compilation, coding techniques for data and version management of code segments.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Abadi, M., Cardelli, L., Pierce, B. and Plotkin, G. (1991). Dynamic Typing in a Statically Typed Language. ACM Transactions on Programming Languages and Systems, 13(2):237–268.
Achten, P.M., and Plasmeijer, M.J. (1995). The ins and outs of Clean I/O. J Functional Programming, 5(1):81–110.
Achten, P.M. (1996). Interactive Functional Programs-models, methods, and implementations. Ph.D., University of Nijmegen.
Achten, P., and Plasmeijer, R. (1997). Interactive Functional Objects in Clean. In Proc. 1997 Workshop on the Implementation of Functional Languages (IFL’97). (Hammond, K., Davie, T., and Clack, C. eds.), St. Andrews, Scotland. pp. 387–406. A revised version will appear in the proceedings, LNCS 1467, Springer Verlag.
Armstrong, J., Virding, R., Williams, M. (1993). Concurrent Programming in Erlang. Prentice Hall.
Barendregt, H.P. (1984). The Lambda Calculus-Its Syntax and Semantics (revised edition). Studies in Logic and the Foundations of Mathematics 103. Elsevier Science Publishers 1984.
Barendregt, H.P., Eekelen van, M.C.J.D., Glauert, J.R.W., Kennaway, J.R., Plasmeijer, M.J., and Sleep, M.R. (1987). Term Graph Rewriting. In Bakker, J.W. de, Nijman, A.J., and Treleaven, P.C. eds. Parallel Architectures and Languages Europe, Eindhoven, The Netherlands, LNCS 259, Vol.11. Springer-Verlag, Berlin, pp. 141–158.
Barendsen, E., and Smetsers, S. (1996). Uniqueness typing for functional languages with graph rewriting semantics. Mathematical Structures in Computer Science, 6:579–612.
Brus, T., Eekelen, M.C.J.D. van, Leer, M.O. van, and Plasmeijer, M.J. (1987)). Clean: A Language for Functional Graph Rewriting. In Kahn, G., ed. Third International Conference on Functional Programming Languages and Computer Architecture, Portland, Oregon, USA, LNCS 274, Springer-Verlag, pp. 364–384.
Harper, R., MacQueen, D., and Milner, R. (1986). Standard ML. Edinburgh University, Internal report ECS-LFCS-86-2.
Harvey, B. and Wright, M. (1994). Simply Scheme. MIT Press.
Hoon, W.A.C.A.J. de, Rutten, L.M.W.J., and Eekelen, M.C.J.D. van (1995). Implementing a Functional Spreadsheet in Clean. J. Functional Programming, 5(3):383–414, July.
Hudak, P., Peyton Jones, S., Wadler, P., et al., (1992). Report on the Programming Language Haskell. ACM SigPlan Notices 27,(5), pp. 1–164.
Girard, J.-Y. (1987). Linear Logic. Theoretical Computer Science, 50: 1–102, 1987.
Groningen, J.H.G. van (1996). The Implementation and Efficiency of Arrays in Clean 1.1. In Kluge, W., ed. Implementation of Functional Languages (Selected papers of 8th International Workshop, IFL96, Bad Godesberg, Germany). LNCS 1268, pp. 105–124. Springer Verlag.
Jones, M.P. (1995). A system of constructor classes: overloading and implicit higher-order polymorphism, J. Functional Programming, 5(l):1–37, January.
Leroy, X. (1995). La systeme Caml Special Light: modules et compilation efficace en Caml Research Report 2721, INRIA, November.
McCarthy J. (1960). Recursive functions of symbolic expressions and their computation by machine. Comm ACM, 4:184–195.
de Mol M. (1998). Clean Prover System. Master Thesis no. 442, University of Nijmegen, 1998.
Nöcker, E.G.J.M.H., Smetsers, J.E.W., Eekelen, M.C.J.D. van, and Plasmeijer, M.J. (1991). Concurrent Clean. In Aarts, E.H.L., et al, eds, Parallel Architectures and Languages Europe, June, Eindhoven, The Netherlands. LNCS 506, Springer-Verlag, pp. 202–219.
Pil, M. (1996). First Class File I/O. In Kluge, W., ed. Implementation of Functional Languages (Selected papers of 8th International Workshop, IFL96, Bad Godesberg, Germany). LNCS 1268, pp. 233–246. Springer Verlag.
Plasmeijer, M.J. and van Eekelen, M.C.J.D. (1993). Functional Programming and Parallel Graph Rewriting. Addison-Wesley.
Plasmeijer, M.J. and van Eekelen, M.C.J.D. (1998). Clean 1.3 Language Report. Technical Report, http://www.cs.kun.nl/~clean. Nijmegen.
Turner, D.A. (1985). Miranda: a non-strict functional language with polymorphic types. In Functional Programming Languages and Computer Architecture, Nancy, France (Jouannaud, J.P., ed.), LNCS 201, pp. 1–16. Berlin: Springer-Verlag.
Wadler, Ph. (1997). How to Declare an Imperative. ACM Computing Surveys, 29(3):240–263.
Wiering, M., Achten, P., Plasmeijer, R. (1999). Using Clean for Plastform games. In Koopman, P., ed. Implementation of Functional Languages, 11th International Workshop, IFL99, Lochem, The Netherlands, Internal Report University of Nijmegen, pp. 144–155. A revised paper will appear in the LNCS series on this workshop.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Plasmeijer, R., van Eekelen, M. (2000). Term Graph Rewriting and Mobile Expressions in Functional Languages. In: Nagl, M., Schürr, A., Münch, M. (eds) Applications of Graph Transformations with Industrial Relevance. AGTIVE 1999. Lecture Notes in Computer Science, vol 1779. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45104-8_1
Download citation
DOI: https://doi.org/10.1007/3-540-45104-8_1
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-67658-4
Online ISBN: 978-3-540-45104-4
eBook Packages: Springer Book Archive