Title: Regular Model Checking
1Regular Model Checking
Parosh Aziz Abdulla Uppsala University
Cooperation with B. Jonsson, M. Nilsson, J. dOrso
2Outline
- Model Checking
- Infinite-State Systems
- Parameterized Systems
- Regular Model Checking
- Column Transducer Construction
- Sufficient Conditions for Exactness
- Future Work
3Model Checking
S sat f ?
specification
system
4Infinite State Systems
1. Unbounded Data Structures
- Timed Automata
- Push-Down Automata
- Communicating Finite State Automata
- Counter Automata
2. Unbounded Control Structures
- Parameterized Systems
- Dynamic Systems
5Parameterized Systems
- Mutual exclusion protocols
- Cache coherence protocols
- Broadcast protocols
Dynamic Systems
- Security protocols
- Multi-threaded programs
6Model Checking
S sat f ?
Parameterized system
specification
Classification
- Topology
- Components
- Communication mechanisms
F
- Safety properties
- Liveness properties
7Topology
set
array
8Tree
9Matrix
10Components
- Simple finite state process
- Extended clocks, counters, buffers, etc.
Communication Mechanism
- binary (rendez-vous)
- broadcast
- Neighbour
- global
11Simplest Case
Set Finite-state Rendez-vous
Example Parameterized mutual exclusion
R0? R1
R0? R1
R0
R0? R1
R0
R0
Counter abstraction Petri net
12Petri Net Model
W
C
R0? R1
R0
R0
Initial marking
No token in C, 1 token in (R0)
Bad markings
At least 2 tokens in C
13Parameterized System of Finite-Sate Processes
(Geman Sistla)
Finite-state process
a
Synchronize a , b
b
Parameterized System
Petri Net Representation
14Parameterized System of Timed Processes (Timed
Networks)
x0
timed process
a
xlt5
Synchronize a , b
b
Parameterized System
00
Timed Petri Net Representation
05
15Array of Finite-State Processes
- in general undecidable
- use Regular Model Checking
- Kesten et al 97
16Example Szymanskis Algorithm
Pseudocode for process i 1 await ?j j ? i
?sj 2 wi , si true,true 3 if ?j j ? i
(pcj ? 1 /\ ?wj) then si
false goto 4 else wi false
goto 5 4 await ?j j ? i (sj /\ ?wj)
then wi , si false,true 5 await ?j
j ? i ?wj 6 await ?j j ? i ?sj 7 si
false goto 1
17Linear Process Networks Token Passing
N
N
N
N
T
?
18Linear Process Networks Token Passing
T
N
N
N
N
?
19Linear Process Networks Token Passing
N
T
N
N
N
?
20Token Passing Model
- Alphabet S N , T
- Configurations words over S
- Initial Configurations T N (regular lang.)
- Transition Relation transducer
T/N
N/T
N/N
N/N
21A Run of the Transducer
T/N
N/T
N/N
N/N
R
T N N N
Initial configuration (T N)
22A Run of the Transducer
T/N
N/T
N/N
N/N
R
T N N N
Initial configuration (T N)
R
N T N N
23A Run of the Transducer
T/N
N/T
N/N
N/N
R
T N N N
Initial configuration (T N)
R
N T N N
R
N N T N
24A Run of the Transducer
T/N
N/T
N/N
N/N
R
T N N N
Initial configuration (T N)
R
N T N N
R
N N T N
R
N N N T
25Symbolic Run of the Transducer
T/N
N/T
N/N
N/N
R
Initial configurations
T N
26Symbolic Run of the Transducer
T/N
N/T
N/N
N/N
R
Initial configurations
T N
R
N T N
27Symbolic Run of the Transducer
T/N
N/T
N/N
N/N
R
Initial configurations
T N
R
N T N
R
N N T N
28Symbolic Run of the Transducer
T/N
N/T
N/N
N/N
R
Initial configurations
T N
R
N T N
- Termination ?
- Ideally compute
- R (T N) N T N
R
N N T N
R
N N N T N
29Column Transducer
R
T/N
N/T
q
q
1
2
N/N
N/N
T N N N N
30Column Transducer
R
T/N
N/T
q
q
1
2
N/N
N/N
T N N N N
N T N N N
31Column Transducer
R
T/N
N/T
q
q
1
2
N/N
N/N
T N N N N
N T N N N
N N T N N
32Column Transducer
R
T/N
N/T
q
q
1
2
N/N
N/N
T N N N N
N T N N N
N N T N N
N N N T N
33Column Transducer
R
T/N
N/T
q
q
1
2
N/N
N/N
T N N N N
N T N N N
N N T N N
N N N T N
N N N N T
34Column Transducer
R
T/N
N/T
q
q
1
2
N/N
N/N
T N N N N
N T N N N
N N T N N
N N N T N
N N N N T
35Column Transducer
- Configurations columns members of S
- Transitions
- Initial configurations columns of initial
states - Final configurations columns of final
states
x
y
36Example Token passing
R
T/N
N/T
q
q
1
2
N/N
N/N
initial columns
final columns
transitions
N
N
N
and therefore
e.g.
T
N
N
N
37Example Token passing
R
T/N
N/T
q
q
1
2
N/N
N/N
initial columns
final columns
- Transducer language transitive closure
- Problem
- number of columns infinite !!
- Solution abstraction !!
38Computing Abstract Transducer
- Define equivalence on columns
- Start with original transducer
- until construction stabilizes
39Computing Abstract Transducer
- Define equivalence on columns
- Start with initial configurations (columns)
a
b
and
then
x
z
y
w
c
b
z w
a
X y
add
c
- until construction stabilizes
40Computing Abstract Transducer
- Define equivalence on columns
- Start with initial configurations (columns)
a
b
and
then
x
z
y
w
c
b
z w
a
X y
add
c
- if x y then merge x and y
- until construction stabilizes
41Defining
N
T
N
T
N
T
N
T
T
T
Left-copying states
Non-copying states
Right-copying states
42Defining
N
T
N
T
N
T
N
T
T
T
Left-copying states
Non-copying states
Right-copying states
x y if x y modulo deletion of
identical left- or right-copying neighbours
43Example Token passing
R
T/N
N/T
q
q
1
2
N/N
N/N
q
q
Left-copying state
Right-copying state
0
2
q
q
0
q
0
q
1
0
q
q
2
1
q
q
2
2
q
2
44Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
45Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
46Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
47Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
48Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
N/N
49Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
N/T
N/N
50Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
N/T
N/N
51Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
N/T
N/N
52Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
N/T
N/N
N/N
53Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
N/T
N/N
N/N
54Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
N/T
N/N
N/N
55Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
N/T
N/N
N/N
N/N
56Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
N/T
N/N
N/N
N/N
57Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
N/T
N/N
N/N
N/N
58Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
N/T
N/N
N/N
N/N
N/N
59Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
N/T
N/N
N/N
N/N
N/N
60Example Token passing
N/T
T/N
q
q
q
2
1
0
N/N
N/N
T/N
N/T
N/N
N/N
N/N
N/N
61Exactness of
x
y
equivalence class
final states
initial states
62Exactness of
z
x
y
equivalence class
final states
initial states
63Exactness of
z
x
y
equivalence class
final states
initial states
How to define ?
64Forward Simulation
F
x1
y1
F
x2
65Forward Simulation
F
x1
y1
F
F
x2
y2
66Forward Simulation
F
x1
y1
F
F
x2
y2
Backward Simulation
B
x1
y1
B
y2
67Forward Simulation
F
x1
y1
F
F
x2
y2
Backward Simulation
B
x1
y1
B
B
y2
y1
68Equivalence
z
F
B
y
x
iff
x
y
w
B
F
,
independent
F
B
x
B
F
y
z
w
B
F
69Example
x
y
x y modulo deletion of identical left-copying
neighbours
B
70Example
x
y
x y modulo deletion of identical left-copying
neighbours
B
q
q
0
q
0
q
0
B
q
1
q
1
q
2
2
71Example
x
y
x y modulo deletion of identical left-copying
neighbours
B
q
q
0
q
0
q
0
B
q
1
q
1
q
2
2
x y modulo deletion of identical right-copying
neighbours
x
y
F
q
q
0
0
q
q
1
1
F
q
q
2
2
q
2
72q
Independence
0
q
0
q
1
q
2
q
0
q
q
0
0
F
q
q
B
1
0
q
q
2
1
q
q
2
0
q
q
0
2
q
0
73q
Independence
0
q
0
q
1
q
2
q
0
q
q
0
0
F
q
q
B
1
0
q
q
2
1
q
q
2
0
q
q
0
2
q
0
F
B
74q
Independence
0
q
0
q
1
q
2
q
0
q
q
0
0
F
q
q
B
1
0
q
q
2
1
q
q
2
0
q
q
0
2
q
q
0
0
F
B
75q
Independence
0
q
0
q
1
q
2
q
0
q
q
0
0
F
q
q
B
1
0
q
q
2
1
q
q
2
0
q
q
0
2
q
q
0
0
q
1
F
B
76q
Independence
0
q
0
q
1
q
2
q
0
q
q
0
0
F
q
q
B
1
0
q
q
2
1
q
q
2
0
q
q
0
2
q
q
0
0
q
1
q
2
F
q
B
2
77q
Independence
0
q
0
q
1
q
2
q
0
q
q
0
0
F
q
q
B
1
0
q
q
2
1
q
q
2
0
q
q
0
2
q
q
0
0
q
1
q
2
F
q
B
2
q
0
q
0
78Example
x
y
x y modulo deletion of identical left-copying
neighbours
B
x y modulo deletion of identical right-copying
neighbours
x
y
F
Induced equivalence
x
x y modulo deletion of identical left- or
right-copying neighbours
y
79Consequence
x
y
F
w
80Consequence
x
y
F
F
z
w
B
81x0
x1
x2
x3
y1
y2
y3
82x0
x1
x2
x3
y1
y2
y3
F
w0
x0
83x0
x1
x2
x3
y1
y2
y3
F
F
w0
v1
x0
84x0
x1
x2
x3
y1
y2
y3
F
F
F
w0
v1
w1
x0
B
85x0
x1
x2
x3
y1
y2
y3
F
F
F
F
F
w0
v1
w1
v2
w2
x0
B
B
86x0
x1
x2
x3
y1
y2
y3
F
F
F
F
F
F
F
w0
v1
w1
v2
w3
v3
w2
x0
B
B
B
87x0
x1
x2
x3
y1
y2
y3
F
F
F
F
F
F
F
w0
v1
w1
v2
w3
v3
w2
x0
B
B
B
B
z3
w3
88x0
x1
x2
x3
y1
y2
y3
F
F
F
F
F
F
F
w0
v1
w1
v2
w3
v3
w2
x0
B
B
B
B
B
z3
z2
w3
89x0
x1
x2
x3
y1
y2
y3
F
F
F
F
F
F
F
w0
v1
w1
v2
w3
v3
w2
x0
B
B
B
B
B
B
z3
z2
z1
w3
90x0
x1
x2
x3
y1
y2
y3
F
F
F
F
F
F
F
w0
v1
w1
v2
w3
v3
w2
x0
B
B
B
B
B
B
B
z3
z2
z1
z0
w3
91Other Examples Szymanskis Algorithm (idealized)
Pseudocode for process i 1 await ?j j ? i
?sj 2 wi , si true,true 3 if ?j j ? i
(pcj ? 1 /\ ?wj) then si
false goto 4 else wi false
goto 5 4 await ?j j ? i (sj /\ ?wj)
then wi , si false,true 5 await ?j
j ? i ?wj 6 await ?j j ? i ?sj 7 si
false goto 1
92Built states in transitive closures
93www.regularmodelchecking.com
- All implementation available
- Implementation of automata with symbolic edges
(BDDs) - Source available under GPL
94Future Work
- Tree-like Topologies
- Liveness properties
- Non-structure-preserving
- Other kinds of systems stacks, queues, timed,
etc