1 Thomas Cottenier 1,2, Aswin van den Berg 1, Tzilla Elrad 2 1 Software and System Engineering Research Lab, Motorola Labs 2 Concurrent Programming Research Group, Illinois Institute of Technology AOSD 2007 Stateful Aspects: The Case for Aspect-Oriented Modeling
Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc This talk is about…
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc This talk is about… Stateful Aspects Modeling Languages –Transformational Systems –Reactive Systems Stateful Aspects Appear in Reactive Systems Model-Driven Implementation of Reactive Systems Aspect-Oriented Modeling with Motorola WEAVR Abstractions for Stateful Aspects Conclusions
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Conclusions The need for stateful aspects indicates that the base system exhibits reactive behavior Being reactive, the base system is better decomposed according to a state machine decomposition language Aspect-Oriented Modeling languages can capture stateful aspects in terms of module specifications as opposed to implementation- dependent sequences of events Aspect-Oriented Modeling techniques can achieve better decoupling between aspects and base modules
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Stateful Aspects
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Stateful Aspects “Jumping Aspects” Problem (Brichau et al.) History-sensitive pointcut descriptors that capture protocols –Event-Based AOP (Douence et al.) –Trace-Based Aspects (Douence et al.) –Declarative Event Patterns (Walker et al.) –Java Aspect Components (Vandeperren et al.) Stateful aspect languages recover the state-machine based behavior of the system
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Stateful Aspects in JAsCo
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Stateful Aspects History-sensitive pointcut descriptors capture protocols Systems that implement protocols can be categorized as being reactive, discrete systems as opposed to transformational systems
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Software Modeling Different types of systems: Transformational systems: Data-Processing systems, Compilers, Search-Engines, Computation Intensive systems, etc.. Reactive systems ATM, vending machines, phones, cars, missile and avionic systems, telecom infrastructure, human-machine interface of may ordinary software, etc… Workflow systems Enterprise Resource Planning systems, business processes, Scientific workflow systems, etc… Concurrent systems Application Servers, Resource Access Servers, telecom systems, user- interfaces, …
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Software Modeling Different types of systems: Transformational systems: Data-Processing systems, Compilers, Search-Engines, Computation Intensive systems, etc.. Procedural, Functional, Object-Oriented, etc programming languages provide excellent support for Transformational systems!
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Software Modeling Different types of systems: Reactive systems ATM, vending machines, phones, cars, missile and avionic systems, telecom infrastructure, human-machine interface of may ordinary software Procedural, Functional, Object-Oriented, etc programming languages DO NOT provide the right abstractions
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Reactive Systems Components: -That are repeatedly prompted by the outside world and continuously respond to external inputs -Whose behavior is highly dependent on module history Abstractions: -State -Transition -Decision Actions Today, difficult systems are hybrid systems ! (concurrent, reactive, transformational, workflow)
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc void actionPerformed(ActionEvent evt) { 2. switch(this.STATE){ 3. case Init: 4. serviceA.methodA(); 5. if(evt.getSource() == Enter){ 6. serviceB.methodB(); 7. if(evt.getActionCommand() == “Previous”){ 8. serviceC.methodC(); 9. this.STATE = Previous; 10. return; 11. }else 12. if(evt.getActionCommand() == “Next”){ 13. serviceD.methodB(); 14. this.STATE = Next; 15. return; 16. } 17. }else 18. if (evt.getSource() == Cancel){ 19. } 20. break; 21. case Previous: 22. serviceA.methodE(); 23. break; 24. case Next: 25. if(evt.getActionCommand() == “Proceed”){ 26. serviceA methodC(); 27. } 28. break; 29. } 30. methodF(); 31. this.STATE = Done; 32. return; 33. } Example: Java Applet
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Software Modeling Procedural Object-Oriented Workflow State Machine Run time Structure + Execution: Action Language
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Model-Driven Implementation System Implementation System Specification
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Model-Driven Implementation
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Aspect-Oriented Modeling with Motorola WEAVR
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Aspect-Oriented Modeling with Motorola WEAVR WEAVR Model weaving Engine Resource Initialization Aspect Initialization Exception Handling Aspect
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Aspect-Oriented Modeling with Motorola WEAVR WEAVR is an addin to Telelogic TAU that performs weaving of UML models: –Aspects are fully defined at the modeling level –Aspects are woven with the base model before simulation or code generation We are not interested in generating code-level aspects: –The modeling language provides for a richer joinpoint model than programming languages –Code generation optimizers destroy the structure and the syntactic correspondence between models and generated code Model weaving is a particular form of model transformation
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Aspect-Oriented Modeling with Motorola WEAVR WEAVR performs model weaving using the Telelogic TAU metamodel and model transformation API –WEAVR can take advantage of the metamodel, API, type analysis, static analysis and model checking functions provided by TAU Downside: WEAVR is highly dependent on TAU, yet: –The semantics of the standard UML action language are not fully defined –Meaningful inter-exchange of executable models is hard –Weaving at the XMI level is not practical, especially for executable models
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Abstractions for Stateful Aspects The need for stateful aspects indicates that the base system exhibits reactive behavior Being reactive, the base system is better decomposed according to a state machine decomposition language Aspect-Oriented Modeling languages can capture stateful aspects in terms of module specifications as opposed to implementation- dependent sequences of events Aspect-Oriented Modeling techniques can achieve better decoupling between aspects and base modules
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Aspects in Motorola WEAVR
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Aspects in Motorola WEAVR
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Aspects in Motorola WEAVR
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Aspects in Motorola WEAVR Selection mechanism localizes important decision points See paper, Cottenier et al. “Joinpoint Inference from Behavioral Specification to Implementation”, ECOOP’07
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Change of Secutity Policy From: ATrans: call(methodA) > BTrans; BTrans: call(methodB) > CTrans; CTrans: call(methodC) > ATrans; To: ATrans: call(methodA) > BTrans; BTrans: call(methodB) > CTrans; CTrans: call(methodC) || call(methodB) > ATrans; Very Implementation Dependent!Defined in terms of system specification! From: State: Previous-> unauthorized State: Next, Done -> authorized To: State: Previous, Next-> unauthorized State: Done -> authorized
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Change of Secutity Policy To: State: Previous, Next-> unauthorized State: Done -> authorized From: State: Previous-> unauthorized State: Next, Done -> authorized
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Conclusions
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Conclusions The need for stateful aspects indicates that the base system exhibits reactive behavior Being reactive, the base system is better decomposed according to a state machine decomposition language Aspect-Oriented Modeling languages can capture stateful aspects in terms of module specifications as opposed to implementation- dependent sequences of events Aspect-Oriented Modeling techniques can achieve better decoupling between aspects and base modules
Stateful Aspects: The Case for Aspect-Oriented Modeling Thomas Cottenier, AOSD 2007 – Other materials used by permission Motorola General Business Information, MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective owners. © Motorola, Inc Thank You