synchronized composition of labeled transition systemts
DESCRIPTION
How to compose labeled transition system to build large distributed system. With the counter example.TRANSCRIPT
![Page 1: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/1.jpg)
Synchronized Composition of Labeled
Transition SystemAng Chen
University of Geneva, Switzerland17.06.2008
![Page 2: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/2.jpg)
Roadmap
ID-NetControlled System
refinement
ID-NetCFlow
DSL
DSL DSL
DSL
ID-Net Flow
s
t
a
r
t
regis
ter
C
1
C
2
check availability
send
bill
C
4
C
3
ship
goods
receive payment
C
5
C
6
remaind
er
Graphical Design Front-End (Visual Language for Abstract CFlow)
Control flow
Receive
Order
Start
Collect
Payments
Ship
Books
Send
Invoices
End
custom
er Stock
Interaction
transformation
Composition &Refinement
Optimized Process
composition test
DSM
verification
code generation (optional)
![Page 3: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/3.jpg)
Labeled Transition System
![Page 4: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/4.jpg)
Transition System
Transition System. A transition system is a quadruple A =< S, T,!, " >where
• S is a finite or infinite set of states,
• T is a finite or infinite set of transitions,
• ! and " are two mappings from T to S which take each transition t in Tto the two states !(t) and "(t), respectively the source and the target ofthe transition t.
4
![Page 5: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/5.jpg)
Labeled Transition System
Labeled Transition System. A labeled transition system is a quadrupleA =< S, T,A, s0 > where:
• S is a set of states,
• A is a set of actions names (labels), called alphabet
• T ! S"A"S, denoted as sa#$ s!, a % A, s, s! % S, is a transition relation.
! : T $ S, " : T $ S, # : T $ A are mappings from a transition to itssource state, target state, and label, respectively,
• s0 % S is the initial state.
5
![Page 6: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/6.jpg)
Example: Counter
0
1 2
3t4
t1t3
t2
LTS of counter
It has 4 states {0, 1, 2, 3}, one action inc, initial state 0, and the followingtransitions:
• t1 : 0! inc! 1, !(t1) = 0, "(t1) = inc, #(t1) = 1
• t2 : 1! inc! 2, !(t2) = 1, "(t2) = inc, #(t2) = 2
• t3 : 2! inc! 3, !(t3) = 2, "(t3) = inc, #(t3) = 3
• t4 : 3! inc! 0, !(t4) = 3, "(t4) = inc, #(t4) = 0
6
![Page 7: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/7.jpg)
Different models for the same semantics
0
x
x+1inc
0+1=11+1=22+1=33+1=0
P0 P1
P2P3
t1
t2
t3
t4
Place/Transition Net model of the counter(Places are Safe)
APN (CO-OPN) model of the counter
They have different labels (action) setThe P/T Net can be considered as an unfolded APN model
7
![Page 8: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/8.jpg)
LTS: Summary• LTS: State, Action (names), Transition
• Semantics are what we want to have, i.e. LTS
• The same semantics can be realized by different DSL with different syntax
• Composition of LTS can be independent of DSL
• Assumption: LTS transitions are instance of Action (labels). Each LTS transition is always labeled by a label.
8
![Page 9: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/9.jpg)
Model Composition
![Page 10: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/10.jpg)
Model Composition
• Synonyms
• communication (e.g. in Process Algebra)
• synchronization (e.g. Petri Net)
• transaction (e.g in CO-OPN)
• Composition implies constraints
10
![Page 11: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/11.jpg)
Synchronous Product of Transition Systems
• André Arnold
• Free Product: no interaction between components
• Synchronous product
• a subsystem of the free product
• synchronization constraints (implied by interaction)
11
![Page 12: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/12.jpg)
Arnold’s Synchronous Product of TS
• Only essential synchronization constraints are used
e.g.• program/process P is a TS• boolean variable B is a TS• a constraint is : •“P.read” is synchronized with “B.get”
12
![Page 13: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/13.jpg)
Synchronous Product of TS vs. CO-OPN transaction
• “when A sends a message to B, B receives it”
A B
A.out//B.in
B.out//A.ackout
with CO-OPN, we can do more: “when B receives a message, it send an acknowledgment to A”
13
![Page 14: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/14.jpg)
Proposition
Use CO-OPN Transactions operators to specify
synchronization constraints for model composition
14
![Page 15: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/15.jpg)
Free product of counters
0
1 2
3
System A
inc
inc inc
inc
0
1 2
3
System B
inc
inc
inc
inc
Two simultaneous, independent counters
LTS
Model 0
x
x+1
Ainc 0
x
x+1
Binc
15
![Page 16: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/16.jpg)
Free Product (interleaving run)
Bt4
00 01 02
10 11 12
20 21 22
03
13
23
30 31 32 33
Bt1 Bt2 Bt3
Bt1 Bt2 Bt3
Bt1 Bt2 Bt3
Bt1 Bt2 Bt3
At1
At2
At3
At1
At2
At3
At1
At2
At3
At1
At2
At3
Bt4
Bt4
Bt4
At4At4At4At4
LTS of the composed system
0
x
x+1
Ainc
0
x
x+1
Binc
16
![Page 17: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/17.jpg)
Composing the counters: I
0
x
x+1Ainc
0x
x+1Binc
SA SB
x
x+1
y
y+1
Ainc//Binc
Ainc+//Binc+
17
![Page 18: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/18.jpg)
Composed LTS: I
0
x
x+1Ainc
0x
x+1Binc
SA SB
x
x+1
y
y+1
Ainc//Binc
Ainc+//Binc+
Bt1 Bt2 Bt3
00 01 02
10 11 12
20 21 22
03
13
23
30 31 32 33
Bt1 Bt2 Bt3
Bt1 Bt2 Bt3
Bt1 Bt2 Bt3
At1Bt1
At2Bt1
At3Bt1
At1Bt2
At2Bt3
At3Bt2
At1Bt3
At2Bt3
At3Bt3
At1Bt4
At2Bt4
At3Bt4
At4//Bt4
At4Bt1
At4Bt2
At4Bt3
At1
At2
At3
At1
At2
At3
At1
At2
At3
At1
At2
At3
18
![Page 19: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/19.jpg)
Composing the counters: II
0
x
x+1Ainc
0
SA SB
x
x+1
y
y+1
Ainc//Binc
Ainc+//Binc
19
![Page 20: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/20.jpg)
Composing the counters: III
00
x
x+1Binc
SA SB
x
x+1
y
y+1
Ainc//Binc
Ainc//Binc+
20
![Page 21: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/21.jpg)
Composed LTS: III
Ainc//Binc+
00
x
x+1Binc
SA SB
x
x+1
y
y+1
Ainc//Binc
Bt1 Bt2 Bt3
00 01 02
10 11 12
20 21 22
03
13
23
30 31 32 33
Bt1 Bt2 Bt3
Bt1 Bt2 Bt3
Bt1 Bt2 Bt3
At1Bt1
At2Bt1
At3Bt1
At1Bt2
At2Bt3
At3Bt2
At1Bt3
At2Bt3
At3Bt3
At1Bt4
At2Bt4
At3Bt4
At4//Bt4
At4Bt1
At4Bt2At4Bt3
21
![Page 22: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/22.jpg)
Composed LTS: IV
00 11 22 33At1Bt1 At2Bt2 At3Bt3
At4Bt4
00
SA SB
x
x+1
y
y+1
Ainc//Binc
LTS
Ainc//Binc
22
![Page 23: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/23.jpg)
Conditional Synchronizations I
Bt1 Bt2 Bt3
00 01 02
10 11 12
20 21 22
03
13
23
30 31 32 33
Bt1 Bt2 Bt3
Bt1 Bt2 Bt3
Bt1 Bt2 Bt3
At1
At2
At3
At1
At2
At3
At1
At2
At3
At1
At2
At3
SA=3, SB=3::Ainc // Binc (At4//Bt4)SA=3, SB=3::Ainc // Binc
Two counters are synchronized at
each cycle
0
x!=3
x+1Ainc
0x!=3
x+1Binc
SA SB
3
0
3
0
SA=3, SB=3::Ainc//Binc
23
![Page 24: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/24.jpg)
Conditional Synchronizations II
Bt1 Bt2 Bt3
00 01 02
10 11 12
20 21 22
03
13
23
30 31 32 33
Bt1 Bt2 Bt3
Bt1 Bt2 Bt3
Bt1 Bt2 Bt3
At1
At2
At3
At1
At2
At3
At1
At2
At3
At1
At2
At3
SA=3, SB=3::Ainc // Binc (At4//Bt4)
At4 At4 At4 At4
1). SA=3, SB=3::Ainc+
// Binc
SA=3, SB=3::Ainc+ // Binc
Same as before, but A can resets itself
without synchronizing with B
24
0
x
x+1Ainc
0x!=3
x+1Binc
SA SB
3
0
3
0
SA=3, SB=3::Ainc+//Binc
![Page 25: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/25.jpg)
Conditional Synchronizations
SA=3, SB=3::Ainc+//Binc+
0
x
x+1Ainc
0x
x+1Binc
SA SB
3
0
3
0
SA=3, SB=3::Ainc//Binc
Both A and B can reset themselves, or they can be synchronized at 0
Bt1 Bt2 Bt3
00 01 02
10 11 12
20 21 22
03
13
23
30 31 32 33
Bt1 Bt2 Bt3
Bt1 Bt2 Bt3
Bt1 Bt2 Bt3
At1
At2
At3
At1
At2
At3
At1
At2
At3
At1
At2
At3
SA=3, SB=3::Ainc // Binc (At4//Bt4)
At4 At4At4
At4
Bt4
Bt4
Bt4
Bt4
2). SA=3, SB=3::Ainc+
//Binc+
25
![Page 26: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/26.jpg)
More conditional synchronizations
SA=3::Ainc//Binc+
A triggers B at each cycle of A
26
1). SA=3::Ainc//Binc+
Bt1 Bt2 Bt3
00 01 02
10 11 12
20 21 22
03
13
23
30 31 32 33
Bt1 Bt2 Bt3
Bt1 Bt2 Bt3
Bt1 Bt2 Bt3
At1
At2
At3
At1
At2
At3
At1
At2
At3
At1
At2
At3
At4//Bt4
At4Bt1 At4Bt2 At4Bt3
0
x!=3
x+1
Ainc
0
x
x+1
Binc
SA SB
3
0
x
x+1
SA=3::Ainc//Binc+
![Page 27: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/27.jpg)
More conditional synchronizations
SA=3::Ainc//Binc
0
x!=3
x+1
Ainc
0
SA SB
3
0
x
x+1
SA=3::Ainc//Binc
B is driven by A at each cycle of A
27
00 01 02
10 11 12
20 21 22
03
13
23
30 31 32 33
At1
At2
At3
At1
At2
At3
At1
At2
At3
At1
At2
At3
At4//Bt4
At4Bt1 At4Bt2 At4Bt3
2). SA=3::Ainc//Binc
![Page 28: Synchronized Composition Of Labeled Transition SystemTS](https://reader034.vdocuments.net/reader034/viewer/2022052622/559511161a28ab0e108b4696/html5/thumbnails/28.jpg)
Summary
• Use transaction for model composition
• Synchronization constraints: extend transaction with modifiers +,- to control the composition
• Formalization of these composition operators: ongoing work
• Formalism Integration with ID-Net: this summer
28