Domain-Specific Languages and Program Generation with Meta-AspectJ
Publication Date
2008
Journal or Book Title
ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY
Abstract
Meta-AspectJ (MAJ) is a language 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 metaprogramming tool: a well-typed generator implies a syntactically correct generated program. MAJ promotes a methodology that combines aspect-oriented and generative programming. A valuable application is in implementing small domain-specific language extensions as generators using unobtrusive annotations for syntax extension and AspectJ as a back-end. The advantages of this approach are twofold. First, the generator integrates into an existing software application much as a regular API or library, instead of as a language extension. Second, a mature language implementation is easy to achieve with little effort since AspectJ takes care of the low-level issues of interfacing with the base Java language.
In addition to its practical value, MAJ offers valuable insights to metaprogramming tool designers. It is a mature metaprogramming 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 metaprogramming (quote/unquote) operators and uses type inference to reduce the need to remember type names for syntactic entities.
DOI
https://doi.org/10.1145/1416563.1416566
Pages
-
Volume
18
Issue
2
Recommended Citation
Huang, SS; Zook, D; and Smaragdakis, Y, "Domain-Specific Languages and Program Generation with Meta-AspectJ" (2008). ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY. 1113.
https://doi.org/10.1145/1416563.1416566