1 / 25

Towards Executable Aspect-Oriented UML Models

Towards Executable Aspect-Oriented UML Models. Lidia Fuentes and Pablo Sánchez Dpto. Lenguajes y Ciencias de la Computación Universidad de Málaga, (Spain) {lff, pablo }@lcc.uma.es. 10th Int. Workshop on Aspect-Oriented Modeling (AOM),

vangie
Télécharger la présentation

Towards Executable Aspect-Oriented UML Models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  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. Base Models Reasoning about AO Models

  5. Base Models Aspect Models Reasoning about AO Models

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

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

  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. Base Models Aspect Models Woven Models Pointcut Models *:* Bank 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). pay(..) {hook=BEFORE_SEND} XMI XMI XMI Weaver

  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 • Object creation and destruction; • The sending and reception of a message/method; • The throwing of an event; • 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.

  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 • Select the place where the advice must be injected. • Translate special AO actions into UML plain actions. • Reroute control and object flows to ensure correctness of the composition

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

  23. Aspect weaving • Advice injection • Select the place where the advice must be injected. • Translate special AO actions into UML plain actions. • 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

More Related