Extending Unified Modeling Language to Support Aspect-Oriented Software Development Rehab

Aspect-Oriented Software Development (AOSD) is continuously gaining more importance as the complexity of software systems increases and requirement changes are highrated. A smart way for making reuse of functionality without additional effort is separating the functional and non functional requirements. Aspect-oriented software development supports the capability of separating requirements based on concerns. AspectJ is one of the aspect-oriented implementations of Java. Using Model Driven Architecture (MDA) specifications, an AspectJ model representing AspectJ elements can be created in an abstract way with the ability to be applied in UML, Java or XML. One of the open source tools which support MDA and follows the standards of the Object Management Group (OMG) for both UML and MDA is Eclipse providing an implementation of MDA through Eclipse Modeling Framework (EMF). This paper focuses on creating a UML profile; a UML extension which supports language specifications for AspectJ using EMF. Our work is based on the latest UML specification (UML 2.5) and uses MDA to enable the inclusion of aspect-oriented concepts in the design process. Keywords—Aspect-Oriented Software Development; Model Driven Architecture; Eclipse Modeling Framework; Object Management group; UML; AspectJ


INTRODUCTION
Nowadays, software development complexity is continuously increasing and the need for non-functional requirements has become mandatory.This has led to various problems concerning the code of existing systems.Examples of such problems are redundancy and maintainability.Aspectoriented software development came with solutions to such problems.A key concept in AOSD is by redefining the concerns into separate aspects where each aspect supports an individual concern.Typical examples of aspects are logging, security, and persistence [1].Using AOSD, the need to include logging and security validation in each functionality is not necessary anymore.Both of the log and security aspects scan the code to perform what each of them is created for.AOSD has its own terminology.An aspect refers to a specific concern.A pointcut specifies the condition that will be used to execute an aspect.A joinpoint refers to the program segment that satisfies the pointcut condition.An advice is a function that defines the behavior to use when a specific joinpoint is executed.The weaving process defines the manner in which the aspect code is combined with the base code so that they can be run together [1] [2].
Aspect-oriented processing can be applied on starting projects as well as existing projects.Various studies have focused on how to combine the aspect-oriented process with the software development process at different stages.Early research covered the requirement gathering process and how to perform separation of concerns.A formal way to convert the requirements to concerns and find the link between concerns has been presented [3].In the design phase, aspects can be supported through formal languages such as UML and related tools [4].A number of research projects have been conducted in the area of incorporating aspect-oriented concepts in the implementation stage of the software development process.In this respect, a number of programming languages such as C++ and Java have been extended to support aspect-oriented implementations yielding new languages such as AspectC++ and AspectJ [5] [6] [7].Adding aspect-oriented concepts to the software development design process requires some changes in the design process for aspect identification and design as well as program naming standards leading to a new generic aspectoriented design process [2].This paper presents an aspect-oriented representation using the UML extension mechanism with the abstraction of MDA.Section II introduces Model Driven Architecture abstraction mechanism and UML standards related to it.Section III presents previous work on UML extension mechanism supporting aspect-oriented development.Section IV presents our proposed UML extension.Finally, section V presents the conclusion and future work.

II. MDA ABSTRACTION MECHANISM
As software systems increase in complexity, the demand for abstraction increases.Moreover, the need for separation of the business domains, implementation, and the platform dependency becomes mandatory.MDA supports such abstraction on three levels: one representing business context, second is a platform independent model (PIM), and the third is a platform specific model (PSM) [8].
Model driven architecture (MDA) is an approach to system specifications and system interoperability based on the use of formal models introduced by OMG (Fig. 1).MDA separates the specifications of a system from platform technology.Computation Independent Model (CIM) specifies the function of the system without getting into the construction details (Fig. 2).Platform independent model (PIM) specifies the construction of the system without implementation details. www.ijacsa.thesai.orgPlatform Specific Model (PSM) expresses the system details related to implementation platform using Domain Specific language (DSL) to transform it into different languages.MDA aims to develop modeling specifications once and target multiple technology implementations [12] [9] [13] [22].

A. OMG and UML
Object Management Group (OMG) is a nonprofit organization that develops technology standards for UML, MDA and other software engineering concepts.The UML standard specifications facilitate exchange between different tools * [9] [10].OMG UML2.X specifications consist of four parts [11]: 1) Superstructure which defines the elements of the diagrams.
2) Infrastructure which defines the core metamodel of the superstructure.
3) Object Constraint Language (OCL) which defines rules for model elements.
4) XML MetaData Interchange (XMI) which defines an XML format for the exchange of UML models.
UML architecture is built up using the Meta Model Library called Meta Object Facility (MOF) based on a 4-layer Metamodel Architecture as shown in Fig. 3.
Infrastructure is used at both M2 and M3 levels of Fig. 3. UML and MOF are both built based on the infrastructure with additional properties to UML.MOF defines how UML models interchange between tools using XMI.The superstructure is specified by UML to deal with structural and behavioral modeling [11].UML provides an extensibility mechanism in two ways.The first is by creating profiles to customize the language for particular platforms and domains.The second is to create a new language related to UML using the Infrastructure library (define new Metamodel) but this requires specific environment modifications and handling.[11] UML Profile cannot change the semantics of UML elements; it is used when customizations of UML are required for specific application domains.OMG have standardized several existing UML profiles for specific domains like CORBA, EJB.UML Profiles define both PIM and PSM in MDA, as in the CORBA UML profile, which defines the mapping from a PIM to a CORBA-specific PSM.

B. Eclipse Modeling Framework (EMF)
EMF is a framework and code generation facility that enables the definition of a model in any of these forms (Java, XML, and UML) and generates it in any of the three forms as in Fig 4 .It is a technology moving in the direction of MDA as it is used to define the specification and separate it from the platform and the language representation.EMF is considered to be an MDA implementation supporting metamodel, but it has no Workgroup support, and does not fully comply with MOF standard.It has its Ecore which is close to MOF [14].development process starting from requirement gathering to design and implementation.A lot of work has been performed in the direction of creating new language extensions which support aspect-oriented concepts as well as developing compilers for such languages.On the other hand, other research focuses on the support of aspect-oriented concepts in the design phase in a formal way supporting standards.
UML profile is an extension technique for customizing UML to a specific domain or language implementation.Metamodel is a parallel implementation to UML.Both UML profile and Meta model support aspect-oriented concepts.This section focuses classifying UML extension mechanism based on whether it is a profile or metamodel, the used tool is open source or commercial, the UML standard version, and whether it supports an aspect-oriented language or is language independent.An AspectJ profile supporting aspect-oriented concepts in Java using one of the commercial tools and UML 2.0 extension mechanism has been developed [23].Enhancements of such research to support UML2.4 have also been conducted [30].A metamodel supporting aspect-oriented concepts and which is independent of language implementation and platform has been proposed [25].The research does not rely on aspect-oriented elements related to a specific language but relies only on the basic elements (Aspect, Pointcut, Advice, joinpoint).Another work proposes a tightly coupled AspectJ metamodel with Java created code based on Java metamodel [24].It is simple, but not considered as an extension to UML as Java metamodel is a linear version of it.In [26], another metamodel has been proposed representing both behavioral and static structures.This model supports the class and interaction diagrams by creating a tool based on the basic elements of aspect-oriented software development.
A comparative study of the extension mechanisms proposed to support aspect-oriented modeling approach is found in [28] [29] [11].
Tool Support: indicates whether the created profile has been applied with a tool, is an open source tool or one of the commercial tools.
Code Generation: indicates whether the tool created supports code generation from the design.
Language Support: indicates the language keywords supported by the created profile or if it is language independent (language independent support neglects some details and takes the common context of different language supported by specific profile).Based on the comparisons of the latest studies on aspectoriented extensions, most of the previous work doesn't support the latest OMG UML 2.5 standards.In addition, not all types of diagrams are supported.Most of the previous work also uses commercial tools or create their own tool.This work focuses on supporting the latest UML 2.5 standards with the Eclipse open source tool.

IV. PROPOSED MODEL
To create a model, language syntax keywords to be represented need to be listed.Then, the relation between different elements is defined.Finally, the type of extension to be used is matched in UML Profile extension elements to be represented in a Modeling Tool as a profile.Mapping elements of AspectJ profile need full awareness of UML elements and the Metaclasses [16].www.ijacsa.thesai.org In the proposed model, a UML extension is created through a UML profile using EMF to support AspectJ language syntax on Eclipse tool as open source one.The main elements of aspect-oriented programming (aspect, pointcut, advice, and joinpoint) are mapped together as shown in Fig. 5.A detailed representation of AspectJ elements and their relation to elementary subtypes are represented in Fig. 7 as AspectJ profile.

A. Language Syntax Representation
PointCut: A pointcut can be considered to be a filter or predicate to a set of events (called joinpoints) that is accessible to an aspect during program execution.Pointcuts may be categorized based on the kind of joinpoint, scope or a context [32].Detailed pointcut representation in the profile is shown in  Advice: An advice specifies what to do at a joinpoint matched by a specific pointcut.Each piece of advice is associated with a pointcut [32].An advice in this model is represented as a child of the UML Operation MetaClass.

B. AspectJ EMF UML Profile
Creating a profile using EMF requires the following steps [17][20][21] : 1) Create a UML profile: which is an extension mechanism supported by UML through standard extension elements: Stereotype, Object Constraint Language (OCL), and Tagged Value as shown in Fig. 8.
2) Validate the created profile: Validation is based on the version of UML that is applied.The proposed profile is created with UML 2.5 (latest version of UML by OMG) which has updated the OCL language validation for UML extension.
3) Generate an XMI profile (Fig 9): This is one of the features of using EMF.Once the model is created, it can be used in XML format.XMI is the XML representation to interchange the model between different tools supporting the OMG standards.As shown in Fig 9, the resulting AspectJ profile in XMI format holds the information of XMI version and the OMG specifications.It holds information of EMF Ecore, the UML Version as well as the detailed specification of the profile elements.The resulting XMI file may be used in Eclipse to create the modeling using the generative model of Eclipse.Moreover, the generated XMI file may be used with any tool supporting the XMI standard format.
Eclipse run-time environment is, then, used to run the profile.

C. Case Study
A Simple Telecom Simulation of a telephony system in which customers make and accept both local and long distance calls is presented here as an example of applying the proposed model [18].The basic objects of the telecom model are shown in Fig. 10.The Customer class holds methods for managing calls.The Connection class models the physical details of establishing a connection between customers.The Call class is created for both caller and receiver.If the caller and receiver have the same area code then the call is established with a Local connection.Otherwise a LongDistance connection is required.Three Aspects are used in this example.The Timing aspect keeps track of total connection time for each Customer by starting and stopping a timer associated with each connection.The TimerLog aspect can be included in a build to get the timer to monitor when it started and stopped.The Billing aspect adds billing functionality to the telecom application on top of timing.
The created profile successfully mapped the code for the model representation of aspect, pointcuts, and advices as in Fig. 11.This case study shows the ability of the created model to support the language representation of AspectJ.

Fig. 4 .
Fig. 4. EMF unifies UML, Java, and XML [14] III.PREVIOUS WORK As a challenging concept in software development, AOSD has been under focus in various phases of the software

Fig. 11 .
Fig. 11.Telecom Example representation using created AspectJ ProfileV.CONCLUSION AND FUTURE WORKA successful modeling representation of AspectJ language using Eclipse open source tool is created.Model-driven architecture concepts are applied following UML 2.5 standards; the latest version of UML up to the time of writing this paper.Most of the previous work doesn't support the latest OMG UML 2.5 standards.Moreover, most of the previous work uses commercial tools or create their own tool to extend UML to support aspect-oriented concepts.MDA concepts may be applied to both language and the domains customization in UML.This work uses MDA concepts to support language customization as a UML profile.Future research in this area may deal with supporting code generation from design as well as generating the class diagram from the code.More research can be done in handling the unification of specific domains such as healthcare, finance, telecom in a standard UML model using MDA concepts.
up to studies performed in 2010.An updated study, including more recent research is shown in Table 1.Our comparison is based on six criteria; UML version, extension mechanism, diagram support, tool support, code generation and language support.