Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2008 IBM Corporation Behavioral Models for Software Development Andrei Kirshin, Dolev Dotan, Alan Hartman January 2008.

Similar presentations


Presentation on theme: "© 2008 IBM Corporation Behavioral Models for Software Development Andrei Kirshin, Dolev Dotan, Alan Hartman January 2008."— Presentation transcript:

1 © 2008 IBM Corporation Behavioral Models for Software Development Andrei Kirshin, Dolev Dotan, Alan Hartman January 2008

2 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 2 Abstract  MDD  raising the level of abstraction, increasing the automation  Models and model transformations  increased productivity, quality, effective way of adapting to changes in requirements  This talk focuses on models which describe the behavior of the system, and the tools for executing at the model level  Platform independent action language

3 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 3 Outline  Introduction –Motivation –UML Behavioral Modeling –Action Language  UML Model Debugger –Debugging capabilities –Debugging perspective –Diagram animation  Testing –Model testing –Model-based testing (test generation)

4 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 4 Outline – Introduction  Introduction –Motivation –UML Behavioral Modeling –Action Language  UML Model Debugger –Debugging capabilities –Debugging perspective –Diagram animation  Testing –Model testing –Model-based testing (test generation)

5 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 5 Introduction – Vision Time Developers Variety & versatility of users: business analysts, architects, developers, testers Tools Many highly qualified developers Abstraction Registers, low level commands Structures, operations, statements, expressions, classes, interfaces, packages Components, services, features, behaviors, actions, patterns 3GL level debugging, 3GL testing tools, Assembler, Assembly debugger Compiler RE OOD MDD PD Few experts PD – Procedural Development, RE – Reverse Engineering, MD – Model Discovery Model level debugging Model level testing Support for AL Static model analysis MD Code Generation

6 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 6 Behavioral Modeling Toolset Traditional Software Development Model Driven Development Code Debugger Model Debugger Compiler Model Transformation IDE Modeling Tool

7 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 7 MDD and Model Debugger  Identify defects at a much higher level of abstraction, earlier in the development cycle Model Debugger Transformation Execution Runtime Executable Model Executable Specification (e.g. code)

8 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 8 Modeling with UML  Structure –Class (Class diagram) –Component (Composite structure diagram)  Behavior –State machine (state machine diagram) –Activity (activity diagram) –Interaction (sequence/communication diagram) –Action language (snippets of code in model)

9 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 9 State Machines Features include:  Behaviors for: transition effects, state entry, do, exit  Composite states  Nested state machines  Concurrency (orthogonal states)  Transition guards  Conditionals (choice, junction) Integration with the Object Oriented Model:  Effect/entry/do/exit behaviors…  Guards… –…can access class attributes, call class operations, etc.  Triggers: –Operation calls –Attribute changes

10 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 10 Activity Diagrams – “Sophisticated Flowcharts” Features include:  Control flow  Data flow  Conditionals (choice node, guards)  Concurrency (fork & join)  Nested behavior calls  Data stores Integration with the Object Oriented Model:  (“Opaque”) actions – code snippets…  Guard expressions… –…can access class attributes, call class operations, etc.  Actions for: –Calling operations –Reading and modifying attributes –Sending signals –and more…

11 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 11 UML Behavioral Modeling  Structure: protocol, classes (capsules), ports and connectors  Behaviors (state machines, activities, interactions) –Stand-alone –Specify the implementation of operations –Specify the lifecycle of objects (capsules) –Specify state entry/do/exit behavior and transition effect  Code snippets (target language or platform independent) –Specify the implementation of operations –Specify state entry/do/exit behavior and transition effect –Activity actions –Guards (activity edge, state machine transition) Flexible  Very complex (almost as complex as code)

12 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 12 Action Language  Snippets of Code in the Model  Target language (Java, C++, C#) or its subset  Error prone, bound to specific target platform and compiler Already known language  Platform independent  New language to learn Makes the model retargetable, less error prone

13 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 13 Outline – UML Model Debugger  Introduction –Motivation –UML Behavioral Modeling –Action Language  UML Model Debugger –Debugging capabilities –Debugging perspective –Diagram animation  Testing –Model testing –Model-based testing (test generation)

14 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 14 Interactive Debugging  Traditional debugging –Running a main function –Hitting a breakpoint –Stepping –Observing values  Interactive debugging (model “exerciser”) –Creating instances –Invoking operations and behaviors, send signals –Hitting a breakpoint –Stepping –Observing values

15 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 15 Model Debugging Perspective DebugVariables Console Diagram Animation Signals Event Pools Instances Breakpoints I/O Snippet

16 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 16 Instances View  Dynamic debugging –Object creation and destruction –Method invocation Create New Instance Destroy Instance Instance Attribute Double-click to Invoke Operation

17 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 17 Debug View  Control and display granularity – model elements –State, Transition, Action, Edge, etc.  Supports concurrency in behaviors – stack trace is a tree Execution Stack Step (into, over, out) StopPauseResume Send Signal Broadcast Signal

18 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 18 Variables View  Similar to Eclipse debugging framework view Self Object Behavior attributes, local variables and parameters

19 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 19 Breakpoints View  Similar to Eclipse debugging framework view  Breakpoints –Statemachine: State, Transition, Entry, Do, Exit, Effect –Activity: Action “Do” Behavior State Transition

20 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 20 Event Pools View  Shows pending events in event the pools of active objects Pending Events

21 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 21 Signals and I/O Views Send and Broadcast Signal Buttons Double-click to send signal Signals History

22 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 22 Diagram Animation – State Machine Current State Execution Pending Running Transition Breakpoint

23 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 23 Diagram Animation – Activity Token Provider Offer Path Execution Pending

24 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 24 Outline – Testing  Introduction –Motivation –UML Behavioral Modeling –Action Language  UML Model Debugger –Debugging capabilities –Debugging perspective –Diagram animation  Testing –Model testing –Model-based testing (test generation)

25 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 25 Debugging – Model Interpretation  Simulation / Emulation (for debugging and understanding)  Recording of execution traces (assisted test generation) Model Debugger Test Generator Test Execution Environment UML Model Application Test / Trace Code Generation

26 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 26 Debugging – Generated Code  Execution monitoring and control  Execution trace animation  Trace analysis results visualization Model Debugger Test Generator Test Execution Environment UML Model Application Test / Trace Code Generation

27 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 27 Automatic Test Generation  Test is a sequence of stimuli and observations  Model is used as the oracle to predict the expected results  A bunch of tests is generated automatically according to provided criteria Model Debugger Test Generator Test Execution Environment UML Model Application Test / Trace Code Generation

28 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 28 Test Editing  Manual test creation using model-level terms  Editing of tests generated using the Test Generator or Model Debugger traces Model Debugger Test Generator Test Execution Environment UML Model Application Test / Trace Code Generation

29 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 29 Model Testing  Execution of tests on the model  Used for model regression testing and test-first modeling approach Model Debugger Test Generator Test Execution Environment UML Model Application Test / Trace Code Generation

30 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 30 Model Driven Testing of Applications  Execution of tests on the application  Transformation to concrete test execution environment Model Debugger Test Generator Test Execution Environment UML Model Application Test / Trace Code Generation

31 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 31 Testing Summary  Test creation –Manual (test editor) –Assisted (execution trace recording) –Automatic test generation  Model Testing –Execution of tests on the model –Used for model regression testing and test-first modeling approach  Model-Based Testing of Systems –Transformation to concrete test execution environment –Execution of tests on the application

32 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 32 Summary  MDD is a practical option for improving SW production and capitalizing on existing SW assets through: –Abstraction –Automation –Legacy modernization  UML Behavioral Modeling  Action Language  UML Model Debugger  Model testing  Model-based testing of applications

33 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 33 References  IBM Haifa Research Lab – Model Driven Engineering Technologies group http://www.research.ibm.com/haifa/dept/services/mdet.html  Model Debugger http://www.research.ibm.com/haifa/projects/software/ple/mex/index.html  Model Grokking http://www.research.ibm.com/haifa/projects/software/ple/grokking/index.html  UML http://www.uml.org/  Contacts: Andrei Kirshin, Dolev Dotan, Alan Hartman {kirshin,dotan,hartman}@il.ibm.com

34 Haifa Research Lab – Model Driven Engineering Technologies Group © 2008 IBM Corporation 34


Download ppt "© 2008 IBM Corporation Behavioral Models for Software Development Andrei Kirshin, Dolev Dotan, Alan Hartman January 2008."

Similar presentations


Ads by Google