Presentation is loading. Please wait.

Presentation is loading. Please wait.

Behavioral Models for Software Development

Similar presentations


Presentation on theme: "Behavioral Models for Software Development"— Presentation transcript:

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

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 Model driven development is a game-changing new paradigm for software development. Modeling raises the level of abstraction and increases the automation of the production of software development artifacts. Models and model transformations provide the key to increased productivity, higher levels of software quality, and a more 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. This allows for early debugging of incompletely specified models of a system. We also discuss the proposals for a platform independent action language to describe behavior in UML models.

3 Outline Introduction UML Model Debugger Testing Motivation
UML Behavioral Modeling Action Language UML Model Debugger Debugging capabilities Debugging perspective Diagram animation Testing Model testing Model-based testing (test generation)

4 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)

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

6 Behavioral Modeling Toolset
Traditional Software Development Model Driven Development IDE Modeling Tool Code Debugger Model Debugger Compiler Model Transformation

7 Executable Specification
MDD and Model Debugger Model Debugger Executable Specification (e.g. code) Executable Model Runtime Transformation Execution Identify defects at a much higher level of abstraction, earlier in the development cycle

8 Modeling with UML Structure Behavior 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 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 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 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) Activity actions Guards (activity edge, state machine transition)  Flexible  Very complex (almost as complex as code)

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 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 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

15 Model Debugging Perspective
Variables Breakpoints Event Pools Instances Diagram Animation Console Snippet Signals I/O

16 Double-click to Invoke Operation
Instances View Create New Instance Destroy Instance Dynamic debugging Object creation and destruction Method invocation Instance Attribute Double-click to Invoke Operation

17 Debug View Control and display granularity – model elements
Execution Stack Step (into, over, out) Stop Pause Resume Send Signal Broadcast Signal Control and display granularity – model elements State, Transition, Action, Edge, etc. Supports concurrency in behaviors – stack trace is a tree

18 Behavior attributes, local variables and parameters
Variables View Self Object Behavior attributes, local variables and parameters Similar to Eclipse debugging framework view

19 Breakpoints View Similar to Eclipse debugging framework view
“Do” Behavior State Transition Similar to Eclipse debugging framework view Breakpoints Statemachine: State, Transition, Entry, Do, Exit, Effect Activity: Action

20 Event Pools View Shows pending events in event the pools of active objects Pending Events

21 Send and Broadcast Signal Buttons Double-click to send signal
Signals and I/O Views Send and Broadcast Signal Buttons Double-click to send signal Signals History

22 Diagram Animation – State Machine
Running Transition Execution Pending Current State Breakpoint

23 Diagram Animation – Activity
Execution Pending Token Provider Offer Path

24 Outline – Testing Introduction UML Model Debugger Testing Motivation
UML Behavioral Modeling Action Language UML Model Debugger Debugging capabilities Debugging perspective Diagram animation Testing Model testing Model-based testing (test generation)

25 Debugging – Model Interpretation
UML Model Application Code Generation Test Generator Model Debugger Test Execution Environment Test / Trace Simulation / Emulation (for debugging and understanding) Recording of execution traces (assisted test generation)

26 Debugging – Generated Code
UML Model Application Code Generation Test Generator Model Debugger Test Execution Environment Test / Trace Execution monitoring and control Execution trace animation Trace analysis results visualization

27 Automatic Test Generation
UML Model Application Code Generation Test Generator Model Debugger Test Execution Environment Test / Trace 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

28 Test Execution Environment
Test Editing UML Model Application Code Generation Test Generator Model Debugger Test Execution Environment Test / Trace Manual test creation using model-level terms Editing of tests generated using the Test Generator or Model Debugger traces

29 Test Execution Environment
Model Testing UML Model Application Code Generation Test Generator Model Debugger Test Execution Environment Test / Trace Execution of tests on the model Used for model regression testing and test-first modeling approach

30 Model Driven Testing of Applications
UML Model Application Code Generation Test Generator Model Debugger Test Execution Environment Test / Trace Execution of tests on the application Transformation to concrete test execution environment

31 Testing Summary Test creation Model Testing
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 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 References IBM Haifa Research Lab – Model Driven Engineering Technologies group Model Debugger Model Grokking UML Contacts: Andrei Kirshin, Dolev Dotan, Alan Hartman

34


Download ppt "Behavioral Models for Software Development"

Similar presentations


Ads by Google