Model checking with Message Sequence Charts
Doron Peled Collaborators: R. Alur,
- E. Gunter, G. Holzmann,
- A. Muscholl, Z. Su
Department of Computer Science University of Warwick, UK Bar Ilan University, IL
Model checking with Message Sequence Charts Doron Peled - - PowerPoint PPT Presentation
Model checking with Message Sequence Charts Doron Peled Collaborators: R. Alur, E. Gunter, G. Holzmann, A. Muscholl, Z. Su Department of Computer Science University of Warwick, UK Bar Ilan University, IL MSCs An ITU standard notation
Department of Computer Science University of Warwick, UK Bar Ilan University, IL
An ITU standard notation (Z120). Visual + Textual forms. Specifies behaviors of communication
Existing algorithms + tools.
msc MSC; inst P1: process Root, P2: process Root, P3: process Root; instance P1;
in M5 from P2; in M6 from P3; endinstance; instance P2; in M1 from P1;
in M4 from P3;
endinstance;
M1 M2 M3 M4 M5 M6
instance P3; in M2 from P2; in M3 from P2;
endinstance; endmsc;
M1 M2 M3 M4 M5 M6
V - Set of events (vertices). N - names. P - processes. p:VP maps events to processes. E - Set of edges (orders, to be fixed). n: VN naming function. t: V {s, r, l} matches a type (send, receive, local). mVxV - matching of sends and receives with same name and
P1 P3 P2 P1 P3 P2 P1 P3 P2 P1 P3 P2
Sends before corresponding receives. Events on the same process line
If some event
Sends precede
M1 M2 M3 M4 M5 M6
M1 M2 M3 M4 M5 M6
M1 M2 M3 M4 M5 M6
P2 P1 P3 M1 M2 M3 M4 M5 M6
M1 M2 M3 M4 M5 M6
P2 P1 P3 M1 M2 M3 M4 M5 M6
M1 M2 M3 M4 M5 M6
M1 M2 M3 M4 M5 M6
M1 M2 M3 M4 M5 M6
M1 M2 M3 M4 M5 M6
M1 M2 M3 M4 M5 M6
Structure (E, R). E – Events, R ⊆ E × E. R* The transitive closure. Defined as
Complexity: cubic. In our case: quadratic
P1 P2 [2,4] [3,5] [2,3] [7,10]?
P1 P2 [2,4] [3,5] [2,3] [7,10]?
e1 e3 e2 e4
P1 P2 [2,4] [3,5] [2,3] [7,10]?
e1 e3 e2 e4
P1 P2 [2,4] [3,5] [2,3] [7,10]?
e1 e3 e2 e4
connect approve fail report Req_service
connect connect fail fail Req_service report report
connect approve fail report Req_service
connect connect fail fail Req_service report report
Note: unordered even if in subsequent HMSC boxes!! More?
connect approve fail report Req_service
connect connect fail fail Req_service report report
Note: unordered even if in subsequent HMSC boxes!! … and more.
P1 P2 Language: At least as many send events as receives in every prefix (Stack Machine Recognizable) s r
P1 Language: Even worse… (Not even Stack Machine Recognizable) P1 P1
For each HMSC M execution Ex, define
the linearizations according to the visual order
the linearizations according to the causal order
Always linvis(Ex) ⊆ lincaus(Ex). (Visual order will not
P1 P2 P1 P2
What if one process will start to behave according to M1 and the other will start according to M2? M1 M2
Undecidable [MP99]
Translate to language theory of
Intuition: moving from visual to
Reduction to universality of trace
Independent Language L Independent
Write both specification and system as
Write specification in LTL. Interpret
In both cases: undecidable.
List of pairs:
Supose we take indices 1, 2, n, 1. We get: lefthand: aab ab a aab righthand: bb bab bb bb
P1 P2 P3 P4 P3 P4 P1 P2 P5 P6 P5 P6
P5 P6 P5 P6 P1 P2 P3 P4 P3 P4 P1 P2
The specification HMSCs allows any
Put limit on message queues [Holzmann] Strongly connected communication graph
P1 P2 P3
connect approve fail report Req_service
P1 P3 P2
s1 t2 t1 s3 s2 P1 P2 P1:snd P1:snd P1:rcv P2:snd P2:rcv
P1 P2
P1 P2
P1 P2
P1 P2
P1 P2
P1 P2
P1 P2 P1 P2
a a b w3 b a b w2
Does not allow unmatched receive
HCMSC is realizable if every path is
Can be checked in polynomial time
1.
2.
3.
How to check with a stack
Any finite state
Trivial translation:
This does not give more
Try to optimize: take
Break graph into cycle
free paths (e.g., using DFS and back arrows).
Use partial order
reduction (sleep sets) to minimize number of paths.
P2 P1 P3 M1 M2 M3 M4 M5 M6
P2 P1 P3 M1 M2 M3 M4 M5 M6
M1 M2 M3 M4 M5 M6 P1 P2 P3
P2 P1 P3 M1 M2 M3 M4 M5 M6
M1 M2 M3 M4 M5 M6 P1 P2 P3
P2 P1 P3 M1 M2 M3 M4 M5 M6
M1 M2 M3 M4 M5 M6 P1 P2 P3
P2 P1 P3 M1 M2 M3 M4 M5 M6
M1 M2 M3 M4 M5 M6 P1 P2 P3
P2 P1 P3 M1 M2 M3 M4 M5 M6
M1 M2 M3 M4 M5 M6 P1 P2 P3
connect approve fail report Req_service
M1 M2 M3 M4 M5 M6 P1 P2 P3
MSC HMSC Finite, one scenario CHMSC Cannot express behavior of some protocols Bounded HMSC Connected communication HMSC Emptiness undecidable Realizable CHMSC Partial order model checking Finding races Checking realizability Undecidable linear model checking
advantages over textual representation.
describing concurrent interactions.
research problems, e.g., race condition.
undecidable [GP,AY].
and is decidable.
standard are useful, e.g., CHMSCs, LSCs.