Aspect Assumptions A Retrospective Study of Aspect J

  • Slides: 10
Download presentation
Aspect Assumptions A Retrospective Study of Aspect. J Developers’ Assumptions About Aspect Usage Steffen

Aspect Assumptions A Retrospective Study of Aspect. J Developers’ Assumptions About Aspect Usage Steffen Zschaler (King’s College London), Awais Rashid (Lancaster University) 23 March, 2011

Motivation • Aspects provide new ways of modularising code • BUT modular reasoning over

Motivation • Aspects provide new ways of modularising code • BUT modular reasoning over aspects considered difficult – Some approaches exist • XPIs, Open. Modules, . . . – BUT how do we know if they are good? 23/03/2011 (c) Steffen Zschaler, 2011 2

Motivation (2) • Modular reasoning relies on assumptions and guarantees – Modules provide guarantees

Motivation (2) • Modular reasoning relies on assumptions and guarantees – Modules provide guarantees if their assumptions are met • So what types of assumptions do aspect developers make? 23/03/2011 (c) Steffen Zschaler, 2011 3

Using Assumption Types • Assumption elicitation – Use catalogue as “check list” in inspections

Using Assumption Types • Assumption elicitation – Use catalogue as “check list” in inspections – Extract patterns that may be used to identify certain assumption types (semi-)automatically • Assumption verification – Provide specification template for each type • Type-specific assumption specifiers • Code improvement – Some assumptions really are indications of bugs 23/03/2011 (c) Steffen Zschaler, 2011 4

Study Design Studied 3 open-source AOP projects 1. Manually identified assumptions (explicit & implicit)

Study Design Studied 3 open-source AOP projects 1. Manually identified assumptions (explicit & implicit) 2. Validated findings with original developers 3. Manually classified into types 4. Validated classification with original developers 23/03/2011 (c) Steffen Zschaler, 2011 5

Selected Projects Mobile Media Health Watcher Glassbox Academic project on an industrial basis Industrial

Selected Projects Mobile Media Health Watcher Glassbox Academic project on an industrial basis Industrial project Aspects specifically developed; Some generalisation for reusability Aspects developed for reuse Mostly static crosscutting Mostly dynamic crosscutting Refactored from an OO system Evolved from an OO system AOP from scratch 23/03/2011 (c) Steffen Zschaler, 2011 6

 What’s in an Assumption? System S Weaving context wctx(A) 23/03/2011 Aspect A Δ

What’s in an Assumption? System S Weaving context wctx(A) 23/03/2011 Aspect A Δ (c) Steffen Zschaler, 2011 7

Assumption Types Aspect–Aspect Coordination Inter-Aspect Assumptions Inter-Advice Deployment ITDs Sub-Aspect Structure Precedence Super-Aspect Structure

Assumption Types Aspect–Aspect Coordination Inter-Aspect Assumptions Inter-Advice Deployment ITDs Sub-Aspect Structure Precedence Super-Aspect Structure Wormhole Inter-Process Advice Execution Sequence Aspect–Base Coordination Synchronisation Managed by Context 23/03/2011 Monitor Sharing Architecture Communication (c) Steffen Zschaler, 2011 Coding Patterns Data Code Advised Code Called 8

Threats to Validity • Limited number of projects – Found and classified 183 assumptions

Threats to Validity • Limited number of projects – Found and classified 183 assumptions – Cover a range of different AOP project characteristics – New projects may still require new classes to be added • Manual identification and clustering – May have misinterpreted / misunderstood – Constant checks and feedback from original developers • All Aspect. J – May be relevant for other modularisation techniques • Further research needed – Aspect. J most used, though 23/03/2011 (c) Steffen Zschaler, 2011 9

Future Work • Simplify assumption specification – Formalisation templates – Custom language concepts •

Future Work • Simplify assumption specification – Formalisation templates – Custom language concepts • Experiments on assumption elicitation • Aspect. J anti-patterns • Assumptions in other modularisation techniques 23/03/2011 (c) Steffen Zschaler, 2011 10