eran gery vp development, i-logix israel · rhapsody: a pragmatic approach to model-driven...

22
www.ilogix.com Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel

Upload: others

Post on 26-Aug-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

www.ilogix.com

Rhapsody: A Pragmatic approach to Model-Driven

Development

Eran GeryVP Development,

I-Logix Israel

Page 2: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

2

www.ilogix.com

Presentation Outline

� Effective Model Driven Design – The Challenge� Rhapsody’s approach� Key elements of the solution� Summary

Page 3: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

3

www.ilogix.com

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

Page 4: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

4

www.ilogix.com

ModuleIntegration & Test

SystemAcceptance

(Sub-)System Integration & Test

.exe

.doc

.exe

.doc

Document Driven Development: In Theory …

Customer Requirements

RequirementsDocument

Analysis

SpecificationDocument

Design

Implementation

DesignSpecificationDocument centric Code centric

Page 5: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

5

www.ilogix.com

Document Driven Development: In practice

Costs ofDesign Changes

Time

InducedErrors

RequirementsCapture & Analysis

Analysis

SpecificationDocument

Design

Implementation

RequirementsDocument

DesignSpecification

ModuleIntegration & Test

SystemAcceptance

(Sub-)System Integraon & Test

.exe

.doc

.exe

.doc

Late iterations

?

Page 6: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

6

www.ilogix.com

SystemAcceptance

The solution: Fully associative Model-Driven Development

ModuleIntegration & Test

Implementation

Design

Requirements

Analysis

Mod

el R

epos

itory

Test scenarios

.exe

.doc

.exe

.docModel centric Code centric

construction validation

(Sub-)System Integration & Test

Page 7: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

7

www.ilogix.com

The Rhapsody Solution…

AutomatedApplication Generation

MDD withRhapsody

Model BasedDebugger

(Model Execution)

Application Modeling with

UML

Automated Model-

Based Testing

Model-CodeAssociativity

Page 8: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

8

www.ilogix.com

Utilizing UML for pragmatic development

� 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”)

� Rhapsody hosts the implementation languages to specify detailed behavior� action language

UML

UML/C++ UML/Java

Page 9: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

9

www.ilogix.com

Application modeling with UML2.0

Page 10: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

10

www.ilogix.com

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

Page 11: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

11

www.ilogix.com

Code Generation Architecture

(annotated)Source code

Programming Model(reduced UML)

Transform

Generate

ImplementationFramework definition

GenerationProfile properties

Structural Models Component ModelBehavioral Models

Build files

Code Recipe

TransformationRules

GenerationTemplates

Page 12: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

12

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

AbstractFramework

Fram eworkImpl2 FrameworkImpl1

RTOS & Middleware

LegacyCode

Application Framework

Generated Code

Page 13: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

13

www.ilogix.com

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

Page 14: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

14

www.ilogix.com

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

AnnotatedSource code

Parser Model builder

AbstractionTransformation

Model Merger

Programmingmodel

Abstract model

Applicationmodel

Generation Profile properties

Page 15: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

15

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

Page 16: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

16

www.ilogix.com

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

#include<t.h>#definemain {for (;;){}}

{while(iter){(++iter)ItsProgrammer(this);++iter }; itsCardionadremoveAll();}

<Trace

Control>

Page 17: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

17

www.ilogix.com

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

Page 18: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

18

www.ilogix.com

Pass Fail

% Completion

Stimulate...

...MonitorRhapsody

Test-Conductor

Test Suite

Test Cases

User specified or Recorded

Rhapsody Test Conductor

Test behavior execution and arbitration

Verdict

Page 19: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

19

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

Page 20: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

20

www.ilogix.com

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

Page 21: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

21

www.ilogix.com

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

� Rhapsody is currently used by thousands of engineers worldwide� Many success stories

AutomatedApplication Generation

MDD withRhapsody

Model BasedDebugger

Application Modeling with

UML

Automated Model-

Based Testing

Model-CodeAssociativity

Page 22: Eran Gery VP Development, I-Logix Israel · Rhapsody: A Pragmatic approach to Model-Driven Development Eran Gery VP Development, I-Logix Israel. 2 ... user can modify transformation

22

www.ilogix.com

The Visual Application Development Platform

For all embedded applications