Abstract
An aspect encapsulates not only crosscutting behavior, but also crosscutting state. When aspects are stateful, there is a need to specify and control their instantiation. Unfortunately, aspect instantiation is a hard-wired feature in AspectJ. This feature cannot be customized by the application programmer. Specifically, there are six pre-defined instantiation models to choose from, each designated by a keyword: issingleton, perthis, pertarget, percflow, percflowbelow, pertypewithin. In this work, we introduce a new language mechanism and keyword ‘perscope’ that lets third-parties define custom aspect instantiation models. This new keyword replaces the six existing keywords in AspectJ, and may eliminate the need for introducing future ones.
This research was supported in part by the Israel Science Foundation (ISF) under grant No. 926/08.
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
The Perscope project (2011), http://aop.cslab.openu.ac.il/research/perscope/
Avgustinov, P., Christensen, A.S., Hendren, L., Kuzins, S., Lhoták, J., Lhoták, O., de Moor, O., Sereni, D., Sittampalam, G., Tibble, J.: abc: an extensible AspectJ compiler. In: Proceedings of the 4th International Conference on Aspect-Oriented Software Development (AOSD 2005), March 14-18, pp. 87–98. ACM, New York (2005)
Colyer, A.: Implementing caching with AspectJ (blog). The Aspect Blog. (June 2004), http://www.aspectprogrammer.org/blogs/adrian/2004/06/
Hirschfeld, R.: AspectS - aspect-oriented programming with squeak. In: Aksit, M., Mezini, M., Unland, R. (eds.) NODe 2002. LNCS, vol. 2591, pp. 216–232. Springer, Heidelberg (2003)
Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of AspectJ. In: Lee, S.H. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–353. Springer, Heidelberg (2001)
Lieberherr, K., Lorenz, D.H., Wu, P.: A case for statically executable advice: Checking the Law of Demeter with AspectJ. In: Proceedings of the 2nd International Conference on Aspect-Oriented Software Development (AOSD 2003), March 17-21, pp. 40–49. ACM, New York (2003)
Lorenz, D.H., Trakhtenberg, V.: Perscope aspects: Decoupling aspect instantiation interface and implementation (poster). In: IBM Programming Languages and Development Environments Seminar, Haifa, Israel, April 14, IBM Research (2010)
Hansen, K.A., Kiczales, G., Dutchyn, C.: A compilation and optimization model for aspect-oriented programs. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 46–60. Springer, Heidelberg (2003)
Mezini, M., Ostermann, K.: Conquering aspects with Caesar. In: Proceedings of the 2nd International Conference on Aspect-Oriented Software Development (AOSD 2003), March 17-21, pp. 90–99. ACM, New York (2003)
Rajan, H., Sullivan, K.: Eos: instance-level aspects for integrated system design. In: ESEC/FSE-11: Proceedings of the 9th European software engineering conference held jointly with 11th ACM SIGSOFT international symposium on Foundations of software engineering, pp. 297–306. ACM Press, New York (2003)
Sakurai, K., Masuhara, H., Ubayashi, N., Matsuura, S., Komiya, S.: Association aspects. In: Proceedings of the 3rd International Conference on Aspect-Oriented Software Development (AOSD 2004), March 17-21, pp. 16–25. ACM, New York (2004)
Skotiniotis, T., Lieberherr, K., Lorenz, D.H.: Aspect instances and their interactions. In: Proceedings of the AOSD’03 Workshop on Software-engineering Properties of Languages for Aspect Technologies (SPLAT 2003), March 18. ACM, New York (2003)
Suvée, D., Vanderperren, W., Jonckers, V.: JAsCo: an aspect-oriented approach tailored for component based software development. In: Proceedings of the 2nd International Conference on Aspect-Oriented Software Development (AOSD 2003), March 17-21, pp. 21–29. ACM, New York (2003)
Tanter, E.: Expressive scoping of dynamically-deployed aspects. In: Proceedings of the 7th International Conference on Aspect-Oriented Software Development (AOSD 2008), pp. 168–179. ACM, New York (2008)
Tanter, E., Fabry, J., Douence, R., Noyé, J., Südholt, M.: Expressive scoping of distributed aspects. In: Proceedings of the 8th International Conference on Aspect-Oriented Software Development (AOSD 2009), pp. 27–38. ACM, New York (2009)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lorenz, D.H., Trakhtenberg, V. (2011). Pluggable Aspect Instantiation Models. In: Apel, S., Jackson, E. (eds) Software Composition. SC 2011. Lecture Notes in Computer Science, vol 6708. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22045-6_6
Download citation
DOI: https://doi.org/10.1007/978-3-642-22045-6_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-22044-9
Online ISBN: 978-3-642-22045-6
eBook Packages: Computer ScienceComputer Science (R0)