Presentation is loading. Please wait.

Presentation is loading. Please wait.

Towards Executable Aspect-Oriented UML Models 10th Int. Workshop on Aspect-Oriented Modeling (AOM), 6th Int. Conf. on Aspect-Oriented Software Development.

Similar presentations


Presentation on theme: "Towards Executable Aspect-Oriented UML Models 10th Int. Workshop on Aspect-Oriented Modeling (AOM), 6th Int. Conf. on Aspect-Oriented Software Development."— Presentation transcript:

1 Towards Executable Aspect-Oriented UML Models 10th Int. Workshop on Aspect-Oriented Modeling (AOM), 6th Int. Conf. on Aspect-Oriented Software Development (AOSD) March 12th, 2007. Vancouver British Columbia (Canada) Lidia Fuentes and Pablo Sánchez Dpto. Lenguajes y Ciencias de la Computación Universidad de Málaga, (Spain) {lff,pablo}@lcc.uma.es

2 AOSD for improving modularization I would like to separate my crosscutting concerns

3 AOSD for improving modularization I would like to separate my crosscutting concerns AOSD !!

4 Reasoning about AO Models Base Models

5 Reasoning about AO Models Base Models Aspect Models

6 Reasoning about AO Models Base Models Aspect Models Pointcut Models {hook=BEFORE_SEND} *:* Bank pay(..)

7 Reasoning about AO Models Base Models Aspect Models Pointcut Models {hook=BEFORE_SEND} *:* Bank pay(..) ?

8 Simple solution If I want to know what my model does, the quickest way is to execute it. UML models can be executed (UML Action Semantics). There are tools that execute UML models (e.g. Telelogic Rhapsody, KC iUML).

9 Simple solution If I want to know what my model does, the quickest way is to execute it. UML models can be executed (UML Action Semantics). There are tools that execute UML models (e.g. Telelogic Rhapsody, KC iUML).

10 XMI Simple solution If I want to know what my model does, the quickest way is to execute it. UML models can be executed (UML Action Semantics). There are tools that execute UML models (e.g. Telelogic Rhapsody, KC iUML). XMI Base Models Aspect Models Pointcut Models {hook=BEFORE_SEND } *:* Bank pay(..) XMI Weaver Woven Models

11 The Online Book Store System The Online Book Store has to provide a way for customers to place orders for books. A customer will start a new order by selecting a book and specifying the required quantity. The customer can continue adding more books to the order. Once the customer is satisfied with his/her selections, the order goes to the check out stage. Each time a new book is added to the order, the order must be persisted. Persistence is a crosscutting concern !! => AO modeling

12 Base model (plain Executable UML) (1) Decompose the system into a set of interconnected components

13 Base model (plain Executable UML) (2) Model internals of each component ( OBS System in the figure)

14 Base model (plain Executable UML) (3) Construct a state machine by each class ( ShoppingCart in the figure) Behaviors are associated to transition events => modeled as activity diagrams

15 Base model (plain Executable UML) (3) Specify each behavior ( UpdateItems in the diagram) using activity diagrams and actions This does not have Persistence.

16 Aspect model (AOEM Profile) Joinpoint model (1)Object creation and destruction; (2)The sending and reception of a message/method; (3)The throwing of an event; (4)The raising of an exception. Suitable for being used with black-box components, services or legacy systems

17 Aspect model (AOEM Profile) (1) We create the Persistence aspect.

18 Aspect model (AOEM Profile) (2) We specify the advice behaviour. GetSource Returns a reference to the source of the intercepted message GetTarget Returns a reference to the target of the intercepted message Proceed Executes the intercepted behavior GetArg(n) Returns the n-argument of the intercepted message GetMessName Returns the name of the intercepted message

19 Aspect model (AOEM Profile) (3) We model the pointcuts.

20 Aspect weaving As the final behavior of base classes and aspects is expressed by means of activity diagrams, the weaving problem can be reduced to weaving activity diagrams. Two phases: joinpoint selection and aspect injection. Joinpoint selection Pointcuts are processed to generate XPath expressions that are used to search selected joinpoints (UML models are serialized into XMI). Information required by the weaver is added to each selected joinpoint (e.g., advice to be injected).

21 Aspect weaving Advice injection (1)Select the place where the advice must be injected. (2)Translate special AO actions into UML plain actions. (3)Reroute control and object flows to ensure correctness of the composition BEFOREAFTERAROUND SEND123 RECEIVE456

22 Aspect weaving Advice injection (1)Select the place where the advice must be injected. (2)Translate special AO actions into UML plain actions. (3)Reroute control and object flows to ensure correctness of the composition

23 Aspect weaving Advice injection (1)Select the place where the advice must be injected. (2)Translate special AO actions into UML plain actions. (3)Reroute control and object flows to ensure correctness of the composition

24 Experiments and Future Work Lack of UML tools that –Execute models –Export/Import to XMI, including actions, adequately. UML2 de Eclipse for UML modeling Telelogic Rhapsody for UML execution Solution: Use UML2 and import manually the woven in Rhapsody for validating the results. As future work: –Develop an academic UML execution engine for our own experimentation. –Replace the current pointcut model by JPDD’s or similar.

25 Questions ? Have I explained it clearly ? Any question or suggestion ? Thanks for your attention


Download ppt "Towards Executable Aspect-Oriented UML Models 10th Int. Workshop on Aspect-Oriented Modeling (AOM), 6th Int. Conf. on Aspect-Oriented Software Development."

Similar presentations


Ads by Google