1 / 18

Aspect-Oriented Software Development (AOSD) Tutorial #9

Aspect-Oriented Software Development (AOSD) Tutorial #9. Modular Verification of Aspects. Today: Aspects Verification. Pointcut-ready models Weaving the aspect into the tableau MAVEN tool Examples. Example: Theft Protection Aspect. General description:

laksha
Download Presentation

Aspect-Oriented Software Development (AOSD) Tutorial #9

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. Aspect-Oriented Software Development (AOSD)Tutorial #9 Modular Verification of Aspects

  2. Today: Aspects Verification • Pointcut-ready models • Weaving the aspect into the tableau • MAVEN tool • Examples 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. 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. Aspect-Oriented Software Development (236608)

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

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

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

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

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

  10. Pointcut-ready Base Sys.(2) Pointcut (example2): wrong passw. has been entered 3 times Base system model: Pointcut-ready model: p ¬p q t 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: Aspect-Oriented Software Development (236608)

  12. Theft Protection Aspect Pointcut • Some stolen card is inserted into an ATM • Formally: 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 Aspect-Oriented Software Development (236608)

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

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

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

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

  18. Card Theft Protection - Model Variables that should be calculated from the base system state – those used in the assumption, pointcut and advice 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 … Aspect variables Pointcut description (state predicate!) Advice Assumption Guarantee Aspect-Oriented Software Development (236608)

More Related