Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso...
-
Upload
janel-wells -
Category
Documents
-
view
215 -
download
0
Transcript of Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso...
![Page 1: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/1.jpg)
Regular Model Checking Regular Model Checking Made Simple and Made Simple and
EfficientEfficient
Regular Model Checking Regular Model Checking Made Simple and Made Simple and
EfficientEfficient
P. Abdulla, B. Jonsson, M. Nilsson P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orsoand J. d’Orso
Uppsala UniversityUppsala University
![Page 2: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/2.jpg)
Presentation Overview• Aim
• Regular Model Checking
• Subset Construction
• Construction by Matching
• Conclusions
![Page 3: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/3.jpg)
Aim• Parameterized systems• Counters• Stacks• queues
Can all be represented by regular languagesAnd regular relations.
![Page 4: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/4.jpg)
Regular Model Checking
Represent configurations/transition relationswith finite automata.
(n,n)
(n,t)(t,n)
(n,n)
Example: moving a token to the right
![Page 5: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/5.jpg)
Regular Model Checking
The transitive closure:
(n,n)
(n,t)(t,n)
(n,n)
Example: moving a token arbitrarily to the right
(n,n)
![Page 6: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/6.jpg)
Regular Model Checking (cont.)
• Problem: how do we compute transitive closures ?
• Solution: subset construction ([BJNT00])
• First step: use strings to represent composition (“columns”)
Successiveruns
One column
![Page 7: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/7.jpg)
Regular Model Checking (cont.)
![Page 8: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/8.jpg)
Regular Model Checking (cont.)
![Page 9: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/9.jpg)
Regular Model Checking (cont.)
![Page 10: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/10.jpg)
Subset Construction (cont.)
• Problem: previous automaton is infinite !• Second idea: apply subset construction• With regular sets
![Page 11: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/11.jpg)
Subset Construction (cont.)
€
q0+
(n,n)
(n,t)(t,n)
(n,n)
Relation R:
Construction:
(n,n)
€
q0
€
q1
€
q2
![Page 12: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/12.jpg)
Subset Construction (cont.)
€
q0+
(n,n)
(n,t)(t,n)
(n,n)
Relation R:
Construction:
€
q1 ⋅q0*
€
q2
(n,n)
(t,n)
(n,t)
(n,n)
![Page 13: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/13.jpg)
Subset Construction (cont.)
€
q0+
(n,n)
(n,t)(t,n)
(n,n)
Relation R:
Construction:
€
q1 ⋅q0*
€
q2
€
q2 ⋅q1 ⋅q0*
€
q2 ⋅q2
(n,n)
(n,n) (n,n)
(n,n)(t,n)
(n,t) (n,t)
![Page 14: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/14.jpg)
Subset Construction (cont.)
€
q0+
(n,n)
(n,t)(t,n)
(n,n)
Relation R:
Construction:
€
q1 ⋅q0*
€
q2
€
q2 ⋅q1 ⋅q0*
€
q2 ⋅q2
(n,n)
(t,n)
(n,t) (n,t)
(n,n) (n,n)
(n,n)(n,n)
![Page 15: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/15.jpg)
Subset Construction (cont.)
€
q0+
(n,n)
(n,t)(t,n)
(n,n)
Relation R:
Construction:
€
q1 ⋅q0*
€
q2
€
q2 ⋅q1 ⋅q0*
€
q2 ⋅q2
(n,n)
(t,n)
(n,t) (n,t)
(n,n) (n,n)
(n,n)(n,n)
![Page 16: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/16.jpg)
Subset Construction (cont.)
• Automaton built is deterministic
• Computing the image of a set is expensive
• For many examples, sets obtained are simple
Practical problems:
![Page 17: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/17.jpg)
Our Contribution
• The algorithm uses only local information, not global reasoning (bisimulations).
Compared with [DLS01]:
![Page 18: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/18.jpg)
Our Contribution
• Construction does not rely on determinism
• No image computation, but simple “matching”
Compared with [BJNT00]:
![Page 19: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/19.jpg)
An Example
L 1 2 3 R
(e,e) (e,e)
(a,e) (b,a) (d,b) (e,d)
![Page 20: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/20.jpg)
An Example
L 1 2 3 R
(e,e) (e,e)
(a,e) (b,a) (d,b) (e,d)
Compose automaton twice:
(e,e)(e,e)
(a,e) (b,e) (e,b) (e,d)(d,a)LL
1L
21
32
R3
RR
![Page 21: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/21.jpg)
An Example
L 1 2 3 R
(e,e) (e,e)
(a,e) (b,a) (d,b) (e,d)
(e,e) (e,e)
(a,e) (b,e) (e,b) (e,d)(d,a)LL
1L
21
32
R3
RR
![Page 22: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/22.jpg)
An Example
L 1 2 3 R
(e,e) (e,e)
(a,e) (b,a) (d,b) (e,d)
(b,e)
(d,a)
(e,b)
![Page 23: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/23.jpg)
An Example
L 1 2 3 R
(e,e) (e,e)
(a,e) (b,a) (d,b) (e,d)
(b,e)
(d,a)
(e,b)
(d,e) (e,a)
![Page 24: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/24.jpg)
An Example
L 1 2 3 R
(e,e) (e,e)
(a,e) (b,a) (d,b) (e,d)
(b,e)
(d,a)
(e,b)
(d,e) (e,a)
(e,e)
![Page 25: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/25.jpg)
Construction by Matching
Use sets of form:
€
e1 ⋅e2 ⋅L ⋅epWith each sub-expression being one of:
€
q{ }(1)
(2)
€
L+
(3)
€
R+
![Page 26: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/26.jpg)
Construction by Matching (cont.)
(e,e)(e,e)
(a,e) (b,e) (e,b) (e,d)(d,a)LL
1L
21
32
R3
RR
Examples of sets:
€
L+
€
2{ } 1{ }
€
R+ 3{ }
![Page 27: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/27.jpg)
Construction by Matching (cont.)
Properties of such sets:(1) Can be made canonical representation (2) Closed under an operation similar to concatenation(3) Induce equivalence relation
![Page 28: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/28.jpg)
Property (1)
Canonicity: always take the largest set !
€
q ⋅q∈ q+ ⋅q+ ⊂q+
![Page 29: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/29.jpg)
Property (2)
Define operator * as follows:
€
e1∗e2 =e1e1 ⋅e2
⎧ ⎨ ⎩ otherwise
if
€
e1 = e2 = q+
![Page 30: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/30.jpg)
Property (2)
Using the * operator:
L+ 1 L+ L+
L+
L+ * L+ 1 * L+
1 * L+
(a,e) (e,e)
(a,e)
(a,e)
![Page 31: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/31.jpg)
Property (3)
When can we merge states ?
€
w1
€
w2
€
w2
€
w1
1
2
1/2
![Page 32: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/32.jpg)
Property (3) (cont.)
Does our equivalence relation satisfy this ?Yes !
€
w1
€
w2
€
w2
€
w1
€
≈
€
≈
€
≈
€
≈ LL
L
LL
q
q1q2
q1q2q
q
![Page 33: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/33.jpg)
Property (3) (cont.)
€
w1
€
w2
€
w2
€
w1
€
≈
€
≈
€
≈
€
≈LL
L
L
q1
q2
q1
q2q1
Property needs to be symmetric !
![Page 34: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/34.jpg)
The Algorithm
• Initialization: replace copying states “q” with “q+”, leave the rest;
• Step k+1: for a transition of step k and a transition of step 0, if “match” then add the combined transition;
• Stop: when reach fixed point.
![Page 35: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/35.jpg)
Example
L 1 2 3 R
(e,e) (e,e)
(a,e) (b,a) (d,b) (e,d)
Run the initialization step.
![Page 36: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/36.jpg)
Example
L+ 1 2 3 R+
(e,e) (e,e)
(a,e) (b,a) (d,b) (e,d)
![Page 37: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/37.jpg)
Example
L+ 1 2 3 R+
(e,e) (e,e)
(a,e) (b,a) (d,b) (e,d)
Match transitions in red.
![Page 38: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/38.jpg)
Example
L+ 1 2 3 R+
(e,e) (e,e)
(a,e) (b,a) (d,b) (e,d)
1 L+
(a,e)
![Page 39: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/39.jpg)
Example
L+ 1 2 3 R+
(e,e) (e,e)
(a,e) (b,a) (d,b) (e,d)
1 L+
(a,e)
![Page 40: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/40.jpg)
Example
L+ 1 2 3 R+
(e,e) (e,e)
(a,e) (b,a) (d,b) (e,d)
1 L+
(a,e)
2 1(b,e)
![Page 41: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/41.jpg)
ResultsAlgorithm Subset
ConstructionMatching Speedup
Dijkstra 435s 39s 11.2
Szymanski 278s 178s 1.5
Termination detection
47s 22s 2.1
Ticket 17s 20s 0.85
![Page 42: Regular Model Checking Made Simple and Efficient P. Abdulla, B. Jonsson, M. Nilsson and J. d’Orso Uppsala University.](https://reader036.fdocuments.us/reader036/viewer/2022062423/56649f305503460f94c4a856/html5/thumbnails/42.jpg)
Future Work
• Extend to other systems e.g. trees, push-down systems, graphs, etc…
• Experiment underlying data structure Graphical interface for this tool