Skip to main content

Generative Programming and Active Libraries

Extended Abstract

  • Conference paper
  • First Online:
Generic Programming

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1766))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. D. Bjørner, A. P. Ershov, and N. D. Jones, editors. Partial Evaluation and Mixed Computation. North-Holland, Amsterdam, 1988.

    Google Scholar 

  2. S. Chiba. A Metaobject Protocol for C++. In OOPSLA’95, pages 285–299, 1995.

    Google Scholar 

  3. 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.

    Chapter  Google Scholar 

  4. 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.

    Google Scholar 

  5. K. Czarnecki and U. Eisenecker. Meta-control structures for template metaprogramming. http://home.t-online.de/home/Ulrich.Eisenecker/meta.htm.

  6. 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.

    Google Scholar 

  7. K. Czarnecki and U. Eisenecker. Generative Programming: Methods, Techniques and Applications. Addison-Wesley Longman, 1999. (to appear).

    Google Scholar 

  8. O. Danvy, R. Glück, and P. Thiemann, editors. Partial Evaluation, volume 1110 of Lecture Notes in Computer Science. Springer-Verlag, 1996.

    MATH  Google Scholar 

  9. U. Eisenecker. Generative Programming (GP) with C++. In H. Mössenböck, editor, Modular Programming Languages, volume 1024, pages 351–365. Springer-Verlag, 1997.

    Google Scholar 

  10. D. R. Engler. Incorporating application semantics and control into compilation. In USENIX Conference on Domain-Specific Languages (DSL’97), October 15–17, 1997.

    Google Scholar 

  11. 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.

    Google Scholar 

  12. A. P. Ershov. On the essence of compilation. In E. J. Neuhold, editor, Formal Description of Programming Concepts, pages 391–420. North-Holland, 1978.

    Google Scholar 

  13. Y. Futamura. Partial evaluation of computation process-an approach to a compiler-compiler. Systems, Computers, Controls, 2(5):45–50, 1971.

    Google Scholar 

  14. 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.

    Chapter  Google Scholar 

  15. R. Glück and J. Jørgensen. An automatic program generator for multi-level specialization. Lisp and Symbolic Computation, 10(2):113–158, 1997.

    Article  Google Scholar 

  16. 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.

    Google Scholar 

  17. 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.

    Google Scholar 

  18. P. Hudak. Building domain-specific embedded languages. ACM Computing Surveys, 28(4es):196–196, Dec. 1996.

    Article  Google Scholar 

  19. 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.

    Google Scholar 

  20. 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).

    Google Scholar 

  21. G. Kiczales and et al. Home page of the Aspect-Oriented Programming Project. http://www.parc.xerox.com/aop/.

  22. 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.

    Google Scholar 

  23. 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.

    Google Scholar 

  24. D. Musser and A. Saini. STL Tutorial and Reference Guide: C++ Programming with the Standard Template Library. Addison-Wesley, Reading (MA), USA, 1996.

    Google Scholar 

  25. T. Neubert. Anwendung von generativen Programmiertechniken am Beispiel der Matrixalgebra. Technische Universitet Chemnitz, 1998. Diplomarbeit.

    Google Scholar 

  26. 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.

    Google Scholar 

  27. 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.

    Google Scholar 

  28. 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.

    Google Scholar 

  29. C. Simonyi and et. al. Home page of the Intentional Programming Project. http://www.research.microsoft.com/research/ip/.

  30. J. Stichnoth and T. Gross. Code composition as an implementation language for compilers. In USENIX Conference on Domain-Specific Languages, 1997.

    Google Scholar 

  31. 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.

    Google Scholar 

  32. V. F. Turchin. The concept of a supercompiler. ACM TOPLAS, 8(3):292–325, 1986.

    Article  MathSciNet  MATH  Google Scholar 

  33. T. L. Veldhuizen. Expression templates. C++ Report, 7(5):26–31, June 1995. Reprinted in C++ Gems, ed. Stanley Lippman.

    Google Scholar 

  34. T. L. Veldhuizen. Using C++ template metaprograms. C++ Report, 7(4):36–43, May 1995. Reprinted in C++ Gems, ed. Stanley Lippman.

    Google Scholar 

  35. T. L. Veldhuizen. Arrays in Blitz++. In ISCOPE’98, volume 1505 of Lecture Notes in Computer Science, 1998.

    Google Scholar 

  36. P. Wadler. Deforestation: transforming programs to eliminate trees. Theoretical Computer Science, 73:231–248, 1990.

    Article  MathSciNet  MATH  Google Scholar 

  37. 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.

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics