Aspect-oriented programming is an emerging approach in software development,udwhich provides new possibilities for separation of concerns. Aspectorientedudlanguages offer abstractions for the implementation of concernsudwhose modularization cannot be achieved by using traditional programmingudlanguages. Such concerns are generally termed as crosscutting concerns. It isudgenerally agreed that separating the right concerns from each other enhancesudsoftware quality factors such as reusability and adaptability. The separatedudconcerns in software must be composed together so that software behavesudaccording to its requirements in a coherent way. We refer to language mechanismsudthat separate and compose concerns as 'composition mechanisms'. Thisudthesis evaluates the software composition mechanisms of current aspectorientedudlanguages from the perspective of software quality factors such asudevolvability, comprehensibility, predictability and adaptability. Based on thisudstudy, the thesis proposes novel extensions to current aspect-orientedudlanguages so that programs written in these languages exhibit better quality.udA considerable number of aspect-oriented languages has been introduced forudmodularizing crosscutting concerns. Naturally, these languages share a numberudof common concepts and have distinctive features as well. For this reason, weudpropose a reference model that aims to capture the common and distinctiveudconcepts of aspect-oriented languages. This reference model provides a basisudto understand the important characteristics of the state-of-the-art AOPudlanguages and helps us to compare the AOP languages with each other.udFurthermore, it exposes the issues that have to be considered when a newudaspect-oriented language needs to be developed.udIn this thesis, we analyse the four main aspect-oriented concepts of the referenceudmodel, namely join point, pointcut, advice and aspect, and identify problemsudrelated to their use in various AOP languages. Based on this analysis, weudpropose extensions of the existing concepts and/or design new ones to addressudthe identified problems.udIn current aspect-oriented languages, pointcuts select join points of a programudbased on lexical information such as explicit names of program elements.udHowever, this reduces the adaptability of software, since it involves too muchudinformation that is hard-coded, and often implementation-specific. We claimudthat this problem can be reduced by referring to program elements through theirudsemantic properties. A semantic property describes for example the behaviorudof a program element or its intended meaning. We formulate requirements forudthe proper application of semantic properties in aspect-oriented programming.udWe discuss how to use semantic properties for the superimposition of aspects,udand how to apply superimposition to bind semantic properties to programudelements. To achieve this, we propose language constructs that support semanticudcomposition: the ability to compose aspects with the elements of the baseudprogram that satisfy certain semantic properties.udThe current advice-pointcut binding constructs of AOP languages maintainudexplicit dependencies to advices and aspects. This results in weaving specificationsudthat are less evolvable and need more maintenance during the developmentudof a system. We show that this issue can be addressed by providing associativeudaccess to advices and aspects instead of using explicit dependencies inudthe weaving specification. To this aim, we propose to use a designating (query)udlanguage in advice-pointcut bindings that allows for referring aspect/advicesudthrough their (syntactic and semantic) properties. We also present how semanticudproperties can be applied to provide reusable (adaptable) aspect abstractions.udAspect-oriented languages provide means to superimpose aspectual behavior –udin terms of advices - on a given set of join points. It is possible that not just audsingle, but several advices need to execute at the same join point. Such "shared"udjoin points may give rise to issues such as determining the exact executionudorder and the other possible dependencies among the aspects. We present auddetailed analysis of the problem, and identify a set of requirements upon mechanismsudfor composing aspects at shared join points. To address the identifiedudissues, we propose a general and declarative model for defining constraintsudupon the possible compositions of aspects at a shared join point. By using anudextended notion of join points, we show how concrete aspect-orientedudprogramming languages can adopt the proposed model.udThe thesis also presents how the proposed extensions and new constructs areudadopted by the aspect-oriented language Compose*. To evaluate the proposedudconstructs, we provide qualitative analyses with respect to various softwareudengineering properties, such as evolvability, modularity, predictability andudadaptability.
展开▼