Skip to content

Commit 316371c

Browse files
committed
Simple sanity check regression test for simulator.
1 parent 5cb056d commit 316371c

3 files changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Completely deterministic model
2+
// used to do some sanity checks on statistical model checking
3+
4+
dtmc
5+
6+
const int N = 10;
7+
8+
module M
9+
10+
x : [0..N];
11+
12+
[] x<N -> (x'=x+1);
13+
[] x=N -> true;
14+
15+
endmodule
16+
17+
label "end" = x=N;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const int K = 0;
2+
3+
label "not_end" = x<N;
4+
5+
// RESULT: 1.0
6+
P=? [ F "end" ]
7+
8+
// RESULT: 1.0
9+
P=? [ F x=(N+K) ]
10+
11+
// RESULT: 0.0
12+
P=? [ F x=(N+K+1) ]
13+
14+
// RESULT: 1.0
15+
P=? [ "not_end" U "end" ]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-sim
2+
-ex

0 commit comments

Comments
 (0)