Presentation is loading. Please wait.

Presentation is loading. Please wait.

Aspect-Oriented Software Development (AOSD) Tutorial #9 Modular Verification of Aspects.

Similar presentations


Presentation on theme: "Aspect-Oriented Software Development (AOSD) Tutorial #9 Modular Verification of Aspects."— Presentation transcript:

1 Aspect-Oriented Software Development (AOSD) Tutorial #9 Modular Verification of Aspects

2 Aspect-Oriented Software Development (236608) 2 Today: Aspects Verification Pointcut-ready models Weaving the aspect into the tableau MAVEN tool Examples

3 Aspect-Oriented Software Development (236608) 3 Example: Theft Protection Aspect General description: Can be used in a system with remote authorized access. Most useful for systems in which each user can have only one open session at a time. Prevents identity-theft: If a wrong password is provided in several consequent attempts of logging in, the aspect guarantees that the user is blocked.

4 Aspect-Oriented Software Development (236608) 4 Theft Protection Aspect – contd. Example system: ATM system of a bank: several ATM machines and a server. ATM usage: (in a cycle) –insert card –enter code (repeat until the correct code or “cancel” is entered) –if permission is granted (i.e, the code was correct), enter a request for the bank operation (money withdrawal, account balance check, …) –the request is then processed by the system Point of view of the aspect: the card serves as a user-login, and code - as a password.

5 Aspect-Oriented Software Development (236608) 5 Pointcut-ready Base Sys. Model Base system model: q t ¬pp Pointcut-ready model: Pointcut (example): wrong passw. entered 3 times consequently p ≡ correct passw. enter psw. perform ATM operations cancel enter psw.

6 Aspect-Oriented Software Development (236608) 6 Weaving Example q t ¬p, r p ¬p Pointcut-ready base model: ¬p … p … … … Advice model: ¬p, r r ≡ pointcut

7 Aspect-Oriented Software Development (236608) 7 Weaving– Stage1 base → aspect connections

8 Aspect-Oriented Software Development (236608) 8 Weaving– Stage2 aspect → base connections

9 Aspect-Oriented Software Development (236608) 9 Weaving– Stage3 remove unnecessary base edges

10 Aspect-Oriented Software Development (236608) 10 Pointcut-ready Base Sys.(2) Base system model: q t ¬pp Pointcut-ready model: Pointcut (example2): wrong passw. has been entered 3 times

11 Aspect-Oriented Software Development (236608) 11 Theft Protection Aspect Assumption For each card and for each ATM: There is a state predicate telling that the card is stolen (st), and a state predicate telling the card is in the ATM (in) Whenever a card is stolen, it remains stolen forever Formally:

12 Aspect-Oriented Software Development (236608) 12 Theft Protection Aspect Pointcut Some stolen card is inserted into an ATM Formally:

13 Aspect-Oriented Software Development (236608) 13 Assumption Tableau ¬in ¬st ¬q ¬r ¬in ¬st ¬q r in ¬st ¬q ¬r in st ¬q ¬r in ¬st ¬q r ¬in st ¬q ¬r st – card stolen; in – card in ATM; r,q – aux. vars; pointcut: st ∧ in

14 Aspect-Oriented Software Development (236608) 14 Simple Advice Model in st ¬q ¬r

15 Aspect-Oriented Software Development (236608) 15 Weaving into the Tableau – Stage1

16 Aspect-Oriented Software Development (236608) 16 Weaving into the Tableau – Stage2

17 Aspect-Oriented Software Development (236608) 17 Weaving into the Tableau – Stage3

18 Aspect-Oriented Software Development (236608) 18 Card Theft Protection - Model VAR --BASE card_in : boolean ; card_stolen : boolean ; VAR --ASPECT pcT : 1..2 ; POINTCUT … TRANS pcT = 1 -> next(pcT = 2) & next(card_in) & next(card_stolen); RETURN pcT = 2 ; … LTLSPEC --BASE … LTLSPEC --AUGMENTED … Variables that should be calculated from the base system state – those used in the assumption, pointcut and advice Aspect variables Pointcut description (state predicate!) Advice Assumption Guarantee


Download ppt "Aspect-Oriented Software Development (AOSD) Tutorial #9 Modular Verification of Aspects."

Similar presentations


Ads by Google