EClean - An Embedded Functional Language

C++ template metaprogramming is often regarded as a functional language, however, nowadays metaprogram libraries are not implemented in functional programming style. In this paper we discuss a compile-time graph-rewriting engine based on the properties of the functional language Clean. The most important property imported from the functional paradigm is the lazy evaluation strategy. With the help of the engine it is possible to embed lazy functional-style code into C++ programs, and transform it into template metaprograms. We present the implemented lazy evaluation strategy by examples including also infinite lists.

[1]  Witold F. Krajewski,et al.  Efficient storage of weather radar data , 1997 .

[2]  Jeremy G. Siek,et al.  Concept Checking: Binding Parametric Polymorphism in C++ , 2000 .

[3]  Todd L. Veldhuizen,et al.  Expression templates , 1996 .

[4]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[5]  Martin Odersky,et al.  Making the future safe for the past: adding genericity to the Java programming language , 1998, OOPSLA '98.

[6]  Yannis Smaragdakis,et al.  Static interfaces in C , 2000 .

[7]  Martin Odersky,et al.  Pizza into Java: translating theory into practice , 1997, POPL '97.

[8]  Krzysztof Czarnecki,et al.  A Solution to the Constructor-Problem of Mixin-Based Programming in C++ , 2000 .

[9]  Bjarne Stroustrup,et al.  The Design and Evolution of C , 1994 .

[10]  Jaakko Järvi,et al.  A comparative study of language support for generic programming , 2003, OOPSLA 2003.

[11]  Bjarne Stroustrup,et al.  Specifying C++ concepts , 2006, POPL '06.

[12]  Zoltán Porkoláb,et al.  Towards a General Template Introspection Library , 2004, GPCE.

[13]  Marko C. J. D. van Eekelen,et al.  CLEAN: A language for functional graph writing , 1987, FPCA.

[14]  Alexander A. Stepanov,et al.  Algorithm‐oriented generic libraries , 1994, Softw. Pract. Exp..

[15]  Robert Glück,et al.  Generative Programming and Active Libraries , 1998, Generic Programming.

[16]  Bjarne Stroustrup,et al.  The C++ Programming Language: Special Edition , 2000 .

[17]  Andrei Alexandrescu,et al.  Modern C++ design: generic programming and design patterns applied , 2001 .

[18]  Jeremy G. Siek,et al.  A language for generic programming , 2005 .

[19]  Yannis Smaragdakis,et al.  Functional programming in C++ , 2000, ICFP '00.

[20]  Jeremy G. Siek,et al.  Essential language support for generic programming , 2005, PLDI '05.

[21]  Alexander A. Stepanov,et al.  The Ada® Generic Library: Linear List Processing Packages , 1989 .

[22]  Björn Karlsson,et al.  Beyond the C++ Standard Library: An Introduction to Boost , 2005 .

[23]  Douglas Gregor,et al.  C++ Templates: The Complete Guide , 2002 .

[24]  David Abrahams,et al.  C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond (C++ In-Depth Series) , 2004 .

[25]  Björn Karlsson,et al.  Beyond the C++ Standard Library , 2005 .

[26]  Todd L. Veldhuizen,et al.  Using C++ template metaprograms , 1996 .

[27]  Simon L. Peyton Jones,et al.  Imperative functional programming , 1993, POPL '93.

[28]  Zoltán Porkoláb,et al.  An Extension to the Subtype Relationship in C++ Implemented with Template Metaprogramming , 2003, GPCE.

[29]  Krzysztof Czarnecki,et al.  Generative programming - methods, tools and applications , 2000 .