Executable UML for Model Driven Architecture

Similar documents
Executable UML for Model Driven Architecture

First To Market through Translation of Executable UML

Open Code Translation from Executable UML Models

Role of Executable UML in MDA. Presented by Shahid Alam

MDA Driven xuml Plug-in for JAVA

Model Driven Development with xtuml and BridgePoint

System Level Design with IBM PowerPC Models

An Introduction to Model Driven Engineering (MDE) Bahman Zamani, Ph.D. bahmanzamani.com

Model-Based Development of Embedded Systems with MDA and xtuml

Overview of lectures today and Wednesday

CSE 333 Lecture 1 - Systems programming

Applying UML Modeling and MDA to Real-Time Software Development

15 Sharing Main Memory Segmentation and Paging

Practical Model-Driven Development with the IBM Software Development Platform

MDSE USE CASES. Chapter #3

Model Driven Architecture and Rhapsody

OMG Workshop MDA. Tool Chains for MDA? Let's consider leaving our tool chains behind us.

CSE 333 Lecture 1 - Systems programming

16 Sharing Main Memory Segmentation and Paging

What is Software Architecture

Introduction. A Brief Description of Our Journey

ORACLE SERVICES FOR APPLICATION MIGRATIONS TO ORACLE HARDWARE INFRASTRUCTURES

The Model Driven (R)evolution. Richard Mark Soley, Ph.D. Chairman and CEO Object Management Group, Inc.

CAS 703 Software Design

Modeling and SW Synthesis for

!MDA$based*Teaching*and* Research*in*Software*Engineering*!

Computation Independent Model (CIM): Platform Independent Model (PIM): Platform Specific Model (PSM): Implementation Specific Model (ISM):

Model driven Engineering & Model driven Architecture

Virtual Memory #2 Feb. 21, 2018

Methods for the Development

Raising the Level of Development: Models, Architectures, Programs

Erlang. Joe Armstrong.

Model-Based Techniques in the Development of Net-Centric Applications. Timothy A. Anderson Basil C. Krikeles. June 20, 2007

Building a Multi-Language Interpreter Engine

xtuml: Current and Next State of a Modeling Dialect

CPS 310 first midterm exam, 10/6/2014

Industrial Embedded Systems - Design for Harsh Environment -

Testing. in A Large scale agile Development Environment

MDA and Integration of Legacy Systems: An Industrial Case Study

developer.* The Independent Magazine for Software Professionals

Four Components of a Computer System

Hardware OS & OS- Application interface

PRISMTECH. Benchmarking OMG DDS for Large-scale Distributed Systems. Powering Netcentricity

DEEP DIVE WHITE PAPER

The PISA Project A Model Driven Development case study

Block Device Scheduling. Don Porter CSE 506

Block Device Scheduling

Computer Network Protocols: Myths, Missteps, and Mysteries. Dr. Radia Perlman, Intel Fellow

Page 1. Logistics. Introduction to Embedded Systems. Last Time. ES Software Design. Labs start Wed CS/ECE 6780/5780. Al Davis

Lecture 4: Memory Management & The Programming Interface

STARCOUNTER. Technical Overview

Applying MDA to Constrained Environments

Handout 4 Memory Hierarchy

(The obligatory second slide)

Reliable File Transfer

Model-Driven QoS Provisioning Techniques for CCM DRE Systems

21ST century enterprise. HCL Technologies Presents. Roadmap for Data Center Transformation

We made it! Java: Assembly language: OS: Machine code: Computer system:

Integration With the Business Modeler

Outline. Threads. Single and Multithreaded Processes. Benefits of Threads. Eike Ritter 1. Modified: October 16, 2012

CPSC 341 OS & Networks. Introduction. Dr. Yingwu Zhu

Develop Unified SNMP, XML, CLI, and Web-based Management for Embedded Real-Time Systems with MIBGuide

Welcome to Lab! Feel free to get started until we start talking! The lab document is located on the course website:

Sista: Improving Cog s JIT performance. Clément Béra

Managing Change and Complexity

Profiling and Debugging OpenCL Applications with ARM Development Tools. October 2014

The Need for Speed: Understanding design factors that make multicore parallel simulations efficient

Block Device Scheduling. Don Porter CSE 506

ECE 598 Advanced Operating Systems Lecture 22

CBDIReport. Service Oriented Architecture and OptimalJ. 1 Introduction. 2 Service Oriented Architecture. 3 The Business Services Bus

Execution of UML models Present and Future of Research and Practice

From MDD back to basic: Building DRE systems

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

UML for Embedded Systems IV. Validation

BEAMJIT: An LLVM based just-in-time compiler for Erlang. Frej Drejhammar

OpenVMS migration to i4 and beyond

Functional Programming and the Web

Lecture 4: Threads; weaving control flow

Scaling Up Performance Benchmarking

Scheduling Mar. 19, 2018

Java Embedded on ARM

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 15: Caching: Demand Paged Virtual Memory

Design of Embedded Systems

Static Analysis of Embedded C

Rsyslog: going up from 40K messages per second to 250K. Rainer Gerhards

CS252 S05. Main memory management. Memory hardware. The scale of things. Memory hardware (cont.) Bottleneck

Examples. Object Orientated Analysis and Design. Benjamin Kenwright

JANUARY 28, 2014, SAN JOSE, CA. Microsoft Lead Partner Architect OS Vendors: What NVM Means to Them

Implementing Scheduling Algorithms. Real-Time and Embedded Systems (M) Lecture 9

Chapter 5. Large and Fast: Exploiting Memory Hierarchy

HSA Foundation! Advanced Topics on Heterogeneous System Architectures. Politecnico di Milano! Seminar Room (Bld 20)! 15 December, 2017!

JBuilder 2008 also now has full support for Struts 1.x applications including graphical editing and Web flow development.

CSCI 1010 Computer Science Orientation Introduction to version control

Model Driven Architecture

Last class: OS and Architecture. OS and Computer Architecture

Last class: OS and Architecture. Chapter 3: Operating-System Structures. OS and Computer Architecture. Common System Components

ERLANG EVOLVES FOR MULTI-CORE AND CLOUD ENVIRONMENTS

Agenda. Introduction FPGA DSP platforms Design challenges New programming models for FPGAs

(if you can t read this, move closer!) The high-performance protocol construction toolkit. Peter Royal

Data Centers and Cloud Computing. Slides courtesy of Tim Wood

Transcription:

Executable UML for Model Driven Architecture

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

Raising the level of abstraction 3

Raising the level of abstraction PIM s s becomes reusable large-scale components, possible to reuse across different platforms. Our Model Compilers becomes reusable large-scale assets for our platforms. (our competitive advantage) Executable UML models are runnable and testable without generating ng any code. (~like PowerPoint) Platform Independent Models (PIM) translated to target code by Model M Compilers for different platforms. 2000 s The Shlaer-Mellor Method for OOA evolves to Executable UML. (with an Action Language for UML) Model Driven Architecture (MDA) introduced. Defines the importance of PIM vs. PSM separation. Increased reuse of larger target code libraries. (example: Enterprise Java Beans) UML Model Based Development = drawing pictures & write target language code in them. Generate complete code with behavior from models or write all the code by hand. Models get tied to the underlying execution environment (platform), hard to reuse. Increase of Model Based Development, followed by Java, Ada95 and C++. (drawing some pictures and then write all code by hand) 1990 s 1980 s 1970 s 1960 s SW programming tooling & compiler improvements. (more, quicker, better) Higher-level languages and OO SW methods. Some more efficient SW reuse enabled. Writing & maintaining software gets more efficient. (moving away from CPU specific assembly) Assembly code dominates the embedded arena. (hieroglyphs carved in stone = no real reuse) 4

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. But there has always been a 10-15 15 years slack in real acceptance & deployment of new technology. Why? Higher quality. (ref. Coverity for SW Quality & Security Analysis) 5

Higher degree of automation example Storage of data in a Non-Volatile Storage (important data that must survive a system restart, power failure e etc.) Sample Plex-C C code in AXE Sample model in Executable UML! --------------------------------------------------------------- 2.4.4.1 Record Object InstrMeasCalcResult ---------------------------------------------------------------! record InstrMeasCalcResultFile; string variable IMCR_Mnemonic 7 ds reload static; variable IMCR_GMCA1 R ds; variable IMCR_GMCA2 R ds; variable IMCR_GMCB1 R ds; variable IMCR_GMCB2 R ds; variable IMCR_IsVisible 16 ds reload static; variable IMCR_AddWithOther 16 ds reload static; variable IMCR_AddIndex 16 ds reload static; variable IMCR_Occurrences R ds; variable IMCR_Percentage R ds; variable IMCR_SortIndex 16 ds; variable NOO_TotOccur (2) R ds; end record; 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. 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. 6

Executable UML and Model Driven Architecture (MDA) 7

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 8

Radio Access Network (RAN) Executable UML Specifications NETWORK LEVEL RNC, RBS, MediaGate Way, HLR, Cellular Phone etc. The system and its parts Execution on all levels. NODE LEVEL SYSTEM LEVEL The old Domain Chart Plug-In of Interface Compatible xtuml Models (leafcomponents) SYSTEM PART LEVEL DOMAIN LEVEL 9

UML Forum - Robot Contest in Tokyo Robot contest in full swing The globetrotter Leon Starr - www.modelint.com 10 Reviewing robot contest descriptions Executable UML, BridgePoint, xtuml and MDA 2010-11-25

xtuml Translation according to MDA PIM Application Models Model Driven Architecture Platform Independent Models (PIM) are translated into design through Platform Specific Models (PSM). PSM Erlang C++ PLEX C JAVA VHDL Platform Independent Model The 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 IS AXE CPP The above has been conceptually proven in Ericsson projects. TSP Platform Specific Model Populated 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. 11

Example PIM by Steve Mellor 12

Translation to different platforms Translating the same xtuml model using different Model Compilers Erlang Plex-C C for APZ 21230/-33 33 C/C++ for Windows, OSE & Linux Java 13

Translation to different platforms VHDL for simulation in ModelSim 14

PIM vs PSM Separation (separation of concerns) 15

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

PIM vs PSM Separation We 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. We also model a test environment and run our test cases by executing the PIM itself to verify its behavior. PIM Request Response Response We now have a PIM that we need to integrate with legacy interfaces in a legacy environment, which basically always is the case. Request We can do this integration in different ways. 17

1) Adding PSM concepts to the PIM 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 the PSM concepts are updated we need to create a new version of our model. XPIM We may end up with different models for the same thing but for different platforms, or for different versions of a platform. This basically means no real, efficient reuse. (mostly rework) 18

2) Preserving the PIM vs PSM Separation Build 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. When adding new adaptations we do not need to update the PIM. X PIM Keeping adaptions separated from the PIM means that crossplatform reuse of the PIM is preserved. When testing new adaptions we do not need to retest the PIM. Adaptations needs to be updated only when interfaces are updated. 19

PIM Adaption Layer The 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. Modelled adaptation. Probably has PSM related concepts in it, but can be modelled, run and tested just like a PIM. Match? PIM On a perfect interface match the adaptation is very thin. Only a simple wiring straight to the legacy interfaces. Hand written glue code is simple and straight forward, but may require some complex logic. More complex adaptations may require combined solutions, and also include updates of the model compiler. 20

PIM Adaption Layer If adaptations are modelled in Executable UML *, they can be tested on host by 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 a Platform 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-core platform (or any other PSM-constructs for that matter) is really a PAM. Such PSM-style constructs should better be handled by an Adaption Layer designed for the multi-core platform. But it can be modelled! * = Executable UML - A Foundation for Model-Driven Architecture Mellor/Balcer - ISBN: 0201748045 21

Executable UML Model Translation 22

xtuml Modeling & Translation xtuml Modeling & Testing BridgePoint UML Suite PIM Application Model Modeled Test env. for Model Based Regression Tests PIM xtuml Model Translation The /// Model Compiler Marks + Model compilation flags for tuning of performance etc. Host or Target Platform Platform Specific Code PSC PSC PSC PSC xtuml Repository class attribute datatype state transition event PSM Metamodel Translation Database xtuml Metamodel Compiled Executable xtuml Runtime (VM) instance value message queue stack Marking Model Translation Rules xtuml VM Design Patterns Action Lang. State and Transition Coverage Runtime coverage information for PIM Model Based Test Coverage (supported by the Model Compiler) 23

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

AAL2 Performance Comparison: Hand-coded vs. BridgePoint xtuml (AAL2 Setup & Release) CPU Load % 9 8 7 6 5 4 3 9% 72 us/conn. 7.5% 59 us/conn. 6.3% 51 us/conn. Benchmarking against 10 year old existing code 6% 48 us/conn. 2 1 0 xtuml 1st attempt xtuml 1st opt. xtuml 2nd opt. Original AAL2 NCC 25

Benchmarking newly developed SW The Radical SW Pilot @ Ericsson PDU CPP 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) 26

Modelled UDPSH Component 27

Some UDPSH Class & State Diagr. Request Flow Response Flow 28

Model Compiler Enhancements Ericsson Proprietary Model Compiler 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 29

UDPSH BridgePoint xtuml version: Model Based Test Coverage Tested using Model Based Regression Test (modelled test scenario players) 90% 96% Coverage % 100 90 80 70 60 50 40 30 20 10 0 64% Action Language Else-branch States Transitions 85% The else-branch coverage indicates the amount of alternative execution paths tested in the Action Language code. 30

UDPSH Traffic Load Test Cases Test # Pre-condition 1 Pre-condition 2 Load Test 1 - P2a: sess in new gr TC1: 1500 sess/sec 2 - P2b: sess in exist gr TC1: 1500 sess/sec 3 - P2a: sess in new gr TC2: 2500 sess/sec 4 - P2b: sess in exist gr TC2: 2500 sess/sec 5 P1a: 1500s in 50gr P2a: sess in new gr TC1: 1500 sess/sec 6 P1a: 1500s in 50gr P2b: sess in exist gr TC1: 1500 sess/sec 7 P1b: 1500s in 1500gr P2a: sess in new gr TC1: 1500 sess/sec 8 P1b: 1500s in 1500gr P2b: sess in exist gr TC1: 1500 sess/sec 9 P1c: 3000s in 3000gr P2a: sess in new gr TC3: 600 sess/sec 10 P1c: 3000s in 3000gr P2b: sess in exist gr TC3: 600 sess/sec Static load in memory Runtime load 31

UDPSH Traffic Load Test Case 5 clients setting up sessions in 10 different groups with 50 sessions sions each = 2500 sessions per sec. 0 1 2 3 4 5 6 7 8 9 Burst # Client # 1 2 3 4 5 ts+td ts+td ts+td ts+td ts+td 100 200 300 400 500 600 700 800 900 1000 ms 32

UDPSH Performance Benchmarking Test Case 3 5 clients setting up sessions in new groups,, load is 2500 sessions/sec Worst-case CPU load for these 10 test cases 7.0%? % 7 6.0% CPU Load % 6 5 4 3 2 1 0 not ready yet Hand-coded C++ BridgePoint UML+AL UML with C++ 33

UDPSH Performance Benchmarking Test Case 9 5 clients setting up sessions in new groups,, load is 600 sessions/sec Static pre-condition load is 3000 sessions in 3000 groups Worst-case memory cost for these 10 test cases 901 KB 908 KB? KB Memory Utilization Stat & Heap KB 1000 900 800 700 600 500 400 300 200 100 0 not ready yet Hand-coded C++ BridgePoint UML+AL UML with C++ 34

HOT POTATO test: Sending data packets between state machines Full tests was performed on different HW platforms & OS es. (PowerPC vs. Intel and OSE vs. Linux SW/HW platforms) Single thread Single core or... Ping ( data ) Dual thread Dual core Pong ( data ) 35

HOT POTATO signalling benchmark: BridgePoint vs. a UMLwithC++ tool Signalling between modelled state machines using 100 Byte packages. (platform is 8572 with Monta Vista Linux) 25 21.0 us 20 Round-trip time in us 15 10 3.6 us 5 0.72 us 1.9 us 0 BridgePoint single thread BridgePoint dual thread UMLwithC++ tool single thread UMLwithC++ tool dual thread single core single core 36

HOT POTATO signalling benchmark: BridgePoint vs. a UMLwithC++ tool Signalling between modelled state machines using 100 Byte packages. (platform is monster machine 5570/Sles/gcc64) 4.5 us 4,5 4 3,5 3 Round-trip time in us 2,5 2 1,5 1 0,5 0.11 us 0.36 us 0.47 us 0 BridgePoint single thread BridgePoint dual thread UMLwithC++ tool single thread UMLwithC++ tool dual thread dual core single core 37

BridgePoint runtime call graph Proprietary xtuml Model Compiler tailor made for small footprint & highest performance. 38

UMLwithC++ tool runtime call graph Off-the-shelf UML C++ code generator with adapted runtime system. 39

More of everything with Executable UML & MDA ( extra all ) 40

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

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

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

44

45