Visual Formalisms Message Sequence Charts Book: Chapter 10 MSCs An ISO standard notation (Z120). Visual + Textual forms. Specifies behaviors of communication protocols. Existing algorithms + tools. MSC visual notation P1 P2 P3 M1 M2 M3 M4 M5 M6 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; instance P3; in M2 from P2; in M3 from P2; out M4 to P2; out M6 to P1; endinstance; endmsc; P1 M1 M5 P2 P3 M2 M3 M4 M6 Partial order semantics s M1 r s M2 r M3 r r M1 s M4 s r M5 s r M6 P1 M5 P2 P3 M2 M3 M4 M6 s HMSCs P1 P2 P3 P2 P3 P2 P3 approve connect P1 P1 P2 P3 fail report P1 req_service Visual semantics Sends before corresponding receives. Events on the same process line execute in order of appearance, from top to bottom. Visual order (wysiwyg) If some event (send, receive) is higher on the line than another, it comes first. Sends precede matching receives. P1 M1 M5 P2 P3 M2 M3 M4 M6 Visual order (wysiwyg) s M1 r s M2 r M3 r P1 s M4 s r M5 s r M6 r s M1 M5 P2 P3 M2 M3 M4 M6 Races P1 M1 M5 P2 P3 M2 M3 M4 P1 M1 M6 P2 P3 M2 M3 M4 M6 M5 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. P1 M1 M5 P2 P3 M2 M3 M4 M6 Races: check if every pair of events ordered by the visual order appears in the transitive closure of the causal order. Causal Order s M1 r s M2 r M3 r r r M6 s M1 s M4 s r M5 P1 s M5 P2 P3 M2 M3 M4 M6 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 x1 x2 … xn where a=x1, b=xn, and xi R xi+1 for 1i<n. Complexity: cubic. In our case: quadratic (every event has 1 or 2 successors). 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. Visual concatenation P1 P2 P3 connect fail report connect fail report connect approve A B P1 P2 P3 P2 P3 approve connect P1 P1 P2 P3 P1 P2 P3 fail req_service report Execution: concatenation of a maximal path in the HMSC. C D 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. 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 i1, i2, …, ik, 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 PCP reduction Letter match Word P5 match P6 P1 a P2 P5 P1 a b P3 P4 P3 (ab,bab),... P2 P5 P6 P1 P2 P1 b P2 a b P4 P3 P4 b b P4 w2 w1 (aab,bb), a b P6 P3 w1 w2 P5 P6 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]
© Copyright 2026 Paperzz