Abstract
We describe generative programming, an approach to generating customized programming components or systems, and active libraries, which are based on this approach. In contrast to conventional libraries, active libraries may contain metaprograms that implement domain-specific code generation, optimizations, debugging, profiling and testing. Several working examples (Blitz++, GMCL, Xroma) are presented to illustrate the potential of active libraries. We discuss relevant implementation technologies.
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
D. Bjørner, A. P. Ershov, and N. D. Jones, editors. Partial Evaluation and Mixed Computation. North-Holland, Amsterdam, 1988.
S. Chiba. A Metaobject Protocol for C++. In OOPSLA’95, pages 285–299, 1995.
C. Consel, L. Hornof, F. Nöel, J. Noyé, and E. N. Volanschi. A uniform approach for compile-time and run-time specialization. In R. Glück, and P. Thiemann, editors. Partial Evaluation, volume 1110 of Lecture Notes in Computer Science. Springer-Verlag, 1996 Danvy et al. [8], pages 54–72.
K. Czarnecki. Generative Programming: Principles and Techniques of Software Engineering Based on Automated Configuration and Fragment-Based Component Models. PhD Thesis. Technical University of Ilmenau, Ilmenau, 1998.
K. Czarnecki and U. Eisenecker. Meta-control structures for template metaprogramming. http://home.t-online.de/home/Ulrich.Eisenecker/meta.htm.
K. Czarnecki and U. Eisenecker. Components and generative programming. In O. Nierstrasz, editor, Proceedings of the Joint European Software Engineering Conference and ACM SIGSOFT International Symposium on the Foundations of Software Engineering (ESEC/FSE 99, Toulouse, Frankreich, September 1999). Springer-Verlag, 1999.
K. Czarnecki and U. Eisenecker. Generative Programming: Methods, Techniques and Applications. Addison-Wesley Longman, 1999. (to appear).
O. Danvy, R. Glück, and P. Thiemann, editors. Partial Evaluation, volume 1110 of Lecture Notes in Computer Science. Springer-Verlag, 1996.
U. Eisenecker. Generative Programming (GP) with C++. In H. Mössenböck, editor, Modular Programming Languages, volume 1024, pages 351–365. Springer-Verlag, 1997.
D. R. Engler. Incorporating application semantics and control into compilation. In USENIX Conference on Domain-Specific Languages (DSL’97), October 15–17, 1997.
D. R. Engler, W. C. Hsieh, and M. F. Kaashoek. ‘C: A language for high-level, efficient, and machine-independent dynamic code generation. In POPL’96, pages 131–144, 1996.
A. P. Ershov. On the essence of compilation. In E. J. Neuhold, editor, Formal Description of Programming Concepts, pages 391–420. North-Holland, 1978.
Y. Futamura. Partial evaluation of computation process-an approach to a compiler-compiler. Systems, Computers, Controls, 2(5):45–50, 1971.
Y. Futamura. Partial computation of programs. In E. Goto, K. Furukawa, R. Nakajima, I. Nakata, and A. Yonezawa, editors, RIMS Symposia on Software Science and Engineering, volume 147 of Lecture Notes in Computer Science, pages 1–35, Kyoto, Japan, 1983. Springer-Verlag.
R. Glück and J. Jørgensen. An automatic program generator for multi-level specialization. Lisp and Symbolic Computation, 10(2):113–158, 1997.
R. Glück and A. V. Klimov. Metacomputation as a tool for formal linguistic modeling. In R. Trappl, editor, Cybernetics and Systems’ 94, volume 2, pages 1563–1570, Singapore, 1994. World Scientific.
B. Grant, M. Mock, M. Philipose, C. Chambers, and S. J. Eggers. Annotation-directed run-time specialization in C. In Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM’97), pages 163–178. ACM, June 1997.
P. Hudak. Building domain-specific embedded languages. ACM Computing Surveys, 28(4es):196–196, Dec. 1996.
Y. Ishikawa, A. Hori, M. Sato, M. Matsuda, J. Nolte, H. Tezuka, H. Konaka, M. Maeda, and K. Kubota. Design and implementation of metalevel architecture in C++ — MPC++ approach. In Reflection’96, 1996.
N. D. Jones, C. K. Gomard, and P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice Hall International, International Series in Computer Science, June 1993. ISBN number 0-13-020249-5 (pbk).
G. Kiczales and et al. Home page of the Aspect-Oriented Programming Project. http://www.parc.xerox.com/aop/.
M. Leone and P. Lee. Lightweight run-time code generation. In Proceedings of the 1994 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation, pages 97–106. Technical Report 94/9, Department of Computer Science, University of Melbourne, June 1994.
R. Marlet, S. Thibault, and C. Consel. Mapping software architectures to efficient implementations via partial evaluation. In Conference on Automated Software Engineering, pages 183–192, Lake Tahoe, Nevada, 1997. IEEE Computer Society.
D. Musser and A. Saini. STL Tutorial and Reference Guide: C++ Programming with the Standard Template Library. Addison-Wesley, Reading (MA), USA, 1996.
T. Neubert. Anwendung von generativen Programmiertechniken am Beispiel der Matrixalgebra. Technische Universitet Chemnitz, 1998. Diplomarbeit.
M. Poletto, D. R. Engler, and M. F. Kaashoek. tcc: A system for fast, flexible, and high-level dynamic code generation. In PLDI’97, 1996.
S. Shende, A. D. Malony, J. Cuny, K. Lindlan, P. Beckman, and S. Karmesin. Portable profiling and tracing for parallel, scientific applications using C++. In Proceedings of SPDT’98: ACM SIGMETRICS Symposium on Parallel and Distributed Tools, pages 134–145, August, 1998.
J. G. Siek and A. Lumsdaine. Modern Software Tools in Scientific Computing, chapter A Modern Framework for Portable High Performance Numerical Linear Algebra. Birkhauser, 1999.
C. Simonyi and et. al. Home page of the Intentional Programming Project. http://www.research.microsoft.com/research/ip/.
J. Stichnoth and T. Gross. Code composition as an implementation language for compilers. In USENIX Conference on Domain-Specific Languages, 1997.
W. Taha, Z.-E.-A. Benaissa, and T. Sheard. Multi-stage programming: axiomatization and type-safety. In International Colloquium on Automata, Languages, and Programming, Lecture Notes in Computer Science, Aalborg, Denmark, 1998. Springer-Verlag.
V. F. Turchin. The concept of a supercompiler. ACM TOPLAS, 8(3):292–325, 1986.
T. L. Veldhuizen. Expression templates. C++ Report, 7(5):26–31, June 1995. Reprinted in C++ Gems, ed. Stanley Lippman.
T. L. Veldhuizen. Using C++ template metaprograms. C++ Report, 7(4):36–43, May 1995. Reprinted in C++ Gems, ed. Stanley Lippman.
T. L. Veldhuizen. Arrays in Blitz++. In ISCOPE’98, volume 1505 of Lecture Notes in Computer Science, 1998.
P. Wadler. Deforestation: transforming programs to eliminate trees. Theoretical Computer Science, 73:231–248, 1990.
E. Willink and V. Muchnick. Weaving a way past the C++ One Definition Rule. Position Paper for the Aspect Oriented Programming Workshop at ECOOP 99, Lisbon, June 14, 1999. Available at http://www.ee.surrey.ac.uk/Research/CSRG/fog/AopEcoop99.pdf.
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
Czarnecki, K., Eisenecker, U., Glück, R., Vandevoorde, D., Veldhuizen, T. (2000). Generative Programming and Active Libraries. In: Jazayeri, M., Loos, R.G.K., Musser, D.R. (eds) Generic Programming. Lecture Notes in Computer Science, vol 1766. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-39953-4_3
Download citation
DOI: https://doi.org/10.1007/3-540-39953-4_3
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-41090-4
Online ISBN: 978-3-540-39953-7
eBook Packages: Springer Book Archive