Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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)
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)
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)
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)
Bouraqadi, N., Ledoux, T., Rivard, F.: Safe metaclass programming. In: Proceedings OOPSLA 1998, pp. 84–96 (1998)
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)
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)
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)
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)
Denker, M., Ducasse, S., Lienhard, A., Marschall, P.: Sub-method reflection. Journal of Object Technology 6(9), 231–251 (2007)
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)
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)
Ducasse, S.: Evaluating message passing control techniques in Smalltalk. Journal of Object-Oriented Programming (JOOP) 12(6), 39–44 (1999)
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)
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)
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)
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)
Hirschfeld, R., Costanza, P., Nierstrasz, O.: Context-oriented programming. Journal of Object Technology 7(3) (March 2008)
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)
Kiczales, G., Rivières, J.d., Bobrow, D.G.: The Art of the Metaobject Protocol. MIT Press (1991)
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)
Maes, P.: Concepts and experiments in computational reflection. In: Proceedings OOPSLA 1987, ACM SIGPLAN Notices, vol. 22, pp. 147–155 (December 1987)
Rivard, F.: Pour un lien d’instanciation dynamique dans les langages à classes. In: JFLA 1996. INRIA — collection didactique (January 1996)
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)
Smith, B.C.: Reflection and semantics in a procedural language. Technical Report TR-272. MIT, Cambridge (1982)
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)
Tanter, É.: On dynamically-scoped crosscutting mechanisms. ACM SIGPLAN Notices 42(2), 27–33 (2007)
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)
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)
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)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Denker, M., Suen, M., Ducasse, S. (2008). The Meta in Meta-object Architectures. In: Paige, R.F., Meyer, B. (eds) Objects, Components, Models and Patterns. TOOLS EUROPE 2008. Lecture Notes in Business Information Processing, vol 11. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69824-1_13
Download citation
DOI: https://doi.org/10.1007/978-3-540-69824-1_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-69823-4
Online ISBN: 978-3-540-69824-1
eBook Packages: Computer ScienceComputer Science (R0)