Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA...

45
Executable UML for Model Driven Architecture

Transcript of Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA...

Page 1: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UMLfor

Model Driven Architecture

Page 2: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-252

Executable UML update

Raising the level of abstraction – Some history & benefits.

Executable UML and Model Driven Architecture (MDA)

PIM vs PSM Separation and PIM Adaptation.(separation of concerns)

Open translation of Executable UML models.(= model compilers)

More of everything!!! ...with less effort = lower costs(”extra allt” ☺ )

Page 3: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-253

Raising the level ofabstraction

Page 4: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-254

Raising the level of abstraction

19701970’’ss

19601960’’ss

19801980’’ss

19901990’’ss

20002000’’ss

HigherHigher--level languages and OO SW methods.level languages and OO SW methods.Some more efficient SW reuse enabled.Some more efficient SW reuse enabled.Writing & maintaining software gets more efficient.Writing & maintaining software gets more efficient.(moving away from CPU specific assembly)(moving away from CPU specific assembly)

SW programming tooling & compiler improvements. SW programming tooling & compiler improvements. (more, quicker, better)(more, quicker, better)

Increase of Model Based Development, followed by Java, Ada95 andIncrease of Model Based Development, followed by Java, Ada95 and C++.C++.(drawing some pictures and then write all code by hand)(drawing some pictures and then write all code by hand)

UML Model Based Development = drawing pictures & write target laUML Model Based Development = drawing pictures & write target language code in them.nguage code in them.““GenerateGenerate”” complete code with behavior from models complete code with behavior from models oror write all the code by hand.write all the code by hand.Models get tied to the underlying execution environment (platforModels get tied to the underlying execution environment (platform), hard to reuse.m), hard to reuse.

Increased reuse of larger target code libraries. Increased reuse of larger target code libraries. (example: Enterprise Java Beans)(example: Enterprise Java Beans)

The ShlaerThe Shlaer--Mellor Method for OOA evolves to Executable UML. Mellor Method for OOA evolves to Executable UML. (with an Action Language for UML)(with an Action Language for UML)Model Driven Architecture (MDA) introduced. Defines the importanModel Driven Architecture (MDA) introduced. Defines the importance of PIM vs. PSM separation.ce of PIM vs. PSM separation.

Executable UML models are runnable and testable without generatiExecutable UML models are runnable and testable without generating any code. ng any code. (~like PowerPoint)(~like PowerPoint)Platform Independent Models (PIM) translated to target code by MPlatform Independent Models (PIM) translated to target code by Model Compilers for different platforms.odel Compilers for different platforms.

Our Model Compilers becomes reusable largeOur Model Compilers becomes reusable large--scale assets for our platforms. scale assets for our platforms. (our competitive advantage)(our competitive advantage)

PIMPIM’’s becomes reusable larges becomes reusable large--scale components, possible to reuse across different platforms.scale components, possible to reuse across different platforms.

Assembly code dominates the embedded arena.Assembly code dominates the embedded arena.(hieroglyphs (hieroglyphs ””carved in stonecarved in stone”” = no real reuse)= no real reuse)

Page 5: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-255

Higher levels of abstraction - Benefits

Executable UML and MDA allows us to:– Express more functionality with less effort.– Focus on modeling functionality (not code).– Test more with less effort.– Reuse more with less effort.– Reduce the number of faults. (ref. snapshot TR’s)

Fly higher, better, faster and safer:– Higher degree of automation.– Higher degree of reuse.– Higher quality. (ref. Coverity for SW Quality & Security Analysis)

But there has always been a 10

But there has always been a 10--15 years 15 years

slack in slack in ““realreal”” acceptance & deployment

acceptance & deployment

of new technology. Why?

of new technology. Why?

Page 6: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-256

Higher degree of automation example

! ! ------------------------------------------------------------------------------------------------------------------------------2.4.4.1 Record Object InstrMeasCalcResult2.4.4.1 Record Object InstrMeasCalcResult------------------------------------------------------------------------------------------------------------------------------ !!record InstrMeasCalcResultFile;record InstrMeasCalcResultFile;

string variable IMCR_Mnemonic 7 ds string variable IMCR_Mnemonic 7 ds reloadreload static;static;variable IMCR_GMCA1 R ds;variable IMCR_GMCA1 R ds;variable IMCR_GMCA2 R ds;variable IMCR_GMCA2 R ds;variable IMCR_GMCB1 R ds;variable IMCR_GMCB1 R ds;variable IMCR_GMCB2 R ds;variable IMCR_GMCB2 R ds;variable IMCR_IsVisible 16 ds variable IMCR_IsVisible 16 ds reloadreload static;static;variable IMCR_AddWithOther 16 ds variable IMCR_AddWithOther 16 ds reloadreload static;static;variable IMCR_AddIndex 16 ds variable IMCR_AddIndex 16 ds reloadreload static;static;variable IMCR_Occurrences R ds;variable IMCR_Occurrences R ds;variable IMCR_Percentage R ds;variable IMCR_Percentage R ds;variable IMCR_SortIndex 16 ds;variable IMCR_SortIndex 16 ds;variable NOO_TotOccur (2) R ds;variable NOO_TotOccur (2) R ds;

end record;end record;

Sample PlexSample Plex--C code in AXEC code in AXE

Storage of data in a NonStorage of data in a Non--Volatile StorageVolatile Storage(important data that must survive a system restart, power failur(important data that must survive a system restart, power failure etc.)e etc.)

All required by the Plex-C designer is to mark the variable as reload.The Plex-C compiler and the AXE platform handles the rest.In AXE all data marked as reload is reloaded on system restart.

Sample model in Executable UMLSample model in Executable UML

All required by the model designer is to mark the variable as reload.

The Model Compiler handles the rest.All data marked as reload is reloaded from the file system on system restart.Verified on CPP node Q2-09.

Page 7: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-257

Executable UMLand

Model Driven Architecture(MDA)

Page 8: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-258

What is Executable UML?

Executable UML is a graphical specification language, combining a well-defined subset of UML with executable action semantics and rules for timing.An evolutionary stage of the Shlaer-Mellor Method.Executable UML Specifications are platform independent, can be run, tested and debugged much like a program but long before any code is generated.Executable UML models are translated into design by application independent Model Compilers.Executable UML = executable models without generating code (= execute models right out of the repository).In Mentors xtUML: x = Executable and t = Translatable

Page 9: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-259

Plug-In of Interface Compatible xtUML Models

(leaf-components) DOMAIN LEVEL

The ”old”Domain Chart

RNC, RBS, MediaGateWay, HLR, Cellular Phone etc.

Radio Access Network (RAN)

SYSTEM PART LEVEL

The system and its parts

NETWORK LEVEL

NODE LEVEL

SYSTEM LEVELExecution on all levels.

Execution on all levels.

Executable UML Specifications

Page 10: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2510

UML Forum - Robot Contest in Tokyo

Robot contest in full swing

Leon Starr - www.modelint.comReviewing robot contest descriptions

The globetrotter

Page 11: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2511

xtUML Translation according to MDA

PIM

PSM

Platform

C++C++C++JAVAJAVAJAVA

VHDLVHDLVHDLErlangErlangErlang PLEXPLEXPLEX

CCC

ISISIS AXEAXEAXE CPPCPPCPP TSPTSPTSP

Application ModelsApplication ModelsApplication Models

Model Driven ArchitecturePlatform Independent Models (PIM) are translated into design through Platform Specific Models (PSM).

Platform Independent ModelThe application models are free from implementation (design) details and fully reusable across different existing and future platforms and for different SW/FW/HW design alternatives.

Platform Specific ModelPopulated metamodel of the software architecture. (the “PSM metamodel”)

The translator becomes the expert system for how to generate the most efficient code for the target platform.Embeds target language and platform expertise, best design practices etc.

The above has been conceptually proven in Ericsson projects.

Page 12: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2512

Example PIM by Steve Mellor

Page 13: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2513

Translation to different platforms

ErlangErlang PlexPlex--C for APZ 21230/C for APZ 21230/--3333

JavaJavaC/C++ for Windows, OSE & LinuxC/C++ for Windows, OSE & Linux

Translating the same xtUML model using different Model CompilersTranslating the same xtUML model using different Model Compilers

Page 14: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2514

Translation to different platformsVHDL for simulation in ModelSimVHDL for simulation in ModelSim

Page 15: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2515

PIM vs PSM Separation

(separation of concerns)

Page 16: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2516

PIM vs PSM Separation

If the purpose of the PIM is the ability to implement it on multiple target platforms and execution environments, to achieve a cost efficient reuse across different platforms, it is of utmost importance to keep the PIM free from PSM concepts.(= separation of concerns)

That way we separate the definition of the solution to the problem (PIM) from the definition of its implementation (PSM), handled as separate subject matters.

What we then get is a Generic Component that can run on different platforms.

The PIM provides clean (PIM’ish) interfaces with clear protocols to the outside world and makes no assumptions on execution environment, target platform or other lower level design details, like programming language stuff.

The PSM on the other hand knows about CPU cores, shared memory, Operating System, middleware resources, target programming language etc.

Page 17: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2517

PIM vs PSM SeparationWe define our PIM component with clear interfaces & protocols. (defined sequences)We build static structures and define behaviour with State Machines & Action Language.The developers focus only on modeling the functionality. (not on modelling the code)The weather inside the PIM is nice and sunny – It’s a happy world, free from PSM stuff.

PIMWe also model atest environmentand run ourtest cases byexecuting thePIM itself toverify its behavior.

Request

Request

Response

Response

We now have aPIM that we needto integrate withlegacy interfacesin a legacyenvironment,which basicallyalways is the case.

We can do thisintegration indifferent ways.

Page 18: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2518

1) Adding PSM concepts to the PIM

PIMX

We can start adding PSM concepts to the model to capture the PSM view of the problem.We may also add programming language code, make Operating System calls etc.We tie the PIM closer to the underlying target platform, thus short circuiting the PSM.Our PIM is wrecked and can not be reused on different platforms in a cost efficient way.

Each time thePSM conceptsare updated weneed to createa new versionof our model.

We may end upwith differentmodels for thesame thing butfor differentplatforms, or fordifferent versionsof a platform.

This basicallymeans no real,efficient reuse.

(mostly rework)

Page 19: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2519

2) Preserving the PIM vs PSM SeparationBuild an Adaption Layer outside the PIM for handling the interface adaptations.This will keep the PIM free from PSM pollution and stay reusable across different platforms.On the PIM side we don’t care how the adaptations are made, only that they are! (but not by the PIM)The Adaptation Layer itself is platform specific and not designed for reuse on other platforms.

PIMXPIM

When adding newadaptations wedo not needto updatethe PIM.

Whentesting newadaptions wedo not need toretest the PIM.

Keeping adaptionsseparated fromthe PIM means

that cross-platformreuse of

the PIM ispreserved.

Adaptationsneeds to be

updated onlywhen interfaces

are updated.

Page 20: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2520

PIM Adaption LayerThe Adaptation Layer is designed separate from the PIM, with tailor made parts for each interface.Some interface adaptations are very simple, while other are more complex and will require some more complex solutions, or combinations of solutions. (new marks, model compiler updates, glue code etc.)The complexity of each adaptation mainly depends on how good or bad the interfaces match.

PIM

Modelled adaptation.

Probably has PSMrelated conceptsin it, but canbe modelled,run andtested justlike a PIM.

Hand writtenglue code is simpleand straight forward,but may require somecomplex logic.

On a perfect interface matchthe adaptation is very thin.

Only a simple wiring straightto the legacy interfaces.

More complexadaptations may

require combinedsolutions, and alsoinclude updates of

the model compiler.

Match ?

Page 21: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2521

PIM Adaption Layer

If adaptations are modelled in Executable UML *, they can be tested on hostby running them. (just like you run PowerPoint slides)

If all adaptions are modelled, the Executable UML * PIM can be tested on host by running it, with or without the Adaption Layer.

A modelled Adaption Layer containing PSM related concepts in it is really aPlatform Adapted Model. ( PAM )

Any modelled and platform-adapted-PIM with PSM stuff in it is really a PAM,and such models are not really designed for reuse across different platforms.

A model one may think is a PIM, but which has been polluted with PSM related constructs and dependencies e.g. for splitting some processing on a multi-coreplatform (or any other PSM-constructs for that matter) is really a PAM.

Such PSM-style constructs should better be handled by an Adaption Layerdesigned for the multi-core platform. But it can be modelled! ☺

* = Executable UML - A Foundation for Model-Driven Architecture – Mellor/Balcer - ISBN: 0201748045

Page 22: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2522

Executable UMLModel Translation

Page 23: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2523

xtUML Model Translation

The /// Model Compiler

xtUML Modeling & Translation

xtUML Runtime (VM)

instance value

messagequeue

stack

xtUML Repository

class attribute

datatype

transition

event

state

xtUML Modeling & Testing

BridgePoint UML Suite

PIM

Modeled Test env.for Model BasedRegression Tests

PIM

ApplicationModel

Host or Target Platform

Platform Specific Code

Marks Model compilationflags for tuning ofperformance etc.

PSCPSCPSCPSCPSCPSCPSC

CompiledExecutable

Runtime coverageinformation forPIM Model BasedTest Coverage

(supported by theModel Compiler)

Action Lang.State andTransitionCoverage

TranslationRules

DesignPatterns

xtUML VM

TranslationDatabase

+

MetamodelxtUML

ModelMarking

MetamodelPSM

Page 24: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2524

Performance Benchmarking

Performance is key!

MDD is of limited use if it doesn't meet the performance requirements (budget) for real-time critical applications.

Low performance of the generated code drives the manufacturing costs for HW.

This is the main reason to why performance benchmarking is one of the first things our Design Units do.

Page 25: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2525

AAL2 Performance Comparison:Hand-coded vs. BridgePoint xtUML(AAL2 Setup & Release)

0

1

2

3

4

5

6

7

8

9

CPU Load%

xtUML 1st attempt xtUML 1st opt. xtUML 2nd opt. Original AAL2 NCC

9%72 us/conn.

7.5%59 us/conn.

6.3%51 us/conn.

6%48 us/conn.

Benchmarking against 10 year old existing code

Benchmarking against 10 year old existing code

Page 26: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2526

Benchmarking newly developed SW

A new SW function was developed in multiple tracks:– Hand-written C++ (synchronous design)– Modelled using Executable UML (Shlaer-Mellor UML+AL)– Modelled using UML with C++ (not ready yet)

The C++ was functionally tested both on host and target.

The Executable UML model was developed in BridgePoint xtUML and was functionally tested on host using a modelled test environment of Scenario Players controlled by a Conductor.

100% of the code was generated from the xtUML model.(some minor glue code was written by hand)

TheThe Radical SW PilotRadical SW Pilot @ Ericsson PDU CPP@ Ericsson PDU CPP

Page 27: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2527

Modelled UDPSH Component

Page 28: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2528

Some UDPSH Class & State Diagr.

Request Flow Response Flow

Page 29: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2529

Model Compiler Enhancements

AAL2 Pilot enhancements:– Architectural optimizations (reduces memory costs)– Improved state machine scheduling (improves performance)– Support for Linux and nxtOSEK

Radical SW Pilot enhancements:– Auto-alignment of data struct members (reduces memory costs)– Single job execution (reduces memory costs)– Architectural optimizations (reduces memory costs)– “Follow the leader” scheduling (improves performance)– Synchronous state machine execution (improves performance)– Support for Model Based Test Coverage

Ericsson Proprietary Model CompilerEricsson Proprietary Model Compiler

Page 30: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2530

UDPSH BridgePoint xtUML version:Model Based Test Coverage

0102030405060708090

100

Coverage%

Action Language Else-branch States Transitions

90%

64%

96%

85%

The else-branch coverage indicates the amount of alternative execution paths tested in the Action Language code.

Tested using Model Based Regression TestTested using Model Based Regression Test(modelled test scenario players)(modelled test scenario players)

Page 31: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2531

UDPSH Traffic Load Test Cases

TC3: 600 sess/secP2b: sess in exist grP1c: 3000s in 3000gr10

TC3: 600 sess/secP2a: sess in new grP1c: 3000s in 3000gr9

TC1: 1500 sess/secP2b: sess in exist grP1b: 1500s in 1500gr8

TC1: 1500 sess/secP2a: sess in new grP1b: 1500s in 1500gr7

TC1: 1500 sess/secP2b: sess in exist grP1a: 1500s in 50gr6

TC1: 1500 sess/secP2a: sess in new grP1a: 1500s in 50gr5

TC2: 2500 sess/secP2b: sess in exist gr-4

TC2: 2500 sess/secP2a: sess in new gr-3

TC1: 1500 sess/secP2b: sess in exist gr-2

TC1: 1500 sess/secP2a: sess in new gr-1

Load TestPre-condition 2Pre-condition 1Test #

Static load in memory Runtime load

Page 32: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2532

UDPSH Traffic Load Test Case

Client #Client #

msms

55

44

33

22

11

100100 200200 300300 400400 500500 600600 700700 800800 900900 10001000

Burst #Burst #00 11 22 33 44 55 66 77 88 99

ttss+t+tdd

ttss+t+tdd

ttss+t+tdd

ttss+t+tdd

ttss+t+tdd

5 clients setting up sessions in 10 different groups with 50 ses5 clients setting up sessions in 10 different groups with 50 sessions each = 2500 sessions per sec.sions each = 2500 sessions per sec.

Page 33: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2533

UDPSH Performance BenchmarkingTest Case 3

0

1

2

3

4

5

6

7

CPU Load%

Hand-coded C++ BridgePoint UML+AL UML with C++

7.0%

6.0%

? %

5 clients setting up sessions in 5 clients setting up sessions in new groupsnew groups, load is 2500 sessions/sec, load is 2500 sessions/secWorstWorst--case CPU load for these 10 test casescase CPU load for these 10 test cases

not ready yet

not ready yet

Page 34: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2534

UDPSH Performance BenchmarkingTest Case 9

0100200300400500600700800900

1000

MemoryUtilization

Stat & HeapKB

Hand-coded C++ BridgePoint UML+AL UML with C++

901 KB 908 KB ? KB

5 clients setting up sessions in 5 clients setting up sessions in new groupsnew groups, load is 600 sessions/sec, load is 600 sessions/secStatic preStatic pre--condition load is 3000 sessions in 3000 groupscondition load is 3000 sessions in 3000 groups

WorstWorst--case memory cost for these 10 test casescase memory cost for these 10 test cases

not ready yet

not ready yet

Page 35: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2535

HOT POTATO test: Sending datapackets between state machines

Full tests was performed on different HW platforms & OSFull tests was performed on different HW platforms & OS’’es.es.(PowerPC vs. Intel and OSE vs. Linux SW/HW platforms)(PowerPC vs. Intel and OSE vs. Linux SW/HW platforms)

Ping ( data )

Pong ( data )

Single thread

Single core

or...

Dual thread

Dual core

Page 36: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2536

HOT POTATO signalling benchmark:BridgePoint vs. a UMLwithC++ tool

0

5

10

15

20

25

Round-triptime in us

BridgePoint single thread

BridgePoint dual thread

UMLwithC++ tool single thread

UMLwithC++ tool dual thread

0.72 us1.9 us

3.6 us

21.0 us

Signalling between modelled state machines using 100 Byte packagSignalling between modelled state machines using 100 Byte packages.es.(platform is 8572 with Monta Vista Linux)(platform is 8572 with Monta Vista Linux)

single core single core

Page 37: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2537

HOT POTATO signalling benchmark:BridgePoint vs. a UMLwithC++ tool

0

0,5

1

1,5

2

2,5

3

3,5

4

4,5

Round-triptime in us

BridgePoint single thread

BridgePoint dual thread

UMLwithC++ tool single thread

UMLwithC++ tool dual thread

0.11 us 0.36 us

0.47 us

4.5 us

Signalling between modelled state machines using 100 Byte packagSignalling between modelled state machines using 100 Byte packages.es.(platform is (platform is ““monster machinemonster machine”” 5570/Sles/gcc64)5570/Sles/gcc64)

dual core single core

Page 38: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2538

BridgePoint runtime call graph

Proprietary xtUML Model Compiler tailor made for small footprint & highest performance.

Page 39: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2539

UMLwithC++ tool runtime call graph

Off-the-shelf UML C++ code generator with adapted runtime system.

Page 40: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2540

More of everything withExecutable UML & MDA

(”extra all” ☺ )

Page 41: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2541

History of xtUML success stories

RBS: PP Adapter – adapting existing RoseRT legacy to new HW platform– Developed by a trainee in parallel with an RBS hand-coding team.– Running all 30+ Use Cases on target in the Cello lab before the

hand-coding team had written a single line of code. (= agile)

RNC: Load Control – preventing overload situations in the RNC– Re-engineered by thesis students at RNC Design.– Worked on 1st attempt on target. (“has never happened before”)– Benchmarked against the existing & optimized RoseRT solution.

DUPL: The AAL2 pilot– Developed by senior engineers not programmed for ~15 years.– No faults on target.– Benchmarked against existing 10 year old & optimized solution.

(load module sent to Croatia for testing)

PDU CPP: Radical SW pilot – the UDPSH function– Worked on target right away.– Equal in performance and memory utilization

with the newly hand-written C++ version.– Has been run on different HW with OSE and Linux.

(as a UDPSH + TestBench monolith)

Page 42: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2542

History of xtUML success stories

”Surprisingly” high quality of software.– Typically no faults on target.– Coverity did not find any problems in generated code.

Equal in performance with hand-optimized code.– Results from benchmarking of CPU load.

Re-factoring is easier than expected.– Need a modelled test bench for re-testing the re-factored model.

Full control of the entire code generation process.– Flexibility to alter code generation whenever needed.– Not dependent on tool vendor.

Page 43: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2543

Conlusions

Increasing the level of abstraction not necessarily means getting a reduction in performance. (= old myth killed)

It depends primarily on how good the Model Compiler is.(provided that the model not is ”badly” designed)

We must learn to ”trust” & develop Model Compilers and learn how to develop & provide additional support & value for our proprietary platforms and reduce the costs for HW.

It’s time to stop just talking about it, because...

Page 44: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2544

Page 45: Executable UML for Model Driven Architecture · 2 Executable UML, BridgePoint, xtUML and MDA 2010-11-25 Executable UML update Raising the level of abstraction – Some history & benefits.

Executable UML, BridgePoint, xtUML and MDA 2010-11-2545