VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting...

15
VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut – tells where and when to insert code in a program joinpoint – actual location to insert code advice – functional code to implement aspect

Transcript of VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting...

Page 1: VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –

VERIFICATION OF ASPECT-ORIENTED MODELS

Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve

multiple classes pointcut – tells where and when to insert code in a

program joinpoint – actual location to insert code advice – functional code to implement aspect

Page 2: VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –

ASPECT ORIENTED PROGRAMMING

Improves modularity

Clean separation of concerns

Enables incremental improvements by

interweaving aspect code into base program

Difficult to predict the effect of a given aspect on the base program

Page 3: VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –

VERIFICATION

Formal verification and analysis of AO system model

Consider AO model written in Aspect UML

Aspect interactions verified using Alloy model analyzer

Page 4: VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –

ASPECT INTERACTION PROBLEMS

Violation of local properties: An advice or a join point’s pre/post condition is violated due to the weaving of an aspect

Violation of a class, aspect or system invariant due to the addition of an aspect

Page 5: VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –

TELECOM SYSTEM (Aspect UML)

Page 6: VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –

UML2Alloy

UML Semi Formal Language Not easy to perform verification and automated

analysis Alloy

Formal Language Allows verification and automated analysis Increases reliability of software systems

Page 7: VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –

UML2Alloy

Need not be familiar with Alloy Create a model in UML Convert it to an Alloy Model using UML2Alloy

(Automated) Specify an OCL statement. Tool transforms

this statement into alloy and evaluates it on th e alloy model

Page 8: VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –

PROCESS FOR ANALYSIS(use Aspect-UML or UML2ALLOY)

Page 9: VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –

VERIFICATION OF UML MODELS WITH ALLOY

What is Alloy Analyzer? Formal language for structured modeling based on

first order logic and ideas from Z http://alloy.mit.edu/alloy4 (need Java5 RTE)

Used for verification of agent-oriented, service-oriented, and aspect-oriented models

Provides verification for interactions

Page 10: VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –

ALLOY ANALYZER FEATURES

Provides a structured specification consisting of the following types of elements: signatures, facts, predicates, and assertions

Checks small model instances Provides an automatic analysis

1) simulation - evaluates predicates (states of the model) for consistency

2) checking – proves validity of assertions

Page 11: VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –

UML2Alloy – Transformation Rules

Page 12: VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –

EXAMPLE: SECURITY SYSTEM

Security System Design Methodology

Page 13: VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –

MAN IN THE MIDDLE ATTACKER

Page 14: VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –

SOLUTION TO PROBLEM

The security mechanism for authentication chosen was TLS which involved passing certificates between a client and server.

The mechanism was verified by the Alloy Analyzer.

Page 15: VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –

ReferencesF. Mostefaoui and J. Vachon,” Design level Detection of Interactions inAspect-UML models using Alloy”, Journal of Object Technology, vol. 6, no.7, Special Issue: Aspect-Oriented Modeling, pp 137–165, 2007.

B. Bordbar, “UML2ALLOY: A Tool For Lightweight Modelling Of Discrete EventSystems,” In Proceedings of IADIS Applied Computing (Algarve,Portugal, February 22, 2005)

G. Georg, “An Aspect-oriented Methodology for Designing SecureApplications,” Information and Software Technology, vol. 51, no. 5, pp. 846-864, 2009.

F. Mostefaoui and J. Vachon,”Verification of Aspect-UML models using Alloy,”In Proceedings of the 10th International workshop on Aspect-OrientedModeling (Van Couver, Canada, March, 2007) pp. 41-48.

Farida Mostefaoui DIRO, University of Montreal Quebec, [email protected] Vachon DIRO, University of Montreal Quebec, [email protected]

Permission to make digital or hard copies of all or part of this work forpersonal or classroom use is granted without fee provided that copies arenot made or distributed for profit or commercial advantage and that copiesbear this notice and the full citation on the first page. To copy otherwise, torepublish, to post on servers or to redistribute to lists, requires prior specificpermission and/or a fee.Workshop AOM ’07, March 12-13, 2007 Vancouver, British Columbia,Canada Copyright 2007 ACM 1-59593-658-5/07/03... $5.00