netzwerktreffen embedded systems - mit...

36
Modell-getriebene Entwicklung mit der YAKINDU-Workbench -Netzwerktreffen Embedded Systems Dienstag, 12. Juli 2011

Upload: others

Post on 25-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Modell-getriebene Entwicklung mit der

YAKINDU-Workbench

-Netzwerktreffen

Embedded Systems

Dienstag, 12. Juli 2011

Page 2: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

about me …

2

Axel TerflothHead R&D Embedded [email protected]

! work at itemis AG, Germany! work on model driven development of

embedded systems! work on YAKINDU open source project

Dienstag, 12. Juli 2011

Page 3: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

about itemis AG …

3

founded 2003, ± 145 people

Training, Coaching, Consulting• Model Driven Development (MDD)• individual Tools and Toolchains• Embedded Systems, Mobile Apps, Enterprise Systems

Open Source - Eclipse Strategic Member & Contributer

Eclipse Modeling• EMF - Eclipse Modeling Framework• Xtext - Textual Modeling Framework• Xpand / Xtend - Code Generator Framework• GEF - Grafical Editing Framework

Dienstag, 12. Juli 2011

Page 4: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

YAKINDU is a modular toolkit

for model driven development of embedded systems

Dienstag, 12. Juli 2011

Page 5: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Eclipse Platform

Typesystem, SI-Units

Da

mo

s

SC

T

Msc

rip

t

Co

Mo

CR

eM

a

Yakindu Language Modules

• SCT - statecharts• Damos - data-flow oriented modeling• Mscript - math oriented scripting• CReMa - (requirements) traceability• CoMo - component model (upcoming)

Dienstag, 12. Juli 2011

Page 6: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Yakindu Language Modules

language modules are:• independent• not bound to a specific methodology• self contained• can be used on their own

• open & extendable• can be composed to (domain)

specific language workbenches

! Reuse of

• modeling language

• Tools

Eclipse Platform

Typesystem, SI-Units

Da

mo

s

SC

T

Msc

rip

t

Co

Mo

CR

eM

a

Dienstag, 12. Juli 2011

Page 7: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Generators

Validation

Simulation

YAKINDU Tools consist of …

Modeling

7

Toolkit

YAKINDU

Dienstag, 12. Juli 2011

Page 8: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Yakindu is …

• built on Eclipse • open source• available at Eclipse Labs

http://eclipselabs.org/p/yakinduhttp://yakindu.org

Eclipse Project Proposal: 2011

Eclipse Platform

Typesystem, SI-Units

Da

mo

s

SC

T

Msc

rip

t

Co

Mo

CR

eM

a

Dienstag, 12. Juli 2011

Page 9: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

What is Eclipse good for ?

?Dienstag, 12. Juli 2011

Page 10: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

!"#$%&'(

•Application / Tool Platform

•Open Architecture

•Designed for Extensibility

•Strong Modeling Infrastructure

•Open Source

•Reduced Costs

10

Known as Integrated Development Environment

Dienstag, 12. Juli 2011

Page 11: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

!"#$%&'(

• Eclipse Modeling Framework

•Graphical Editing/Modeling Framework

• Xpand - Generator Framework

• Xtext - DSL Toolkit

• UML2 support

• ...

11

Dienstag, 12. Juli 2011

Page 12: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

SCT - Statecharts

Eclipse Platform

Typesystem, SI-Units

Da

mo

s

SC

T

Msc

rip

t

Co

Mo

CReMa

Dienstag, 12. Juli 2011

Page 13: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

state machines (aka state charts)

• model reactive systems • continuously interacts with

the environment• event driven• focuses on transition of the

systems state and it‘s reactions

• the state of the system evolves depending on previous inputs and time

• typically asynchronous

13

Tim

e

i0 O0

i1

O1

O2

i2 O3

Dienstag, 12. Juli 2011

Page 14: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Yakindu Statechart Tools

14

Dienstag, 12. Juli 2011

Page 15: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

statechart properties

• based on statcharts as defined by David Harel

• close to UML state machines• but:• YSCs are self contained with an interface well defined by

events and variables• core execution semantics are cycle-driven and not event-driven• allows processing concurrent events• event driven behaviour can be defined on top

• time is an abstract concept for statecharts• time control is delegated to the environment

• model interpreter and different flavours of generated code follow the same core semantics

15

Dienstag, 12. Juli 2011

Page 16: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Domain Specific Statecharts

• Improving expressiveness and semantic integration by adopting domain concepts

• Integration of state based modeling with DSL workbenches• SCT2 is built for extendability

• Example Domain: HMI Specification

16

Dienstag, 12. Juli 2011

Page 17: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Example DSL: HMI Contract

• Domain-Concepts: Scene, Transition, Animation, Popup

• Defined by a DSL: HMI-Contract

• HMI-Contract is a domain interface and supports technical decouplin

17

animation IntroAnimation

scene ActiveCall:

popup IncomingCall "incoming call ..." accept_call dismisspopup DismissCall "finished call ..."

popup SpeedAlert "to fast ..." ok

Dienstag, 12. Juli 2011

Page 18: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

animation IntroAnimation

scene ActiveCall:

popup IncomingCall "incoming call ..." accept_call dismiss

popup DismissCall "finished call ..."

popup SpeedAlert "to fast ..." ok

Dienstag, 12. Juli 2011

Page 19: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Damos - block diagrams

Eclipse Platform

Typesystem, SI-Units

Da

mo

s

SC

T

Msc

rip

t

Co

Mo

CReMa

Dienstag, 12. Juli 2011

Page 20: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

20

Data Flow-Oriented Modeling

• Data as main concept, instead of state• Prevalent notation: Block diagrams

• Block: System component's transfer function• Connection: Data flow (e.g. physical quantities)

• Technical applications: Control systems & digital signal processing

Dienstag, 12. Juli 2011

Page 21: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Damos Tooling

21

Dienstag, 12. Juli 2011

Page 22: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

22

Structuring Models

• System components are divided into three categories• Device components (e.g. digital controller)• Environmental components (e.g. process)• Simulation interface components (e.g. step functions and scopes)

• Damos supports „two-dimensional“ structuring• Hierarchal structuring using subsystems• Cross-cutting structuring using system fragments

Dienstag, 12. Juli 2011

Page 23: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

23

Subsystems

Dienstag, 12. Juli 2011

Page 24: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

24

System Interfaces

• Defines system inlets and outlets, and their data types• Subsystems specify their provided interface

• Realizing system is specified with subsystem realization model element

• Allows for specifying a subsystem without specifying a realization

• Can be used in product line engineering

Dienstag, 12. Juli 2011

Page 25: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

25

Subsystem Realizations

PIDControllerPIController FuzzyController

...

Dienstag, 12. Juli 2011

Page 26: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

26

System Fragments

Dienstag, 12. Juli 2011

Page 27: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Mscript

Eclipse Platform

Typesystem, SI-Units

Da

mo

s

SC

T

Msc

rip

t

Co

Mo

CReMa

Dienstag, 12. Juli 2011

Page 28: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

28

Mscript Example

stateful func discreteDerivative<xinit, Ts>(x) -> y { x(-1) = xinit; y(n) = (x(n) - x(n-1)) / Ts;}

Discrete derivative:

y(n) =x(n) - x(n-1)

Ts

Dienstag, 12. Juli 2011

Page 29: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Typesystem & SI-Units

Eclipse Platform

Typesystem, SI-Units

Da

mo

s

SC

T

Msc

rip

t

Co

Mo

CReMa

Dienstag, 12. Juli 2011

Page 30: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

30

Units of Measurement

• Numeric data types incorporate unit of measurement• When no unit is specified, dimensionless value is assumed

• Used for model validation

Dienstag, 12. Juli 2011

Page 31: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Requirements & Traceability

Eclipse Platform

Typesystem, SI-Units

Da

mo

s

SC

T

Msc

rip

t

Co

Mo

CReMa

Dienstag, 12. Juli 2011

Page 32: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Aim ...• bring requirements into the development environment (Eclipse)

• provide tracing infrastructure

32

Requirements

Code

class System {

public:

Scheduler* scheduler;

InductionLoopComponent* byRoadInduction;

TrafficLightComponent* byRoadLight;

TrafficLightComponent* mainRoadLight;

CrossingControllerComponent* controller;

TrafficLightControllerComponent* byRoadLightController;

TrafficLightControllerComponent* mainRoadLightController;

System(Scheduler& scheduler);

virtual ~System();

void connect();

void raiseTimerEvent(void* handle);

};

Modelsautomated Traces

Dienstag, 12. Juli 2011

Page 33: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

RIF / ReqIF

• Ecore Model, including serialization to XML• RIF 1.1a - done• RIF 1.2 - done• ReqIF Beta2 - done

• Derived from the specification by model transformation• Driven by itemis• EPL (Eclipse Public License)• Currently submitting an Eclipse project proposal

33

Dienstag, 12. Juli 2011

Page 34: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Traceablility with CReMa

• CReMa - Cross Relational Manager

• Modular & extendable architecture• Non invasive - don‘t change the target models

• Targets: requirements, models, code

• Result: any realtionsships in any context

34

Dienstag, 12. Juli 2011

Page 35: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

!"#$%&'()*+,+ !"#$%&'()*+-+

!"#$%%"&'()*+ ,-.$%%/,"&'##'0&')-+

!"#$%%"&'()*+ !12$%%345678937+

,-.$$%%/,"&':;'<&'&&+ 2<=$%%>?@)ABCDEF?D+

!6G"#+HIB4!J+

,-.++HIKLMB9NJ+

0,=O20!+H0BP4LJ+

IB4!+=BKQ6I4RSP'+IB4TR56B+

=BKQRSU+#BK36V4BW+X+,N6B+"SP6BAKQ6+

IKLMB9N+=BKQ6I4RSP'IB4TR56B+

0BP4L+=BKQ6I4RSP'IB4TR56B+

YKWRS59+=BKQ6I4RSP'IB4TR56B+

1ZRN[SU+=447N+

<9NP43+=BKQ6I4RSP'IB4TR56B+

#BK36V4BW+

1-#'-4567+

YKWRS59+H2<=\+&K34NJ+

CReMa

35

Dienstag, 12. Juli 2011

Page 36: Netzwerktreffen Embedded Systems - mit itemisdownload.itemis.com/public/MDD_YAKINDU_Workbench.pdf · 2016. 9. 15. · • model reactive systems • continuously interacts with the

Questions & Comments

Dienstag, 12. Juli 2011