Exploiting user-definable synchronizations in graph transformation
description
Transcript of Exploiting user-definable synchronizations in graph transformation
![Page 1: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/1.jpg)
1
Ivan LaneseComputer Science Department
University of BolognaItaly
Exploiting user-definable synchronizationsin graph transformation
![Page 2: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/2.jpg)
Roadmap
Synchronized Hyperedge Replacement
The airport case study
Parametric SHR
Computing a transition step-by-step
Conclusions
![Page 3: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/3.jpg)
Roadmap
Synchronized Hyperedge Replacement
The airport case study
Parametric SHR
Computing a transition step-by-step
Conclusions
![Page 4: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/4.jpg)
Graph transformation
Graphs used to model system structure
– (Hyper)edges are components
– Nodes are communication channels
Graph transformation model system evolution
– Rules replace parts of the graph with new parts
– Captures in an intuitive way reconfiguration
![Page 5: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/5.jpg)
The SHR approach
Traditional graph transformation (e.g., DPO)
requires to match large subgraphs
– Difficult to implement in a distributed setting
The SHR approach
– Rules (productions) describe the behaviour of single
edges
– Productions applied locally
– Synchronization to coordinate different productions
![Page 6: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/6.jpg)
Standard SHR presentation
Algebra to represent graphs
LTS-based semantics
Inference rules to derive transitions from
productions
Apt for developing theory
– Induction on the derivation, coinduction
Difficult to understand
– A transition is a result of many steps of derivation
– Heavy technicalities
![Page 7: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/7.jpg)
Our SHR presentation
Set-theoretical presentation of graphs
LTS-based semantics
Algorithm to derive the allowed transitions
Each step corresponds to an intuitive check
– Choice of the productions, verification of the
synchronization constraints, …
More easy to guess the resulting transitions
More easy to program
![Page 8: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/8.jpg)
More on productions
Rewrite an edge into a graph preserving the
interface
Many productions can be applied concurrently
Synchronization constraints must be satisfied
Mobility can change the interface
at
chk L
at
chkR S
![Page 9: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/9.jpg)
Basics of synchronization & mobility
Productions can execute actions on attached
nodes
Actions executed on each node at each step must
be compatible
Actions can carry nodes as parameters
Parameters of synchronizing actions may be
merged
Synchronization
Mobility
![Page 10: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/10.jpg)
Roadmap
Synchronized Hyperedge Replacement
The airport case study
Parametric SHR• Computing a transition step-by-step • Conclusions
![Page 11: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/11.jpg)
The airport case study
Taken from AGILE project on architectures for
mobility
Models airplanes taking off and landing at airports
and persons traveling using them
Modeled inside AGILE using
– UML extended with mobility primitives
– Synchronized variant of DPO
We concentrate on a small part of the case study
![Page 12: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/12.jpg)
Our aim
univ univ
inBoinBo
chk
chk
inPl
inPl
![Page 13: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/13.jpg)
Programming using productions (1)
at:<req,<newat>>
in:<ε,<>>
chk:<breq,<in>>
newat
in
chk at
at:<ε,<>>
in:<ack,<at>>
at
in
![Page 14: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/14.jpg)
Programming using productions (2)
at:<ε,<>>
chk:<brd,<newat>>
newat
chk at
Idle productions always available
![Page 15: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/15.jpg)
Roadmap
Synchronized Hyperedge Replacement
The airport case study
Parametric SHR
Computing a transition step-by-step
Conclusions
![Page 16: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/16.jpg)
Parametric SHR
A member of SHR family
Synchronization and mobility patterns not fixed but
user-definable
– Specified using Synchronization Algebras with Mobility
Allows to use each time the most suitable
synchronization primitives
![Page 17: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/17.jpg)
Synchronization Algebras with Mobility
Specify how actions synchronize– Two at the time, associativity and commutativity required
From Winskel’s synchronization algebras– Partial operator ● for action synchronization
– Action ε for “not taking part to the synchronization”
Added– Arities of actions
– Function from parameters of the synchronizing actions to
parameters of the result
– Set of final actions
![Page 18: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/18.jpg)
Milner SAM
Normal actions, coactions, τ, ε
in ● out = τ
a ● ε = a
Final actions: τ, ε
in out τ
a ε a
![Page 19: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/19.jpg)
Broadcast SAM
Normal actions, coactions, ε
in ● out = out
in ● in = in
ε ● ε = ε
Final actions: out, ε
in out out
in in in
![Page 20: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/20.jpg)
And many more
SAMs can be defined for many synchronization
policies
– Mutual exclusion
– Priority synchronization
– …
SAMs can be combined
– In the example: req and acq interacting using Milner
synchronization and breq and brd interacting using
broadcast
![Page 21: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/21.jpg)
Applying a SAM
SAMs used to synchronize tuples of actions a i
carrying parameters pi
If synchronization is allowed we can compute
– A resulting action c
– A substitution σ
– A tuple of parameters p
![Page 22: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/22.jpg)
Applying broadcast
Broadcast synchronization is allowed if – at most one action is “out”
– if there is an ε, then all the actions are ε
The result is – ε if all actions are ε
– “in” if all the actions are “in” (not allowed on bound nodes)
– “out” otherwise
Substitution σ computed as mgu of equalities pi=pj for all i, j
Parameters p computed as piσ (any i can be chosen)
![Page 23: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/23.jpg)
Roadmap
Synchronized Hyperedge Replacement
The airport case study
Parametric SHR
Computing a transition step-by-step
Conclusions
![Page 24: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/24.jpg)
The algorithm (1)
One production is chosen for each edge
– Idle production for passenger not checked in
– Productions shown before for other edges
– New nodes are local to productions
The actions executed on each node x are
synchronized
– Action cx, parameters px and substitution σx as results
If x is bound then cx must be final
![Page 25: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/25.jpg)
Synchronization in the example
univ
inBo
chk
inPl
ε,<>
ack,<univ>ε,<>ε,<>
ε,<>req,<newat>
ε,<>
breq,<inPl>brd,<new1>
brd,<new2>
![Page 26: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/26.jpg)
Synchronization in the example
univ
inBo
chk
inPl
ε
τ
ε
breq,<inPl>brd,<new1>
brd,<new2>
univ/newat
![Page 27: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/27.jpg)
Synchronization in the example
univ
inBo
chk
inPl
ε
τ
ε
breq,<inPl>
univ/newat
inPl/new1,inPl/new2
![Page 28: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/28.jpg)
The algorithm (2)
Global substitution σ computed by
– Merging the substitutions σx from single nodes
Final label contain
– The triple <x, cx, pxσ> for each free x in the LHS
Final graph computed by– Merging the RHSs of the productions
– Applying the global substitution σ
– Hiding nodes unless free in the LHSs or occurring in the label
– Deleting isolated nodes
![Page 29: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/29.jpg)
Result of the transition
univ
inBo
newat
inPl
chk
new1 new2
univ/newat, inPl/new1, inPl/new2
![Page 30: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/30.jpg)
Result of the transition
univ
inBoinPl
chk
univ/newat, inPl/new1, inPl/new2
![Page 31: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/31.jpg)
Result of the transition
univ
inBoinPl
chk
The label is <x,ε,<>>
![Page 32: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/32.jpg)
Result of the transition
univ
inBoinPl
chk
All nodes but univ are hidden
![Page 33: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/33.jpg)
Roadmap
Synchronized Hyperedge Replacement
The airport case study
Parametric SHR
Computing a transition step-by-step
Conclusions
![Page 34: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/34.jpg)
Conclusions
About SHR– Powerful graph transformation framework
– Allows to relate local and global views of the system
About PSHR– Allows to simplify the specification of complex transformations
About this presentation of PSHR– Less suitable for developing theory
– Hopefully more apt for designers/developers
– The two views are (nearly) equivalent: the most suitable can be
chosen at each time
![Page 35: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/35.jpg)
Future work
I have moved, so I’m not sure I will continue
working on this
Some interesting things on SHR under
development
– Category of SAMs to compose and compare them
– Applying SHR to QoS
– Abstract semantics for SHR
One thing that is surely missing
– Implementation of SHR
![Page 36: Exploiting user-definable synchronizations in graph transformation](https://reader036.fdocuments.in/reader036/viewer/2022062520/568159a7550346895dc70b63/html5/thumbnails/36.jpg)
End of talk