Browse Source
Better testing for strict/diagonal constraints in PTA digital clocks (+ test cases).
accumulation-v4.7
Better testing for strict/diagonal constraints in PTA digital clocks (+ test cases).
accumulation-v4.7
7 changed files with 130 additions and 21 deletions
-
27prism-tests/functionality/verify/ptas/notallowed/digital-diag2.nm
-
12prism-tests/functionality/verify/ptas/notallowed/digital-diag2.nm.props
-
1prism-tests/functionality/verify/ptas/notallowed/digital-diag2.nm.props.args
-
27prism-tests/functionality/verify/ptas/notallowed/digital-strict2.nm
-
10prism-tests/functionality/verify/ptas/notallowed/digital-strict2.nm.props
-
1prism-tests/functionality/verify/ptas/notallowed/digital-strict2.nm.props.args
-
73prism/src/pta/DigitalClocks.java
@ -0,0 +1,27 @@ |
|||
// PTA used as running example in FORMATS'09 paper |
|||
// (modified version of) |
|||
|
|||
pta |
|||
|
|||
module M |
|||
|
|||
s : [0..3]; |
|||
x : clock; |
|||
y : clock; |
|||
|
|||
[] s=0 -> 0.6 : (s'=1) + 0.4 : (s'=2)&(x'=0); |
|||
[] s=1 & x=0 -> (s'=3); |
|||
[] s=1 & y>=2 -> (s'=1)&(y'=0); |
|||
[] s=2 & x=0 & y=1 -> (s'=3)&(y'=0); |
|||
[] s=2 & x>=2 -> (s'=1)&(y'=0); |
|||
[] s=3 -> (s'=3); |
|||
|
|||
endmodule |
|||
|
|||
label "target" = s=3; |
|||
label "end" = s=3 | s=1; |
|||
|
|||
rewards "time" |
|||
true : 1; |
|||
endrewards |
|||
|
|||
@ -0,0 +1,12 @@ |
|||
label "target2" = s=3 & x<=y; |
|||
|
|||
label "target3" = x=y; |
|||
|
|||
// RESULT: Error:diagonal |
|||
Pmax=? [ F "target" & x>=y ]; |
|||
|
|||
// RESULT: Error:diagonal |
|||
Pmax=? [ F "target2" ]; |
|||
|
|||
// RESULT: Error:diagonal |
|||
Pmax=? [ F "target3" ]; |
|||
@ -0,0 +1 @@ |
|||
-ptamethod digital |
|||
@ -0,0 +1,27 @@ |
|||
// PTA used as running example in FORMATS'09 paper |
|||
// (modified version of) |
|||
|
|||
pta |
|||
|
|||
module M |
|||
|
|||
s : [0..3]; |
|||
x : clock; |
|||
y : clock; |
|||
|
|||
[] s=0 -> 0.6 : (s'=1) + 0.4 : (s'=2)&(x'=0); |
|||
[] s=1 & x=0 -> (s'=3); |
|||
[] s=1 & y>=2 -> (s'=1)&(y'=0); |
|||
[] s=2 & x=0 & y=1 -> (s'=3)&(y'=0); |
|||
[] s=2 & x>=2 -> (s'=1)&(y'=0); |
|||
[] s=3 -> (s'=3); |
|||
|
|||
endmodule |
|||
|
|||
label "target" = s=3; |
|||
label "end" = s=3 | s=1; |
|||
|
|||
rewards "time" |
|||
true : 1; |
|||
endrewards |
|||
|
|||
@ -0,0 +1,10 @@ |
|||
label "target2" = s=3 & x<2; |
|||
|
|||
// RESULT: 0.6 |
|||
Pmax=? [ F "target" ] |
|||
|
|||
// RESULT: Error:strict |
|||
Pmax=? [ F (s=3 & x<2) ] |
|||
|
|||
// RESULT: Error:strict |
|||
Pmax=? [ F "target2" ] |
|||
@ -0,0 +1 @@ |
|||
-ptamethod digital |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue