110 likes | 256 Views
Aspect Assumptions A Retrospective Study of AspectJ 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
E N D
Aspect AssumptionsA Retrospective Study of AspectJDevelopers’ 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 aspects considered difficult • Some approaches exist • XPIs, OpenModules, ... • BUT how do we know if they are good? (c) Steffen Zschaler, 2011
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? (c) Steffen Zschaler, 2011
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 (c) Steffen Zschaler, 2011
Study Design Studied 3 open-source AOP projects • Manually identified assumptions (explicit & implicit) • Validated findings with original developers • Manually classified into types • Validated classification with original developers (c) Steffen Zschaler, 2011
Selected Projects (c) Steffen Zschaler, 2011
What’s in an Assumption? System S Aspect A Weaving context wctx(A) System S Δ (c) Steffen Zschaler, 2011
Assumption Types Aspect–Aspect Coordination Inter-Aspect Inter-Advice Inter-Process Deployment ITDs Super-Aspect Structure Wormhole Advice Execution Sequence Sub-Aspect Structure Precedence Aspect Assumptions Aspect–Base Coordination Synchronisation Architecture Coding Patterns Communication Data Code Advised Code Called Managed by Context Monitor Sharing (c) Steffen Zschaler, 2011
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 AspectJ • May be relevant for other modularisation techniques • Further research needed • AspectJ most used, though (c) Steffen Zschaler, 2011
Future Work • Simplify assumption specification • Formalisation templates • Custom language concepts • Experiments on assumption elicitation • AspectJ anti-patterns • Assumptions in other modularisation techniques (c) Steffen Zschaler, 2011