The Meta in Meta-object Architectures

  • Marcus Denker
  • Mathieu Suen
  • Stéphane Ducasse
Part of the Lecture Notes in Business Information Processing book series (LNBIP, volume 11)


Behavioral reflection is crucial to support for example functional upgrades, on-the-fly debugging, or monitoring critical applications. However the use of reflective features can lead to severe problems due to infinite meta-call recursion even in simple cases. This is especially a problem when reflecting on core language features since there is a high chance that such features are used to implement the reflective behavior itself. In this paper we analyze the problem of infinite meta-object call recursion and solve it by providing a first class representation of meta-level execution: at any point in the execution of a system it can be determined if we are operating on a meta-level or base level so that we can prevent infinite recursion. We present how meta-level execution can be represented by a meta-context and how reflection becomes context-aware. Our solution makes it possible to freely apply behavioral reflection even on system classes: the meta-context brings stability to behavioral reflection. We validate the concept with a robust implementation and we present benchmarks.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Bergel, A., Ducasse, S., Nierstrasz, O., Wuyts, R.: Classboxes: Controlling visibility of class extensions. Journal of Computer Languages, Systems and Structures 31(3-4), 107–126 (2005)CrossRefMATHGoogle Scholar
  2. 2.
    Bergel, A., Hirschfeld, R., Clarke, S., Costanza, P.: Aspectboxes — controlling the visibility of aspects. In: Filipe, M.H.J., Shiskov, B. (eds.) Proceedings of the International Conference on Software and Data Technologies (ICSOFT 2006), pp. 29–38 (September 2006)Google Scholar
  3. 3.
    Bodden, E., Forster, F., Steimann, F.: Avoiding infinite recursion with stratified aspects. In: Hirschfeld, R., Polze, A., Kowalczyk, R. (eds.) GI-Edition Lecture Notes in Informatics NODe 2006 GSEM 2006, vol. P-88, pp. 49–64. Bonner Köllen Verlag, Gesellschaft für Informatik (2006)Google Scholar
  4. 4.
    Bouraqadi, N.: Un MOP Smalltalk pour l’étude de la composition et de la compatibilité des métaclasses. Application à la programmation par aspects (A Smalltalk MOP for the Study of Metaclass Composition and Compatibility. Application to Aspect-Oriented Programming. In: French). Thèse de doctorat, Université de Nantes, Nantes, France (July 1999)Google Scholar
  5. 5.
    Bouraqadi, N., Ledoux, T., Rivard, F.: Safe metaclass programming. In: Proceedings OOPSLA 1998, pp. 84–96 (1998)Google Scholar
  6. 6.
    Brant, J., Foote, B., Johnson, R., Roberts, D.: Wrappers to the rescue. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 396–417. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  7. 7.
    Chiba, S., Kiczales, G., Lamping, J.: Avoiding confusion in metacircularity: The meta-helix. In: Futatsugi, K., Matsuoka, S. (eds.) ISOTAS 1996. LNCS, vol. 1049, pp. 157–172. Springer, Heidelberg (1996)Google Scholar
  8. 8.
    Costanza, P., Hirschfeld, R.: Language constructs for context-oriented programming: An overview of ContextL. In: Proceedings of the Dynamic Languages Symposium (DLS) 2005, co-organized with OOPSLA 2005, pp. 1–10. ACM Press, New York (2005)CrossRefGoogle Scholar
  9. 9.
    Costanza, P., Hirschfeld, R.: Reflective layer activation in ContextL. In: SAC 2007: Proceedings of the 2007 ACM Symposium on Applied Computing, pp. 1280–1285. ACM Press, New York (2007)CrossRefGoogle Scholar
  10. 10.
    Denker, M., Ducasse, S., Lienhard, A., Marschall, P.: Sub-method reflection. Journal of Object Technology 6(9), 231–251 (2007)Google Scholar
  11. 11.
    Denker, M., Gîrba, T., Lienhard, A., Nierstrasz, O., Renggli, L., Zumkehr, P.: Encapsulating and exploiting change with Changeboxes. In: Proceedings of the 2007 International Conference on Dynamic Languages (ICDL 2007), pp. 25–49. ACM Digital Library (2007)Google Scholar
  12. 12.
    Denker, M., Greevy, O., Lanza, M.: Higher abstractions for dynamic analysis. In: 2nd International Workshop on Program Comprehension through Dynamic Analysis (PCODA 2006), pp. 32–38 (2006)Google Scholar
  13. 13.
    Ducasse, S.: Evaluating message passing control techniques in Smalltalk. Journal of Object-Oriented Programming (JOOP) 12(6), 39–44 (1999)Google Scholar
  14. 14.
    Ferber, J.: Computational reflection in class-based object-oriented languages. In: Proceedings OOPSLA 1989, ACM SIGPLAN Notices, oct 1989, vol. 24, pp. 317–326 (October 1989)Google Scholar
  15. 15.
    Harrison, W., Ossher, H.: Subject-oriented programming (a critique of pure objects). In: Proceedings OOPSLA 1993, ACM SIGPLAN Notices, vol. 28, pp. 411–428 (October 1993)Google Scholar
  16. 16.
    Herzeel, C., Gybels, K., Costanza, P.: A temporal logic language for context awareness in pointcuts. In: Proceeding of the Workshop on Revival of Dynamic Languages (2006)Google Scholar
  17. 17.
    Herzeel, C., Gybels, K., Costanza, P., D’Hondt, T.: Modularizing crosscuts in an e-commerce application in lisp using halo. In: Proceeding of the International Lisp Conference (ILC 2007) (2007)Google Scholar
  18. 18.
    Hirschfeld, R., Costanza, P., Nierstrasz, O.: Context-oriented programming. Journal of Object Technology 7(3) (March 2008)Google Scholar
  19. 19.
    Ingalls, D., Kaehler, T., Maloney, J., Wallace, S., Kay, A.: Back to the future: The story of Squeak, A practical Smalltalk written in itself. In: Proceedings OOPSLA 1997, ACM SIGPLAN Notices, pp. 318–326. ACM Press (November 1997)Google Scholar
  20. 20.
    Kiczales, G., Rivières, J.d., Bobrow, D.G.: The Art of the Metaobject Protocol. MIT Press (1991)Google Scholar
  21. 21.
    Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M., Irwin, J.: Aspect-Oriented Programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  22. 22.
    Maes, P.: Concepts and experiments in computational reflection. In: Proceedings OOPSLA 1987, ACM SIGPLAN Notices, vol. 22, pp. 147–155 (December 1987)Google Scholar
  23. 23.
    Rivard, F.: Pour un lien d’instanciation dynamique dans les langages à classes. In: JFLA 1996. INRIA — collection didactique (January 1996)Google Scholar
  24. 24.
    Röthlisberger, D., Denker, M., Tanter, É.: Unanticipated partial behavioral reflection: Adapting applications at runtime. Journal of Computer Languages, Systems and Structures 34(2-3), 46–65 (2008)CrossRefGoogle Scholar
  25. 25.
    Smith, B.C.: Reflection and semantics in a procedural language. Technical Report TR-272. MIT, Cambridge (1982)Google Scholar
  26. 26.
    Smith, R.B., Ungar, D.: A simple and unifying approach to subjective objects. TAPOS special issue on Subjectivity in Object-Oriented Systems 2(3), 161–178 (1996)Google Scholar
  27. 27.
    Tanter, É.: On dynamically-scoped crosscutting mechanisms. ACM SIGPLAN Notices 42(2), 27–33 (2007)CrossRefGoogle Scholar
  28. 28.
    Tanter, É.: Expressive scoping of dynamically-deployed aspects. In: Proceedings of the 7th ACM International Conference on Aspect-Oriented Software Development (AOSD 2008), Brussels, Belgium, April 2008. ACM Press (to appear, 2008)Google Scholar
  29. 29.
    Tanter, É., Gybels, K., Denker, M., Bergel, A.: Context-aware aspects. In: Löwe, W., Südholt, M. (eds.) SC 2006. LNCS, vol. 4089, pp. 227–242. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  30. 30.
    Tanter, É., Noyé, J., Caromel, D., Cointe, P.: Partial behavioral reflection: Spatial and temporal selection of reification. In: Proceedings of OOPSLA 2003, ACM SIGPLAN Notices, pp. 27–46 (November 2003)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Marcus Denker
    • 1
  • Mathieu Suen
    • 2
  • Stéphane Ducasse
    • 2
  1. 1.Software Composition GroupUniversity of BernSwitzerland
  2. 2.ADAM, INRIA Nord Europe – LIFL – CNRS UMR 8022France

Personalised recommendations