Model counters3¶
Cited in: [GulwaniMC09] fig. 3 p. 6.
Tag: complexity.
Figure¶
Source code¶
model gulwani_mehra_chilimbi_popl09_06c {
var x, n, c;
states q1, q2;
transition t1 := {
from := q1;
to := q2;
guard := x < n;
action := ;
};
transition t3 := {
from := q2;
to := q1;
guard := true;
action := ;
};
transition t2 := {
from := q2;
to := q2;
guard := x < n;
action := x' = x + 1, c' = c + 1;
};
}
strategy gulwani_mehra_chilimbi_popl09_06c_s {
Region init := {state = q1 && x = 0 && c = 0 && n >= 0};
}
Expected invariant¶
{ q2[v1, v2, v3] : v3 <= v2; q1[v1, v2, v3] : v3 <= v2 }
Results¶
- With Aspic: { q2[x, n, x] : n >= x and n >= 1 and x >= 0; q1[x, n, x] : x >= 0 and n >= 0 and n >= x } (0.05s), OK.
- With ISL: { q2[x__1, n__1, x__1] : n__1 >= 0 and n__1 >= x__1 and x__1 >= 1; q2[0, n__1, 0] : n__1 >= 1; q1[x__1, n__1, x__1] : n__1 >= 0 and n__1 >= x__1 and x__1 >= 1; q1[0, n__1, 0] : n__1 >= 1 or n__1 >= 0 } (0.02s), OK.