f. khendek, g. robert, g. butler and p.grogono
DESCRIPTION
Implementability of Message Sequence Charts. F. Khendek, G. Robert, G. Butler and P.Grogono. Concordia University Montreal, Canada [email protected]. Plan. Why ? Basic Algorithm Extensions Problems: Implementability issue Compatibility between MSCs Discussion. MSC 0. SDL 0. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/1.jpg)
F. Khendek, G. Robert, G. Butler and P.Grogono
Concordia University
Montreal, Canada
Implementability of Message Sequence Charts
![Page 2: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/2.jpg)
Plan
• Why ?
• Basic Algorithm
• Extensions
• Problems:– Implementability issue– Compatibility between MSCs
• Discussion
![Page 3: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/3.jpg)
Why ?
• From requirements to design specification (at least for the behavioral aspect): ensure consistency by construction
• Incremental design of SDL specifications (Add traces in a stepwise manner)
• Enrich existing SDL specification without modifying the architecture adding services (“service creation”)
MSC0 SDL0
MSC1
+SDL1
MSC2
+SDL2 ...
![Page 4: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/4.jpg)
Basic Approach: Introduction
P1 P2
x
y
msc Example1
+system S1
block B1 block B2
P1 P2
[x]
[y] [y]
[x] [x]
[y]
x
s1
s2
y
s3
Process P2
x
s1
s2
y
s3
Process P1
![Page 5: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/5.jpg)
Basic Approach: issues
• MSC specifies required order of sending and consumption
of messages -x
-y
+x
+y
-x
-y
+x
+y
P1 P2
x
y
msc Example1
P1 P2
y
x
y
xTranslation seems straightforward !
However …
![Page 6: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/6.jpg)
Basic Approach: issues
• DOES NOT specify how process instances communicate
• The actual arrival depends on the communication architecture
• The given SDL architecture defines the communication architecture
• Even with a defined communication architecture the actual arrival of messages (signals) into SDL process instance queue may be different from the consumption order
• Straightforward translation may lead to deadlocks because of SDL implicit transitions...
![Page 7: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/7.jpg)
Basic Approach: issues
system S1
block B1 block B2
P1 P2
[x]
[y] [y]
[x] [x]
[y]
system S2
block B1 block B2
P1 P2[x,y] [x,y] [x,y]
Two different
architectures
![Page 8: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/8.jpg)
Basic Approach: Key Concepts
• For each process, generate an SDL skeleton with the sending and receiving transitions as specified in the bMSC, BUT keep in mind all the possible arrival orders to the input queue according to the given architecture
• Avoid implicit transition for signals that will be consumed later
• APPROPRIATE USE of “SAVE”: If process instance is expecting signal y, then “any” other signal that MAY BE in the queue and ahead of y is saved
• 3 Main steps in the translation algorithm
![Page 9: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/9.jpg)
• First step: Ordering of events *
– define a transitive earlier relation << , ei << ej means ei occurs earlier in time than ej
– two rules:
• for each MSC instance, events are totally ordered
• the sending event of a message occurs earlier than its reception
– Transitive closure of the order relation is independent from the architecture
Basic Approach: Step 1
* Similar to Holzman and Alur et al. in their work on race conditions
![Page 10: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/10.jpg)
Example: Step 1
P1 P2 P3
xz
y
w
(e1)
(e2)
(e3)(e4)
(e5)
(e6) (e8)
(e7)
msc Example2
system S2
block B1 block B2 block B3
P1 P2 P3[x,y] [w,z]
e1 e2 e3 e4 e5 e6 e7 e8
e1 T T T T T
e2 T T
e3 T T T
e4 T T
e5 T
e6
e7 T T T T
e8 T
(ei, ej) = T means ei << ej
![Page 11: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/11.jpg)
• Build “receive queues”
– For each process, in order to view the possible arrival orders of incoming signals, we view its input queue as a set of parallel FIFO queues. Each queue correspond to one incoming channel
– Algorithm creates a table for each process:
• 1 column for each “receive queue” (for each incoming channel)
• a row for each input event (and only input events)
• for each instance Pi in the MSC
– for each output event es sending signal m to Pj
» find the related input event er in Pj
» for each input event ek in instance Pj
if not(ek << es) and not(er << ek),
add signal m to the appropriate “receive queue”
Basic Approach: Step 2
![Page 12: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/12.jpg)
Example: Step 2
Event Input Signal Q1,2,1 Q3,2,1
e3 x x,y z,w
e4 z y z,w
e5 y y w
e6 w w
“Receive queues” table for process P2
![Page 13: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/13.jpg)
• Generate SDL code (use of SAVE)
• for each instance Pi in the MSC diagram
– for each event ej
– if ej is an output event generate an SDL output
– else if ej is an input event of signal m
• generate an SDL input for message m
• for each “receive queue” of Pi (except the queue to which m belongs), generate an SDL SAVE for all the messages in the queue
[THESE MESSAGES MAY ARRIVE INTO PI INPUT QUEUE BEFORE m]
Basic Approach: Step 3
![Page 14: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/14.jpg)
Example: Step 3
SDL specification of process P2
![Page 15: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/15.jpg)
Extensions
• Inline constructs: – alt– opt– seq,– loop, etc.
![Page 16: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/16.jpg)
Extensions: Alt construct
a
msc Ex1
c
alt
b
d
Sender Receiver
system Ex1
block B1 block B2
Sender Receiver
[c, d]
[a , b]
Example 1
![Page 17: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/17.jpg)
Extensions: Alt Construct
process Receiverprocess Sender
a n y
ab
cd
ab
cd
Generated SDL processes for Example 1
![Page 18: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/18.jpg)
Extensions: Alt Construct
a
b
msc Ex2
c
alt
b
a
d
system Ex2
block B1 block B2
Sender Receiver
[c, d]
[a] [a]
[b]
[a]
Sender Receiver Example 2: Problems !
![Page 19: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/19.jpg)
Extensions: A Second alt Example
a
msc Ex3
c
alt
b
Sender Receiver
a
d
Example 3:
Problems !
![Page 20: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/20.jpg)
Extension: Overtaking
b
a
msc Ex6
Sender Receiver
system Ex1
block B1 block B2
Sender Receiver
[c, d]
[a , b]
Example 4: Problems !
![Page 21: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/21.jpg)
Communication hierarchy
No-buf : synchronous
Every message one channel
Implementable
Non-implementable
Non-implementable
Communication Hierarchy from Engels et al. [PSTV/FORTE’97]
Proposed hierarchy
![Page 22: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/22.jpg)
Communication hierarchy (cont.)
y
x
a
b
msc Ex4
c
alt
b
a
d
Sender Receiver
Cannot be implemented with full synchronization or msg-models.
Example 5
![Page 23: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/23.jpg)
Compatibility between MSCs
• Related to implementability
• Two MSCs are compatible, if they can be implemented in the same architecture.
• MSC Composition Operators ?
![Page 24: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/24.jpg)
Compatibility between MSCs (cont.)
b
a
msc Ex6
Sender Receiver
a
b
msc Ex7
c
alt
b
a
d
Sender Receiver
These two MSCs are incompatible.
![Page 25: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/25.jpg)
Compatibility between MSCs (cont.)
b
a
msc Ex8
Sender Receiver
a
msc Ex9
c
alt
b
d
Sender Receiver
These two MSCs are incompatible.
![Page 26: F. Khendek, G. Robert, G. Butler and P.Grogono](https://reader036.vdocuments.net/reader036/viewer/2022070409/5681445c550346895db0f405/html5/thumbnails/26.jpg)
Discussion
• Different issues simultaneously: translation, Implementability, compatibility
• Data part ?• Environment for enriching SDL
specifications : use ObjectGeode Internal Representation
• A basis for maintaining code ...
• Work is still in progress ...