Presentation

Rhapsody: A Pragmatic
approach to Model-Driven
Development
Eran Gery
VP Development,
I-Logix Israel
www.ilogix.com
2
Presentation Outline
Effective Model Driven Design – The Challenge
Rhapsody’s approach
Key elements of the solution
Summary
www.ilogix.com
3
MDD - current status…
MDD has a big premise
Improve Productivity
Improve Reuse of IP
Improve Quality impact
BUT only a minority of SW developers use MDD effectively
throughout the entire lifecycle…
Historically, there have been 3 common approaches to MDD
High-level design
Documentation tool
Minor impact
“Structural modeling” – code skeletons
Frequently phases out as design progresses… again minor impact
Model Centric - unidirectional
Generates behavioral “black box” code
Hard to deploy
Minor impact on the industry
www.ilogix.com
Document Driven Development: In Theory …
Customer
Requirements
System
Acceptance
Requirements
Document
Analysis
(Sub-)System
Integration & Test
Specification
Document
.exe
.doc
Module
Integration & Test
Design
Document centric
Design
Specification
.exe
.doc
Code centric
Implementation
www.ilogix.com
4
5
Document Driven Development: In practice
Costs of
Design
Changes
Induced
Errors
Time
Requirements
Capture & Analysis
System
Acceptance
Requirements
Document
Analysis
(Sub-)System
Integraon & Test
Specification
Document
?
.exe
.doc
Module
Integration & Test
Design
Design
Specification
.exe
Late iterations
.doc
Implementation
www.ilogix.com
The solution: Fully associative Model-Driven Development
validation
construction
Test scenarios
Model Repository
Requirements
Analysis
(Sub-)System
Integration & Test
.exe
.doc
Module
Integration & Test
Design
Model centric
System
Acceptance
.exe
Implementation
Code centric
.doc
www.ilogix.com
6
7
The Rhapsody Solution…
Automated
Application
Generation
Application
Modeling with
UML
Model Based
Debugger
(Model Execution)
MDD with
Rhapsody
Automated
ModelBased Testing
Model-Code
Associativity
www.ilogix.com
Utilizing UML for pragmatic development
8
UML has evolved as a “pragmatic” modeling
framework
Effective for code centric “C++ in pictures”
Supports high level architectural and behavioral
abstractions
Integrates a profiling mechanism to derive domain
specific models
Rhapsody utilizes several profiles to carry out
effective development
E.g. C/C++/Java
Facilitates bi-directional flow
Language based expressions (“actions”)
UML
UML/C++
UML/Java
Rhapsody hosts the implementation languages to
specify detailed behavior
action language
www.ilogix.com
Application modeling with UML2.0
www.ilogix.com
9
10
Code Generation
Generates a complete executable application
Employs all structural and behavioral model semantics
Object structure construction
Statecharts
Activity graphs
All data required to build the application
Customizable code generation
Lightweight (“parametric”)
Heavyweight – user can modify transformation rules
Supports “Code centric” workflow
Generation respects detailed non-model related changes
E.g. change of order as defined by the coder
Incremental
Instant update of code per any model change
www.ilogix.com
11
Code Generation Architecture
Behavioral Models
Structural Models
Implementation
Framework
definition
Component Model
Transform
Generation
Profile properties
Programming Model
(reduced UML)
Transformation
Rules
Generation
Templates
Generate
Code Recipe
Build
files
(annotated)
Source code
www.ilogix.com
The Real-Time Application Framework
A set of integrated services providing execution semantics
Provides infrastructure for the code generator
Services also called from action code
Encapsulates the software platform – does not replace it
User can modify the framework implementation
Functionality
Multithreaded event driven patterns
Threading and synchronization
Memory management
Data structures (containers)
IPC
Legacy
Code
Ab stractFra me work
Fram eworkImp l2
FrameworkImp l1
Generated Code
Application Framework
RTOS & Middleware
www.ilogix.com
12
Dynamic Model-Code Associativity
Online bidirectional
synchronization of the code
with the model
Main bridge between code
and model centric activities
Open system experience
Direct reflection of the
implementation domain
Fine grain manipulation of
the implementation
Avoid the a-priory tradeoff
“coding” vs. modeling
www.ilogix.com
13
14
The CodeReverser architecture
Synchronizes changes
at code level back to the
model
Reverses the operation
of the code generator
Activated upon
completion of source
code editing
Similar flow is used for
RE of legacy code
Annotated
Source code
Parser
Model builder
Programming
model
Generation Profile
properties
Abstraction
Transformation
Application
model
Abstract
model
Model Merger
www.ilogix.com
Model based debugging (or Model Execution)
Reflecting the
application runtime
state as a model state
Driving the application
from the model
Instrumental for
maintaining MDD
workflow
www.ilogix.com
15
16
Model Execution/Debug approach
Based on tracing of the generated application
The UML model is augmented by a runtime model
A trace protocol updates the runtime model
Animation: the runtime model is projected on the system model
views
Execution control achieved by control protocol
Open architecture: trace protocol API can be used with any custom
generator
Advantages of the approach
Validation of the actual application
Portable - Independent of the target platform
Design level debug on target with HW in the loop
Concurrent source-level and model-level debugging
<Trace
Control>
#include<t.
h>
{while(iter
) #define
main {
{(++iter)
for (;;)
ItsProgramm
er{}
}
(this);
++iter };
itsCardiona
d
removeAll()
;}
www.ilogix.com
17
Model Based Testing
Testing also benefits from MDD…
Modeling of test cases
Reuse use case specifications as test cases
Visualizing test results
Automatic generation of test data from behavioral models
Rhapsody offer two test technologies
Test Conductor – Modeling and execution of tests
ATG – automatic generation of test data
www.ilogix.com
18
Rhapsody Test Conductor
Test Suite
Test behavior
execution and
arbitration
Stimulate...
Rhapsody
...Monitor
TestConductor
% Completion
Test Cases
User specified
or Recorded
Verdict
Pass
Fail
www.ilogix.com
Rhapsody ATG - Model driven test generation
Automatic generation test cases with high coverage of the model
behavioral space
Based on hubristic state space
exploration
An extension of Spin´s state-space
compression techniques to cover mixed
explicit-symbolic representations
Covers states, transitions, operations,
generation of events
Identifies cases for potentially dead
portions of the model
Can be used for
Validating scenarios of a specification
model against a design model
Unit test of a design component
www.ilogix.com
19
20
And there’s more…
To make a complete development system more capabilities are
needed…
Collaborative development support
Model diff/merge
CM integration
IDE Integration
Seamless integrations with coding IDEs (e.g. eclipse)
Virtual prototyping and web enablement
Webify toolkit
Customization
Various options for automation scripts
Document generation
Rhapsody reporter
www.ilogix.com
21
Summary
We have presented an MDD approach which
provides
Model centric and code centric design flows
Tuning to the proper level of abstraction
Automates generation of fully functional
applications
Maintains consistency between model and code
representations
Leverages model abstractions for debugging
Leverages model for testing automation
Application
Modeling with
UML
Automated
Application
Generation
Model Based
Debugger
MDD with
Rhapsody
Automated
ModelBased Testing
Model-Code
Associativity
Rhapsody is currently used by thousands of
engineers worldwide
Many success stories
www.ilogix.com
22
The Visual Application Development Platform
For all embedded
applications
www.ilogix.com