Abstract
Meta-AspectJ (MAJ) is a language tool for generating AspectJ programs using code templates. MAJ itself is an extension of Java, so users can interleave arbitrary Java code with AspectJ code templates. MAJ is a structured meta-programming tool: a well-typed generator implies a syntactically correct generated program. MAJ promotes a methodology that combines aspect-oriented and generative programming. Potential applications range from implementing domain-specific languages with AspectJ as a back-end to enhancing AspectJ with more powerful general-purpose constructs. In addition to its practical value, MAJ offers valuable insights to meta-programming tool designers. It is a mature meta-programming tool for AspectJ (and, by extension, Java): a lot of emphasis has been placed on context-sensitive parsing and error-reporting. As a result, MAJ minimizes the number of meta-programming (quote/unquote) operators and uses type inference to reduce the need to remember type names for syntactic entities.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Bachrach, J., Playford, K.: The Java syntactic extender (JSE). In: Proceedings of the OOPSLA 2001 conference on Object Oriented Programming Systems Languages and Applications, pp. 31–42. ACM Press, New York (2001)
Baker, J., Hsieh, W.C.: Maya: multiple-dispatch syntax extension in Java. In: Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, pp. 270–281. ACM Press, New York (2002)
Batory, D., Lofaso, B., Smaragdakis, Y.: JTS: tools for implementing domainspecific languages. In: Proceedings Fifth International Conference on Software Reuse, Victoria, BC, Canada, pp. 143–153. IEEE, Los Alamitos (1998)
Batory, D., Sarvela, J.N., Rauschmayer, A.: Scaling step-wise refinement. In: Proceedings of the 25th International Conference on Software Engineering, pp. 187–197. IEEE Computer Society, Los Alamitos (2003)
Bryant, A., Catton, K.: De Volder, and G. C. Murphy. Explicit programming. In: Proceedings of the 1st international conference on Aspect-Oriented Software Development, pp. 10–18. ACM Press, New York (2002)
Calcagno, C., Taha, W., Huang, L., Leroy, X.: Implementing multi-stage languages using ASTs, gensym, and reflection. In: Pfenning, F., Smaragdakis, Y. (eds.) GPCE 2003. LNCS, vol. 2830, pp. 57–76. Springer, Heidelberg (2003)
Chiba, S.: A metaobject protocol for C++. In: ACM Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA 1995), SIGPLAN Notices, Austin, Texas, USA, vol. 30(10), pp. 285–299 (October 1995)
Clinger, W.: Macros that work. In: Proceedings of the 18th ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages, pp. 155–162. ACM Press, New York (1991)
Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.: Getting started with AspectJ. Communications of the ACM 44(10), 59–65 (2001)
Kohlbecker, E., Friedman, D.P., Felleisen, M., Duba, B.: Hygienic macro expansion. In: Proceedings of the 1986 ACM conference on LISP and functional programming, pp. 151–161. ACM Press, New York (1986)
Parr, T.J., Quong, R.W.: ANTLR: A predicated LL(k) parser generator. Software, Practice and Experience 25(7), 789–810 (1995)
Sheard, T., Jones, S.P.: Template meta-programming for Haskell. In: Proceedings of the ACM SIGPLAN workshop on Haskell, pp. 1–16. ACM Press, New York (2002)
Shonle, M., Lieberherr, K., Shah, A.: Xaspects: An extensible system for domain specific aspect languages. In: OOPSLA 2003, Domain-Driven Development Track (October 2003)
Smaragdakis, Y., Batory, D.: Scoping constructs for program generators. In: Generative and Component-Based Software Engineering Symposium (GCSE), Earlier version in Technical Report UTCS-TR-96-37 (1999)
Soares, S., Laureano, E., Borba, P.: Implementing distribution and persistence aspects with AspectJ. In: Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 174–190. ACM Press, New York (2002)
Stevens, A., et al.: XDoclet Web site, http://xdoclet.sourceforge.net/
Taha, W., Sheard, T.: Multi-stage programming with explicit annotations. In: Partial Evaluation and Semantics-Based Program Manipulation, Amsterdam, The Netherlands, June 1997, pp. 203–217. ACM Press, New York (1997)
Tilevich, E., Urbanski, S., Smaragdakis, Y., Fleury, M.: Aspectizing server-side distribution. In: Proceedings of the Automated Software Engineering (ASE) Conference, October 2003, IEEE Press, Los Alamitos (2003)
Visser, E.: Meta-programming with concrete object syntax. In: Batory, D., Consel, C., Taha, W. (eds.) GPCE 2002. LNCS, vol. 2487, pp. 299–315. Springer, Heidelberg (2002)
Weise, D., Crew, R.F.: Programmable syntax macros. In: SIGPLAN Conference on Programming Language Design and Implementation, pp. 156–165 (1993)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Zook, D., Huang, S.S., Smaragdakis, Y. (2004). Generating AspectJ Programs with Meta-AspectJ. In: Karsai, G., Visser, E. (eds) Generative Programming and Component Engineering. GPCE 2004. Lecture Notes in Computer Science, vol 3286. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30175-2_1
Download citation
DOI: https://doi.org/10.1007/978-3-540-30175-2_1
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-23580-4
Online ISBN: 978-3-540-30175-2
eBook Packages: Springer Book Archive