Presentation is loading. Please wait.

Presentation is loading. Please wait.

Visual Formalisms Message Sequence Charts Book: Chapter 10.

Similar presentations


Presentation on theme: "Visual Formalisms Message Sequence Charts Book: Chapter 10."— Presentation transcript:

1 Visual Formalisms Message Sequence Charts Book: Chapter 10

2 MSCs An ISO standard notation (Z120). Visual + Textual forms. Specifies behaviors of communication protocols. Existing algorithms + tools.

3 MSC visual notation P1P3P2 M1 M2 M3 M4 M5 M6

4 MSC Textual form msc MSC; inst P1: process Root, P2: process Root, P3: process Root; instance P1; out M1 to P2; in M5 from P2; in M6 from P3; endinstance; instance P2; in M1 from P1; out M2 to P3; out M3 to P3; in M4 from P3; out M5 to P1; endinstance; P1P3P2 M1 M2 M3 M4 M5 M6 instance P3; in M2 from P2; in M3 from P2; out M4 to P2; out M6 to P1; endinstance; endmsc;

5 Partial order semantics P1P3P2 M1 M2 M3 M4 M5 M6 ss s s s r r r r r r s M1 M2 M3 M4 M5 M6

6 HMSCs P1P3P2P1P3P2 P1P3P2P1P3P2 connect approve fail req_service report

7 Visual semantics Sends before corresponding receives. Events on the same process line execute in order of appearance, from top to bottom.

8 Visual order (wysiwyg) If some event (send, receive) is higher on the line than another, it comes first. Sends precede matching receives. P1P3P2 M1 M2 M3 M4 M5 M6

9 Visual order (wysiwyg) P1P3P2 M1 M2 M3 M4 M5 M6 ss s s s r r r r r r s M1 M2 M3 M4 M5 M6

10 Races P1P3P2 M1 M2 M3 M4 M5 M6 P1P3P2 M1 M2 M3 M4 M5 M6

11 Causal Order and Races Sends before matching receive. Receive or sends before sends of same process. Two receives on the same process sent from the same process. P1P3P2 M1 M2 M3 M4 M5 M6 Races: check if every pair of events ordered by the visual order appears in the transitive closure of the causal order.

12 Causal Order P1P3P2 M1 M2 M3 M4 M5 M6 ss s s s r r r r r r s M1 M2 M3 M4 M5 M6

13 Calculating the transitive closure Structure (E, R). E – Events, R E E. R * The transitive closure. Defined as follows: a R * b if there is a sequence x 1 x 2 … x n where a=x 1, b=x n, and x i R x i+1 for 1 i { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/799433/3/slides/slide_12.jpg", "name": "Calculating the transitive closure Structure (E, R).", "description": "E – Events, R E E. R * The transitive closure. Defined as follows: a R * b if there is a sequence x 1 x 2 … x n where a=x 1, b=x n, and x i R x i+1 for 1 i

14 Races for HMSCs Undecidable [MP99] Idea of proof: Trasnlate to language theory of semitraces, which are closed w.r.t. commuting certain pairs of letters. Intuition: moving from visual to causal semantic introduces more commutations. Reduction to universality of semitrace languages.

15 Visual concatenation P1P3P2P1P3P2 P1P3P2P1P3P2 connect approve fail req_service report P1P2P3 connect fail report approve connect fail report AB CD Execution: concatenation of a maximal path in the HMSC.

16 Model checking Write both specification and system as HMSCs. Do concatenation. Write specification in LTL. Interpret over the linearizations of the partial orders. In both cases: undecidable.

17 Post Correspondence Problem List of pairs: w1:(aab,aa), w2:(aba,ab), … wn:(a,bb). Want to find if we find a set of indexes i 1, i 2, …, i k, such that concatenating the lefthand words and concatenating the righthand words is the same. Supose we take indexes 1, 2, n, 1. We get: lefthand: aab aba a aab righthand: aa ab bb aa

18 PCP reduction P1P2 P3P4P3P4 P1P2P5P6P5P6 a b a a b P5P6P5P6 P1P2 P3P4P3P4 P1P2 w2 b w1 b (aab,bb), (ab,bab),... Word match Letter match w1 w2 b a b

19 Some solutions: Obtain decidability under the following condition [MP99,AY99]: Every HMSCs cycle covers a strongly connected component in the dependency graph, where events are dependent if they belong to the same process or message. The specification HMSCs allows any additional messages [MPS98]. Put limit on message queues [Holzmann]


Download ppt "Visual Formalisms Message Sequence Charts Book: Chapter 10."

Similar presentations


Ads by Google