摘要

Domain specific aspect-oriented language extensions offer unique capabilities to deal with a variety of crosscutting concerns. Ideally, one should be able to use several of these extensions together in a single program. Unfortunately, each extension generally implements its own specialized weaver and the different weavers are incompatible. Even if the weavers were compatible, combining them is a difficult problem to solve in general, because each extension defines its own language with new semantics. In this paper we present a practical composition framework, named AWESOME, for constructing a multi-extension weaver by plugging together independently developed aspect mechanisms. The framework has a component-based and aspect-oriented architecture that facilitates the development and integration of aspect weavers. To be scalable, the framework provides a default resolution of feature interactions in the composition. To be general, the framework provides means for customizing the composition behavior. Furthermore, to be practically useful, there is no framework-associated overhead on the runtime performance of compiled aspect programs. To illustrate the AWESOME framework concretely, we demonstrate the construction of a weaver for a multi-extension AOP language that combines COOL and AspectJ. However, the composition method is not exclusive to COOL and AspectJ-it can be applied to combine any comparable reactive aspect mechanisms.