Modularity First: A Case for Mixing AOP and Attribute Grammars
- In: Mira Mezini, Editor, Proceedings of the Seventh International Conference on Aspect-Oriented Software Development, Brussels, Belgium, 2008.
- Authors: Pavel Avgustinov, Torbjöorn Ekman and Julian Tibble
- Abstract:
We have reimplemented the frontend of the extensible AspectBench Compiler for AspectJ, using the aspect-oriented meta-compiler JastAdd. The original frontend was purely object-oriented. Each frontend extends Java with AspectJ and an additional set of pointcuts in a modular fashion. In this paper we give a detailed comparison of both approaches and show a number of advantages of using JastAdd: the implementation is half the size, twice as fast, concerns are better localised, extensions are composable, and computations are automatically scheduled.
JastAdd provides a very constrained form of static AOP where only inter-type declarations and method execution interception are supported. However, additional modularisation mechanisms from the compiler construction community are supported in the form of demand-driven evaluation and attribute grammars. Our implementation would not have benefited from a richer pointcut language, while both demand-drive evaluation and declarative attributes were essential in enabling composable extensions and flexible modularisation.
We believe that the AOP community at large can benefit from acknowledging demand-driven evaluation as an important modularisation mechanism. Also, reference attribute grammars enhance the extensible implementation of graph-based computations that rely on context-sensitive information.
Full text: PDF
- Bibtex:
@inproceedings{aosd08avgustinov, author = {Avgustinov, Pavel and Ekman, Torbj\"orn and Tibble, Julian}, title = {Modularity First: A Case for Mixing AOP and Attribute Grammars}, booktitle = {AOSD'08: Proceedings of the Seventh International Conference on Aspect-Oriented Software Development}, editor = "Mira Mezini", year = {2008}, series = "Lecture Notes in Computer Science", location = {Brussels, Belgium}, publisher = {Springer}, address = {Berlin, Germany}, }