Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
Model-based Software Engineeringfor/with Petri netsBehaviour Modelling (and its challenges)Ekkart Kindler
Ekkart Kindler
2MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Motivation
Ekkart Kindler
3MBSE f/w Petri Nets:Challenges of Behaviour Modelling
EMF/GMF Technology
:Place
:Transition
:Arc
:Transition
:Place
:Arc
:Arc
source
target source
target
targetsource
:Arcsourcetarget
:Petrinet
:Token
PlaceTransition
1 source
1 targetArc
*
PetriNet
Token*
Node
Object
model
meta model
is instance of
concrete syntax abstract syntax
Place
Transition
Arc
Token
generate aneditor
Ekkart Kindler
4MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Benefits of Modelling (cntd.)
Better Understanding
Mapping of instances to XML syntax (XMI)
Automatic Code Generation API for creating, deleting and modifying model Methods for loading and saving models (in XMI) Standard mechanisms for keeping track of changes
(observers) Editors and GUIs
Ekkart Kindler
5MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Table of Contents
Motivation Model-based Software Engineering Business process modelling
Challenges and Problems Some Ideas modelling behaviour integration and coordination of behaviour
Discussion
Ekkart Kindler
6MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Example: Business Trip
note
note
trip documents receipts
application form
approval
reimburse-ment form
reimburse-ment form& receipts
copy of af
determine trip data
applyfor trip
supporttrip
booktrip
approvetrip
sendtrip form
maketrip
fill intrip form
reimburseexpenses
lecturer
lecturer
lecturerlecturer
superior dean clerk
clerk
lecturer
Ekkart Kindler
7MBSE f/w Petri Nets:Challenges of Behaviour Modelling
“Summary”
Where does the “modelling only” idea work?
Graphical editors
Workflowmanagement
•graphics only•standard functions only
•no business logic
•standard GUI only
•business logic explicitly modelled
•dedicated modelling notation
?
Ekkart Kindlere.g. a Petri net simulator?
8MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Ekkart Kindler
9MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Challenges
“There are no notationsfor modelling behaviour!”
Ekkart Kindler
10MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Challenges Adequate modelling methodologies
Coarse grain behaviour Fine grain behaviour
Mechanism for integrating and coordinating behaviour beyond invocation(calls of procedure, function, method, or service)
Integration with existing software (legacy, manually created, generated) other models (structural & behavioural)
Change mentality (change culture) Stuck with thread- and invocation-based thinking Software engineering is programming thinking
( model interpretation vs. code generation)
Ekkart Kindler
11MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Table of Contents
Motivation Model-based Software Engineering Business process modelling
Challenges and Problems Some Ideas modelling behaviour integration and coordination of behaviour
(a vision: Event Coordination NOtation ECNO) Discussion
Ekkart Kindler2. The Event Coordination NOtation
Motivation Given some object oriented software with (or without)
explicit domain model,
model behaviour on top of it – and make these models executable.
Model behaviour on a high level ofabstraction (domain): coordination of behaviour
Integrate behaviour models with structural models Integrate different structural models and manually written
code (or code generated by different technologies)12MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Meta-models / domain modelsincluding behaviour!
Ekkart Kindler
13MBSE f/w Petri Nets:Challenges of Behaviour Modelling
2.1 Example: Vending machine
Slot
Panel
Control
Coffee
Brewer
Output
*
**
*
*
*
Safe
Coin
Tea
1
Ekkart Kindler
14MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Instance: Object Diagram
: Slot
:Panel
:Control
:Coffee
:Output: Safe
:Coin
:Tea
:Coffee
:Coin
:Coin
Ekkart Kindler
15MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Coordination Diagram
Slot
insertreturn_passreset
Panel GUI
coffeeGUI
tea GUI
cancel GUI
Coffee
Output GUI
cup_in GUI
cup_out GUI
*
cup_in: 1
coffee: 1 tea: 1reset: ALL
coffee: 1tea: 1cancel: ALL
reset: ALLpass: 1
pass: 1
**
*
*
insert: 1
*
return_: ALLpass: 1
Safe
pass
GUICoin
insert GUI
passreturn_
Tea
Brewercoffee tearesetcup_in
1
Control
coffeeteacancelpassreset
Ekkart Kindler
16MBSE f/w Petri Nets:Challenges of Behaviour Modelling
... + Event declaration
Slot
insertreturn_passreset
Panel GUI
coffeeGUI
tea GUI
cancel GUI
Control
coffeeteacancelpassreset
Coffee
Output GUI
cup_in GUI
cup_out GUI
*
cup_in: 1
coffee: 1 tea: 1reset: ALL
coffee: 1tea: 1cancel: ALL
reset: ALLpass: 1
pass: 1
*
**
*
insert: 1
*
return_: ALLpass: 1
Safe
pass
GUICoin
insert GUI
passreturn_
Tea
insert(Coin coin, Slot slot) coffee()pass(Coin coin, Slot slot) tea()return(Slot slot) cancel()reset_()
cup_in()cup_out()
Brewercoffee tearesetcup_in
1
Ekkart Kindler
17MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Interaction
: Slot
:Panel
:Control
:Coffee
:Output: Safe
:Coin
:Tea
:Coffee
:Coin
:Coin
coffee
coffeecoffee
passpasspass
pass
coffee: 1
pass: 1
pass: 1
coffee: 1
coffee: 1
pass: 1
Ekkart Kindler
18MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Interaction
: Slot
:Panel
:Control
:Coffee
:Output: Safe
:Coin
:Tea
:Coffee
:Coin
:Coin
coffee
coffeecoffee
passpasspass
pass
coffee: 1
pass: 1
pass: 1coffee: 1
pass: 1
Ekkart Kindler
19MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Another Interaction
: Slot
:Panel
:Control
:Coffee
:Output: Safe
:Coin
:Tea
:Coffee
:Coin
:Coin
cancel reset
resetresetreset
return
return
cancel
resetreturn
reset: ALLcancel: ALL
reset: ALL
reset: ALLreset: ALL
return: ALL
return: ALL
Ekkart Kindler
20MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Local behaviour: Coffee
Ekkart Kindler
21MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Local behaviour: Coin
Ekkart Kindler
22MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Local behaviour: Control
reset
cancel
coffee
pass
Ekkart Kindler
23MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Local behaviour: Slot
reset
return
Ekkart Kindler
24MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Interaction
: Slot
:Panel
:Control
:Coffee
:Output: Safe
:Coin
:Tea
:Coffee
:Coin
:Coin
cancel reset
resetresetreset
return
return
cancel
resetreturn
reset: ALLcancel: ALL
reset: ALL
reset: ALLreset: ALL
return: ALL
return: ALL
Ekkart Kindler2.2 ECNO: Basic Concepts
ElementTypes (Classes) EventTypes with
parameters
Global Behaviour: Coordination annotations for references Event type Quantification (1 or ALL)
Local behaviour (life-cycle): ECNO nets (or something else) Event binding (with parameter assignment) Condition Action
25MBSE f/w Petri Nets:Challenges of Behaviour Modelling
insert(Coin coin, Slot slot)
Control
coffeeteacancelpassreset
Brewer
coffee tearesetcup_in
coffee: 1tea: 1reset: ALL
Ekkart Kindler2.3 ECNO: Advanced Concepts
ECNO with its basic concepts has some limitations, which makes modelling things in an adequate waya bit painful. ECNO has some additional concepts to make modelling more convenient. E.g.
Inheritants on events
26MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Ekkart Kindler”Nicer Vendingmachine”
27MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Ekkart KindlerBehaviour inheritance
28MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Ekkart Kindler2.4 Example 2: Petri nets
29MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Fire Transition t:for ALL incoming Arcs a:
for ONE source Place p of Arc a:find a token and remove it
for ALL outgoing arcs a:for ONE target Place p of Arc a:add a new Token
Transition t enabled:for ALL incoming Arcs a:
for ONE source Place p of Arc a:find a token
t
remove add
Ekkart KindlerPetri net: Abstract Syntax
30MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Ekkart KindlerExample 2: Petri nets
31MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Fire Transition t:for ALL incoming Arcs a:
for ONE source Place p of Arc a:find a token and remove it
for ALL outgoing arcs a:for ONE target Place p of Arc a:add a new Token
Transition t enabled:for ALL incoming Arcs a:
for ONE source Place p of Arc a:find a token
t
remove add
Ekkart KindlerECNO Semantics of PN
32MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Ekkart KindlerResult
33MBSE f/w Petri Nets:Challenges of Behaviour Modelling
t1
t2t3
t4
Ekkart KindlerPetri net simulator
34MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Ekkart Kindler2.5 ECNO: Summary
35MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Ekkart KindlerECNO Nets
ECNO nets and the code generator are probably the largest application of the ePNK!
36MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Ekkart KindlerBeyond Mickey Mouse
37MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Ekkart KindlerDiscussion
Models of software on higher level of abstraction concise / adequate
Domain model including semantics
Coordination! Not invocation!
Idea: Define semantics of ECNO in ECNO itself (truely ”meta”)
38MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Ekkart KindlerECNO: Focus
Software Engineers(vs. end-users)
Domain level(vs. low-level programming)
Coordination(vs. algorithmics/invocation/sequential flow)
Behaviour(vs. GUI)
39MBSE f/w Petri Nets:Challenges of Behaviour Modelling
Ekkart KindlerComment of a non-IT friend
”Oh, that’s great. Then I can also develop my own software now.”
40MBSE f/w Petri Nets:Challenges of Behaviour Modelling