Standards-Based Executable UML: Today's Reality and Tomorrow's Promise
-
Upload
ed-seidewitz -
Category
Software
-
view
193 -
download
2
Transcript of Standards-Based Executable UML: Today's Reality and Tomorrow's Promise
Standards-Based Executable UML®
Today’s Reality and Tomorrow’s PromiseObject Management Group® Webinar
Ed Seidewitz
Director of Research and Development
nMeta LLC ● http://www.nmeta.us
[email protected] ● @seidewitz
8 March 2017
Copyright © 2017 Ed Seidewitz
Page 2
Traditional Modeling is Extra Work
Copyright © 2017 Ed Seidewitz
Developers provide feedback
to the architects (maybe)
It is hard to validate the correctness of the models before development.
The developers may not follow the models, without providing feedback.
It is hard to keep the models and development artifacts in sync during
development (and maintenance).
Architects give models to developers
Developers
create artifacts
based on the
models
(maybe)
Architects
create the
models
Page 3
Executable Modeling Just Works!
Copyright © 2017 Ed Seidewitz
The models are validated in a
development/test environment
The models are deployed in a production
environment
Developers
create fully
executable
models
Developers iteratively execute,
test and update the models
Agile development…with executable models!
Page 4
This is not a new idea…
Shlaer-Mellor 1988, 1991
Harel State Charts1988, 1998
Real-Time OO Modeling (ROOM)
1994
Became Executable / Translatable UML (xtUML)
Incorporated into UML asState Machines
Became UML for Real Time (UML/RT)
Copyright © 2017 Ed Seidewitz
Page 5
But it wasn’t standardized before…
Copyright © 2017 Ed Seidewitz
1997
1998
2003
2005
2010
2011
2018
2017
2016
2015
Action Semantics for the UML RFP
Semantics of a Foundational Subset
for Executable UML Models RFP
Foundational UML (fUML) 1.0
fUML 1.2.1 (current version)
fUML 1.3 (in process)
fUML 1.4 (planned)
UML 1.1 (first OMG version)
UML 1.5 (with action semantics)
UML 2.4.1
UML 2.5 (current version)
UML 2.0
UML 2.3
Page 6
Precise
Semantics of
Composite
Structure
(PSCS)
Precise
Semantics of
State Machines
(PSSM)
Precise
Semantics of
Interactions
Executable UML Standards (current/in process/planned)
Precise
Semantics of
Profiles
Precise
Semantics of
Time
Copyright © 2017 Ed Seidewitz
Action Language for fUML (Alf)
Foundational UML (fUML)
Executable subset of standard UML that can be used to define, in an
operational style, the structural and behavioral semantics of systems
v1.2.1 (2015) / v1.3 (2017) / v1.4 (2018)
Textual surface representation for fUML
models, particularly executable behaviors
v1.0.1 (2013) / v1.1 (2017) / v1.2 (2018)
An extension of fUML for the execution
of composite structure models
v1.0 (2015) / v1.1 (2017) / v1.2 (2018)
An extension of fUML for the
execution of state machine models
beta (2016) / v1.0 (2018)
Possible future standards
Page 7
Customer Order Example
Copyright © 2017 Ed Seidewitz
: Why can’t this be our code?
This is a structural model of an
order as a set of product line
items, for a specific customer.
…and of asynchronous
behavior for charging the
order to a credit card.
But it is also a model of
synchronous behavior for
managing an order….
✓
✓
✓
These are
active classes.
Page 8
Using Alf for Operation Methods
Copyright © 2017 Ed Seidewitz
«Create» Order
this.datePlaced = datePlaced;
this.cardToCharge = cardToCharge;
Order_Customer.createLink(this, customer);
return this;
cancel
Order_Customer.destroyLink(this, this.customer);
addProduct
lineItem = new OrderLineItem(product, quantity);
this.lineItems->add(lineItem);
this.totalAmount =
Add(this.totalAmount, lineItem.amount);
removeProduct
items = this.lineItems->
select item (item.product == product);
this.lineItems->removeAll(items);
this.totalAmount = Subtract(this.totalAmount,
items.amount->reduce Add ?? ToMoney(0.0));
items.destroy();
Alf semantics are
fUML semantics.
Page 9
Using Alf as a Textual Notation for Activities
Copyright © 2017 Ed Seidewitz
An Alf compiler can create
an activity model for you –
better than by hand
Page 10
Using Alf for State Behaviors
Copyright © 2017 Ed Seidewitz
State machine transitions are
triggered by the receipt of
asynchronous signals.
Entry behaviors are executed
when a state is entered.
This Alf statement creates a
new credit card charge object
and begins its active behavior.
This Alf statement sends a
signal to the customer object.
Page 11
Executable UML for Multi-Core Programming
Traditional processor architecture
Single processor
Local registers / cache
Remote memory
Multi-core processor architecture
Many processors
Much local memory
Global/distributed memory
Concurrency is
natural here
Traditional modeling language
Things / Relationships
Events / Behaviors
Communication
Concurrency is
natural here
Traditional programming language
Functions / procedures
Local variables / stack
Heap memory
Concurrency is
NOT natural here!
Executable
UML
Page 12
Executable UML Ecosystem
Execution/Simulation
Engine
Model Development
EnvironmentOther Tools
Target Platform
Copyright © 2017 Ed Seidewitz
Enabled by
standardized
executable modeling.
Page 13
Some Executable UML Implementations
Open Source
Modeldriven.org (Reference) Implementations (fUML, Alf)http://fuml.modeldriven.org, http://alf.modeldriven.org
Eclipse Papyrus UML Tool (fUML, PSCS, PSSM, Alf incubation)https://wiki.eclipse.org/Papyrus/UserGuide/ModelExecution
Used in Demo
No Magic MagicDraw (fUML, PSCS, PSSM, Alf beta) https://www.magicdraw.com/simulation
Others
List of Executable UML Tools http://modeling-languages.com/list-of-executable-uml-tools/
Copyright © 2017 Ed Seidewitz