Debian Codegraph @

tests/ObjectOriented/dining-philosophers6.expected

raw
1 Considering object completion on:
2 rl [get-hungry] : < p(I) : Philosopher | status : thinking, timer : 0 > => <
3 p(I) : Philosopher | status : hungry > .
4 Transformed rule:
5 rl [get-hungry] : < p(I) : V:Philosopher | status : thinking, timer : 0, Atts
6 > => < p(I) : V:Philosopher | timer : 0, status : hungry, Atts > .
7
8 Considering object completion on:
9 crl [grab-stick] : < p(I) : Philosopher | status : hungry, chopsticks : N > <
10 c(J) : Chopstick | none > => < p(I) : Philosopher | chopsticks : s N > if I
11 == J or s I == J or I == 4 and J == 0 = true .
12 Transformed rule:
13 crl [grab-stick] : < p(I) : V:Philosopher | status : hungry, chopsticks : N,
14 Atts > < c(J) : V2:Chopstick | Atts2 > => < p(I) : V:Philosopher | status :
15 hungry, chopsticks : s N, Atts > if I == J or s I == J or I == 4 and J == 0
16 = true .
17
18 Considering object completion on:
19 rl [eat] : < p(I) : Philosopher | status : hungry, chopsticks : 2 > => < p(I)
20 : Philosopher | status : eating, timer : EATING-TIME > .
21 Transformed rule:
22 rl [eat] : < p(I) : V:Philosopher | status : hungry, chopsticks : 2, timer :
23 A:[Rat,TimeInf], Atts > => < p(I) : V:Philosopher | chopsticks : 2, status
24 : eating, timer : EATING-TIME, Atts > .
25
26 Considering object completion on:
27 eq mte(< p(I) : Philosopher | timer : T, Atts1 > Conf) = minimum(T, mte(
28 Conf)) .
29 Transformed equation:
30 eq mte(< p(I) : V:Philosopher | timer : T, Atts1 > Conf) = minimum(T, mte(
31 Conf)) .
32
33 Considering object completion on:
34 eq delta(< p(I) : Philosopher | timer : T > Conf, T') = < p(I) : Philosopher
35 | timer : (T - T') > delta(Conf, T') .
36 Transformed equation:
37 eq delta(< p(I) : V:Philosopher | timer : T, Atts > Conf, T') = < p(I) :
38 V:Philosopher | timer : (T - T'), Atts > delta(Conf, T') .
39
40 op _`,_ left-identity collapse from AttributeSet to Attribute is unequal.
41 op __ left-identity collapse from Configuration to Object is unequal.
42 ==========================================
43 reduce in DINING-PHILOSOPHERS : initState .
44 rewrites: 7
45 result System: {< p(0) : Philosopher | status : thinking, chopsticks : 0, timer
46 : 0 > < p(1) : Philosopher | status : thinking, chopsticks : 0, timer : 0 >
47 < p(2) : Philosopher | status : thinking, chopsticks : 0, timer : 0 > < p(
48 3) : Philosopher | status : thinking, chopsticks : 0, timer : 0 > < p(4) :
49 Philosopher | status : thinking, chopsticks : 0, timer : 0 > < c(0) :
50 Chopstick | none > < c(1) : Chopstick | none > < c(2) : Chopstick | none >
51 < c(3) : Chopstick | none > < c(4) : Chopstick | none >, 0}
52 ==========================================
53 search [1] in DINING-PHILOSOPHERS : initState =>! S:System .
54
55 Solution 1 (state 1987)
56 states: 2120 rewrites: 284085
57 S:System --> {< p(0) : Philosopher | status : hungry, chopsticks : 1, timer : 0
58 > < p(1) : Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(
59 2) : Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(3) :
60 Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(4) :
61 Philosopher | status : hungry, chopsticks : 1, timer : 0 >, 0}
62 Considering object completion on:
63 eq {< p(P) : Philosopher | status : St > Conf, T} |= phil-status(p(P), St) =
64 true .
65 Transformed equation:
66 eq {< p(P) : V:Philosopher | status : St, Atts > Conf, T} |= phil-status(p(
67 P), St) = true .
68
69 Considering object completion on:
70 eq {< p(P) : Philosopher | chopsticks : N > Conf, T} |= phil-sticks(p(P), N)
71 = true .
72 Transformed equation:
73 eq {< p(P) : V:Philosopher | chopsticks : N, Atts > Conf, T} |= phil-sticks(
74 p(P), N) = true .
75
76 op _`,_ left-identity collapse from AttributeSet to Attribute is unequal.
77 op __ left-identity collapse from Configuration to Object is unequal.
78 op __ left-identity collapse from TransitionList to Transition is unequal.
79 op __ right-identity collapse from TransitionList to Transition is unequal.
80 ==========================================
81 reduce in DINING-PHILOSOPHERS-5-CHECK : modelCheck(initState, []~ (phil-sticks(
82 p(4), 1) /\ (phil-sticks(p(3), 1) /\ (phil-sticks(p(2), 1) /\ (phil-sticks(
83 p(0), 1) /\ phil-sticks(p(1), 1)))))) .
84 ModelChecker: Property automaton has 2 states.
85 ModelCheckerSymbol: Examined 459 system states.
86 rewrites: 48194
87 result ModelCheckResult: counterexample({{< p(0) : Philosopher | status :
88 thinking, chopsticks : 0, timer : 0 > < p(1) : Philosopher | status :
89 thinking, chopsticks : 0, timer : 0 > < p(2) : Philosopher | status :
90 thinking, chopsticks : 0, timer : 0 > < p(3) : Philosopher | status :
91 thinking, chopsticks : 0, timer : 0 > < p(4) : Philosopher | status :
92 thinking, chopsticks : 0, timer : 0 > < c(0) : Chopstick | none > < c(1) :
93 Chopstick | none > < c(2) : Chopstick | none > < c(3) : Chopstick | none >
94 < c(4) : Chopstick | none >, 0}, 'get-hungry} {{< p(0) : Philosopher |
95 status : hungry, chopsticks : 0, timer : 0 > < p(1) : Philosopher | status
96 : thinking, chopsticks : 0, timer : 0 > < p(2) : Philosopher | status :
97 thinking, chopsticks : 0, timer : 0 > < p(3) : Philosopher | status :
98 thinking, chopsticks : 0, timer : 0 > < p(4) : Philosopher | status :
99 thinking, chopsticks : 0, timer : 0 > < c(0) : Chopstick | none > < c(1) :
100 Chopstick | none > < c(2) : Chopstick | none > < c(3) : Chopstick | none >
101 < c(4) : Chopstick | none >, 0}, 'grab-stick} {{< p(0) : Philosopher |
102 status : hungry, chopsticks : 1, timer : 0 > < p(1) : Philosopher | status
103 : thinking, chopsticks : 0, timer : 0 > < p(2) : Philosopher | status :
104 thinking, chopsticks : 0, timer : 0 > < p(3) : Philosopher | status :
105 thinking, chopsticks : 0, timer : 0 > < p(4) : Philosopher | status :
106 thinking, chopsticks : 0, timer : 0 > < c(1) : Chopstick | none > < c(2) :
107 Chopstick | none > < c(3) : Chopstick | none > < c(4) : Chopstick | none >,
108 0}, 'get-hungry} {{< p(0) : Philosopher | status : hungry, chopsticks : 1,
109 timer : 0 > < p(1) : Philosopher | status : hungry, chopsticks : 0, timer :
110 0 > < p(2) : Philosopher | status : thinking, chopsticks : 0, timer : 0 > <
111 p(3) : Philosopher | status : thinking, chopsticks : 0, timer : 0 > < p(4)
112 : Philosopher | status : thinking, chopsticks : 0, timer : 0 > < c(1) :
113 Chopstick | none > < c(2) : Chopstick | none > < c(3) : Chopstick | none >
114 < c(4) : Chopstick | none >, 0}, 'grab-stick} {{< p(0) : Philosopher |
115 status : hungry, chopsticks : 1, timer : 0 > < p(1) : Philosopher | status
116 : hungry, chopsticks : 1, timer : 0 > < p(2) : Philosopher | status :
117 thinking, chopsticks : 0, timer : 0 > < p(3) : Philosopher | status :
118 thinking, chopsticks : 0, timer : 0 > < p(4) : Philosopher | status :
119 thinking, chopsticks : 0, timer : 0 > < c(2) : Chopstick | none > < c(3) :
120 Chopstick | none > < c(4) : Chopstick | none >, 0}, 'get-hungry} {{< p(0) :
121 Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(1) :
122 Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(2) :
123 Philosopher | status : hungry, chopsticks : 0, timer : 0 > < p(3) :
124 Philosopher | status : thinking, chopsticks : 0, timer : 0 > < p(4) :
125 Philosopher | status : thinking, chopsticks : 0, timer : 0 > < c(2) :
126 Chopstick | none > < c(3) : Chopstick | none > < c(4) : Chopstick | none >,
127 0}, 'grab-stick} {{< p(0) : Philosopher | status : hungry, chopsticks : 1,
128 timer : 0 > < p(1) : Philosopher | status : hungry, chopsticks : 1, timer :
129 0 > < p(2) : Philosopher | status : hungry, chopsticks : 1, timer : 0 > <
130 p(3) : Philosopher | status : thinking, chopsticks : 0, timer : 0 > < p(4)
131 : Philosopher | status : thinking, chopsticks : 0, timer : 0 > < c(3) :
132 Chopstick | none > < c(4) : Chopstick | none >, 0}, 'get-hungry} {{< p(0) :
133 Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(1) :
134 Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(2) :
135 Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(3) :
136 Philosopher | status : hungry, chopsticks : 0, timer : 0 > < p(4) :
137 Philosopher | status : thinking, chopsticks : 0, timer : 0 > < c(3) :
138 Chopstick | none > < c(4) : Chopstick | none >, 0}, 'grab-stick} {{< p(0) :
139 Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(1) :
140 Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(2) :
141 Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(3) :
142 Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(4) :
143 Philosopher | status : thinking, chopsticks : 0, timer : 0 > < c(4) :
144 Chopstick | none >, 0}, 'get-hungry} {{< p(0) : Philosopher | status :
145 hungry, chopsticks : 1, timer : 0 > < p(1) : Philosopher | status : hungry,
146 chopsticks : 1, timer : 0 > < p(2) : Philosopher | status : hungry,
147 chopsticks : 1, timer : 0 > < p(3) : Philosopher | status : hungry,
148 chopsticks : 1, timer : 0 > < p(4) : Philosopher | status : hungry,
149 chopsticks : 0, timer : 0 > < c(4) : Chopstick | none >, 0}, 'grab-stick},
150 {{< p(0) : Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(
151 1) : Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(2) :
152 Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(3) :
153 Philosopher | status : hungry, chopsticks : 1, timer : 0 > < p(4) :
154 Philosopher | status : hungry, chopsticks : 1, timer : 0 >, 0}, deadlock})
155 Bye.