|
|
@ -1,9 +1,13 @@ |
|
|
|
|
|
const int K; // discrete time bound |
|
|
|
|
|
|
|
|
label "hungry" = ((p1>0) & (p1<8)) | ((p2>0) & (p2<8)) | ((p3>0) & (p3<8)) | ((p4>0) & (p4<8)) | ((p5>0) & (p5<8)) | ((p6>0) & (p6<8)) | ((p7>0) & (p7<8)) | ((p8>0) & (p8<8)) | ((p9>0) & (p9<8)); |
|
|
label "hungry" = ((p1>0) & (p1<8)) | ((p2>0) & (p2<8)) | ((p3>0) & (p3<8)) | ((p4>0) & (p4<8)) | ((p5>0) & (p5<8)) | ((p6>0) & (p6<8)) | ((p7>0) & (p7<8)) | ((p8>0) & (p8<8)) | ((p9>0) & (p9<8)); |
|
|
label "eat" = (p1=8..9) | (p2=8..9) | (p3=8..9) | (p4=8..9) | (p5=8..9) | (p6=8..9) | (p7=8..9) | (p8=8..9) | (p9=8..9); |
|
|
label "eat" = (p1=8..9) | (p2=8..9) | (p3=8..9) | (p4=8..9) | (p5=8..9) | (p6=8..9) | (p7=8..9) | (p8=8..9) | (p9=8..9); |
|
|
|
|
|
|
|
|
// liveness (if a philosopher is hungry then eventually some philosopher eats) |
|
|
// liveness (if a philosopher is hungry then eventually some philosopher eats) |
|
|
"hungry" => P>=1 [ true U "eat"] |
|
|
"hungry" => P>=1 [ true U "eat"] |
|
|
|
|
|
|
|
|
// bounded until (minimum probability, from a state where someone is hungry, that a philosopher will eat within K steps) |
|
|
// bounded until (minimum probability, from a state where someone is hungry, that a philosopher will eat within K steps) |
|
|
const int K; |
|
|
|
|
|
Pmin=?[true U<=K "eat" {"hungry"}{min}] |
|
|
Pmin=?[true U<=K "eat" {"hungry"}{min}] |
|
|
|
|
|
|
|
|
// expected time (from a state where someone is hungry the maximum exapected number of steps until a philosopher eats) |
|
|
// expected time (from a state where someone is hungry the maximum exapected number of steps until a philosopher eats) |
|
|
Rmax=?[F "eat" {"hungry"}{max}] |
|
|
Rmax=?[F "eat" {"hungry"}{max}] |