16
itemis YAKINDU Statechart Tools (SCT) statecharts made easy Eclipse Demo Camp Mars - Zürich Axel Terfloth, itemis AG terfl[email protected]

Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

itemis

YAKINDU Statechart Tools (SCT)

!

statecharts made easy !

Eclipse Demo Camp Mars - Zürich!

Axel Terfloth, itemis AG [email protected]

Page 2: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

itemis

state machines (aka state charts)

• model reactive systems !

• continuously interacts with the environment!

• event driven > typical for technical/embedded systems!

• 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!

• state chart is a specific state machine formalism defined by David Harel!

• state charts have a graphical notation

Tim

e

i0 O0

i1

O1

O2

i2 O3

Page 3: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

itemis

Yakindu StateChartTools

Editing

Valid

atio

n Sim

ulation

Code Generation

Page 4: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

YAKINDU Statechart• Formalism similar to state machines as defined by David

Harel, but:!• self-contained with a well defined interface !• with a cycle-based and event-driven execution semantics

• time control is delegated to the environment!

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

Page 5: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

Demo…

Page 6: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

itemis

Code Generation

Page 7: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

!

• Yakindu comprises code generators for C, C++, Java!• Plain code approach by default!• All generators can be „customized“ by a generator model !!

!

!

• Custom generators based on Xpand & Xtend2/Java can be easily integrated

Yakindu SCT - Code Generation

Page 8: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

!

• Yakindu comprises code generators for C, C++, Java!• Plain code approach by default!• All generators can be „customized“ by a generator model !!

!

!

• Custom generators based on Xpand & Xtend2/Java can be easily integrated

Yakindu SCT - Code Generation

platform agnostic core

... platform specific !extensions

RTOSFramework

Page 9: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

itemis

Yakindu Languages Modules within Generators

• SCT generators take execution model and translate it into code !• all generators conform to the same execution semantic!• generator model can capture specific configurations

sct model

s-graph

s-text

s-types

Editor

execution model

s-exec

s-text

s-types

Sequencer

Interpreter

Debug-UI

generator models-gen

Generators

Page 10: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

itemis

Extending & Customizing !Yakindu SCT

Page 11: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

itemis

Yakindu SCT

Editing

Valid

atio

n Sim

ulation

Code Generation

• is a generic statechart MDD toolkit!• editing!• validation!• simulation!• code generation!

• typically used ,off the shelf‘ / as it is!• self contained!• no dependencies to further modeling concepts

… but!• statecharts are only one of many modeling concepts !• may be used in various combinations with other modeling concepts (i.e. structural models)

… thus YAKINDU SCT also!

• provides statecharts as a reusable ,language module‘!

• is an open framework that provides various ,integration points‘

Page 12: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

Yakindu SCT - Extensibility• Recap: different models are used around the Statechart formalism!

!

!

!

!

!

!

• s-graph (EMF): specification of graphical structures!• s-text (Xtext): textual specification of declarations & expressions!• s-type (EMF): specification of types and type semantics!• s-exec (EMF): sequentialized statechart execution!• s-gen (Xtext): code generator parameterization

sct model

s-graph

s-text

s-types

Editor

execution model

s-exec

s-text

s-types

Sequencer

Interpreter

Debug-UI

generator models-gen

Generators

Page 13: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

itemis

Integration based on SCT Extensions

Integration & extension can be done on four levels (bottom up):!!

• Code Level - integrating with target platform!• extending existing code generators!• contributing own code generators!

• Semantic Level!

• customize statechart execution semantics!• provide types & type semantics!

• Language Level - extend the statechart language itself!• Meta model is modular and allows exchanging and extending (graphical) statechart elements,

(textual) declarations and expressions!• UI Level - extend the modeling tool!

• e.g. extensions of graphical notation & tool extensions

Modeling Language

Code

TypesExecution Semantics

Declarations Actions / Expressions

Statechart Elements

Visualization & UI

Page 14: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

Eclipse Technologies

GEF

GMF

EMF

Xtext Xtend

YAKINDU SCT

SWT

... more Eclipse

Today:

Tomorrow (likely…):GEF4

EMF

Xtext Xtend

YAKINDU SCT

Java FX ... more Eclipse

Page 15: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

!

!

!

!

!

!

• Open Source / EPL: http://statecharts.org!• Hosted at GitHub: https://github.com/Yakindu/statecharts

Page 16: Statechart Tools (SCT) statecharts made easywiki.eclipse.org › images › 0 › 05 › YAKINDU_SCT_EDC_Mars... · itemis Yakindu SCT Editing V n Code Generation • is a generic

Questions & Comments