Skip to main content

Homogeneous Meta-Programming Techniques with Case Study

  • Chapter
  • First Online:
Meta-Programming and Model-Driven Meta-Program Development

Part of the book series: Advanced Information and Knowledge Processing ((AI&KP,volume 5))

  • 1107 Accesses

Abstract

There are two kinds of meta-programming: homogeneous and heterogeneous. Here, we focus on homogeneous meta-programming only.

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 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 109.99
Price excludes VAT (USA)
  • Durable hardcover 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

References

  1. Abrahams D, Gurtovoy A (2004) C++ template metaprogramming: concepts, tools, and techniques from boost and beyond. Addison Wesley Professional, Boston

    Google Scholar 

  2. Apel S, Sichting H, Böhm K (2004) Configurable binding: how to exploit mixins and design patterns for resource-constrained environments. TR. No. 14/2004, Otto-von-Guericke University, Magdeburg, Germany

    Google Scholar 

  3. Ashenden PJ (2008) The designer’s guide to VHDL. Springer, Dordrecht

    Google Scholar 

  4. Barendregt H (1992) Introduction to generalized type systems. J Funct Program 1(2):125–154

    MathSciNet  Google Scholar 

  5. Bracha G, Cook W (1990) Mixin-based inheritance. ACM SIGPLAN Notices 25(10):303–311

    Article  Google Scholar 

  6. Bettini L, Damiani F, Schaefer I (2010) Implementing software product lines using traits. In: Shin SY, Ossowski S, Schumacher M, Palakal MJ, Hung C-C (eds) Proceedings of the ACM symposium on applied computing (SAC), Sierre, Switzerland, 22–26 March 2010. ACM, New York, pp 2096–2102

    Chapter  Google Scholar 

  7. Briggs F, O’Neill M (2006) Functional genetic programming with combinators. In: The Long Pham and Hai Khoi Le and Xuan Hoai Nguyen (eds) Proceedings of the third Asian-Pacific workshop on genetic programming, Military Technical Academy, Hanoi, VietNam, pp 110–127

    Google Scholar 

  8. Brown TJ, Spence ITA, Kilpatrick P (2002) Mixin programming in Java with reflection and dynamic invocation. In: Waldron J, Power JF (eds) Proceedings of the inaugural international symposium on principles and practice of programming in Java, PPPJ 2002, Dublin, Ireland (National University of Ireland Maynooth, County Kildare, Ireland), June 13–14, ACM, pp 25–34

    Google Scholar 

  9. Cardone R, Brown A, McDirmid S, Lin C (2002) Using mixins to build flexible widgets. AOSD, ACM, New York, NY, USA, pp 76–85

    Google Scholar 

  10. Czarnecki K, O’Donnell JT, Striegnitz J, Taha W (2003) DSL implementation in MetaOCaml, template Haskell, and C++. In: Domain-specific program generation. LNCS, vol 3016. Springer, Berlin, pp 51–72

    Google Scholar 

  11. Czarnecki K, Eisenecker UW (2000) Separating the configuration aspect to support architecture evolution. In: Proceedings of 14th European conference on object-oriented programming (ECOOP’2000), international workshop on aspects and dimensions of concerns, Cannes, France, 11–12 June 2000

    Google Scholar 

  12. Curry HB, Feys R (1958) Combinatory logic. North-Holland, Amsterdam

    MATH  Google Scholar 

  13. Carette J, Kiselyov O (2005) Multi-stage programming with functors and monads: eliminating abstraction overhead from generic code. In: Glück R, Lowry MR (eds) Generative programming and component engineering, 4th international conference, GPCE 2005, Tallinn, Estonia. Springer, New York, pp 256–274

    Google Scholar 

  14. Cardelli L, Wegner P (1985) On understanding types, data abstraction, and polymorphism. ACM Comput Surv 17(4):471–522

    Article  Google Scholar 

  15. Ducasse S, Nierstrasz O, Schärli N, Wuyts R, Black AP (2006) Traits: a mechanism for fine-grained reuse. ACM Trans Program Lang Syst 28(2):331–388

    Article  Google Scholar 

  16. Erwig M, Ren D (2004) Monadification of functional programs. Sci Comput Program (SCP) 52:101–129

    Article  MathSciNet  MATH  Google Scholar 

  17. Gurtovoy A, Abrahams D (2003) The boost C++ metaprogramming Library. ACCU Spring Conference, Oxford, England, April 2–5

    Google Scholar 

  18. Giorgidze G, Nilsson H (2008) Switched-on Yampa. In: Hudak P, Warren DS (eds) Practical aspects of declarative languages, 10th international symposium, PADL 2008, San Francisco, CA, USA, 7–8 January 2008. LNCS, vol 4902. Springer, Berlin, pp 282–298

    Google Scholar 

  19. Huang L, Hudak P, Peterson J (2007) Hporter: using arrows to compose parallel processes. In: Proceedings of the practical aspects of declarative languages. LNCS, vol 4354. Springer, Berlin, pp 275–289

    Google Scholar 

  20. Hughes J (2000) Generalising monads to arrows. Sci Comput Program 37:67–111

    Article  MATH  Google Scholar 

  21. Iglesias PN (2005) Polytypic functional programming and data abstraction. PhD thesis, University of Nottingham

    Google Scholar 

  22. Jansson P, Jeuring J (1999) Polytypic compact printing and parsing. In: ESOP. Springer, Heidelberg, pp 273–287

    Google Scholar 

  23. Khoo YP, Hicks M, Foster JS, Sazawal V (2009) Directing JavaScript with arrows. In: Proceedings of the 5th symposium on dynamic languages, October 26–26, Orlando

    Google Scholar 

  24. Liu H, Cheng E, Hudak P (2009) Causal commutative arrows and their optimization. In: International conference on functional programming, ACM, New York, NY, USA, pp 35–46

    Google Scholar 

  25. Li P, Zdancewic S (2010) Arrows for secure information flow. Theor Comput Sci 411(19):1974–1994

    Article  MathSciNet  MATH  Google Scholar 

  26. Maddock J, Cleary S (2000) C++ type traits. Dr. Dobb’s J 25(10):38–38

    Google Scholar 

  27. Megacz (2010) Multi-stage programs are generalized arrows. The Computing Research Repository (CoRR) abs/1003.5954

    Google Scholar 

  28. Moggi E (1991) Notions of computation and monads. Inf Comput 93:55–92

    Article  MathSciNet  MATH  Google Scholar 

  29. Moors A, Piessens F, Odersky M (2007) Towards equal rights for higher-kinded types. In: 6th international workshop on multiparadigm programming with object-oriented languages, Berlin, Germany, 31 July 2007

    Google Scholar 

  30. Myers NC (1995) Traits: a new and useful template technique. In: C++ Report, June 1995. www.cantrip.org/traits.html

  31. Pasalic E (2004) The role of type equality in meta-programming. PhD thesis, Oregon Health and Sciences University, OGI School of Science and Engineering

    Google Scholar 

  32. Paterson R (2003) Arrows and computation. In: Gibbons J, de Moor O (eds) The fun of programming. Palgrave, Basingstoke, pp 201–222

    Google Scholar 

  33. Pierce BC (2002) Type systems for programming languages. The MIT Press, Cambridge, MA

    Google Scholar 

  34. Reynolds JC (1983) Types, abstraction and parametric polymorphism. In: IFIP congress, Information Processing 83, Paris, France, Elsevier, pp 513–523

    Google Scholar 

  35. Reppy J, Turon A (2006) A foundation for trait-based metaprogramming. In: International workshop on foundations and developments of object-oriented languages, January 2006, ACM

    Google Scholar 

  36. Salcic Z (1998) VHDL and FPLDs in digital systems design, prototyping and customization. Kluwer Academic Publishers, Boston

    Book  MATH  Google Scholar 

  37. Svahnberg M, Bosch J (2000) Issues concerning variability in software product lines. In: van der Linden F (ed) Proceedings of international workshop on software architectures for product families, IW-SAPF-3, Las Palmas, Spain, 15–17 March 2000. LNCS, vol 1951. Springer, Berlin, pp 146–157

    Google Scholar 

  38. Smaragdakis Y, Batory DS (2002) Mixin layers: an object-oriented implementation technique for refinements and collaboration-based designs. ACM Trans Softw Eng Methodol (TOSEM) 11(2):215–255

    Article  Google Scholar 

  39. Smaragdakis Y, Batory D (1998) Implementing layered designs with mixin layers. In: Proceedings of the 12th European conference on object-oriented programming (ECOOP98). Springer, Berlin, pp 550–570

    Google Scholar 

  40. Smaragdakis Y, Batory DS (1999) Building product-lines with mixin-layers. In: ECOOP Workshops, Springer-Verlag London, UK, pp 197–197

    Google Scholar 

  41. Schafer T (2001) Supporting meta-types in a compiled, reflective programming language. PhD thesis, University of Dublin

    Google Scholar 

  42. Schwarzweller C (2003) Towards formal support for generic programming. Hab. dissertation, Eberhard-Karls-Universitat, Tubingen

    Google Scholar 

  43. Sheard T (2001) Accomplishments and research challenges in meta-programming. In: Proceedings of 2nd international workshop on semantics, application, and implementation of program generation (SAIG’2001), Florence, Italy. LNCS, vol 2196. Springer, Heidelberg, pp 2–44

    Google Scholar 

  44. Smullyan RM (1985) To mock a mockingbird. Knopf, New York

    Google Scholar 

  45. Uustalu T, Vene V (2008) Comonadic notions of computation. Electron Notes Theor Comput Sci 203(5):263–284

    Article  MathSciNet  Google Scholar 

  46. Veldhuizen T (2001) Just when you thought your little language was safe: “expression templates” in Java. In: Proceedings of 2nd international symposium on generative and component-based software engineering, GCSE 2000, Erfurt, Germany, 9–12 October 2000. LNCS, vol 2177. Springer, Berlin, pp 188–202

    Google Scholar 

  47. Veldhuizen T (1995) Using C++ template metaprograms. C++ Report 7(4): 36–43

    Google Scholar 

  48. Vandevoorde D, Josuttis NM (2002) C++ templates: the complete guide. Addison-Wesley, Boston

    Google Scholar 

  49. Wadler P (1992) Monads for functional programming. In: Proceedings of the Marktoberdorf Summer School on program design calculi. NATO ASI Series F: Computer and systems sciences. Springer-Verlag, August

    Google Scholar 

  50. Wadler P (1998) The marriage of effects and monads. In: Proceedings of the 1998 ACM conference on functional programming. ACM Press, New York, pp 63–74

    Google Scholar 

  51. Zhang Y, Xu B (2005) A slice monad transformer and its applications in program slicing. In: Proceedings of 10th international conference on engineering of complex computer systems (ICECCS 2005), 16–20 June 2005, Shanghai, China, pp 147–154

    Google Scholar 

  52. Ziberkas G (2001) Analysis of component-based program generation methods of an application domain. Doctorial dissertation, Technical Sciences, Informatics Engineering, Kaunas University of Technology

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Vytautas Štuikys .

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag London

About this chapter

Cite this chapter

Štuikys, V., Damaševičius, R. (2013). Homogeneous Meta-Programming Techniques with Case Study. In: Meta-Programming and Model-Driven Meta-Program Development. Advanced Information and Knowledge Processing, vol 5. Springer, London. https://doi.org/10.1007/978-1-4471-4126-6_4

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-4126-6_4

  • Published:

  • Publisher Name: Springer, London

  • Print ISBN: 978-1-4471-4125-9

  • Online ISBN: 978-1-4471-4126-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics