File tree 3 files changed +27
-13
lines changed
Quantifiers-two-dimension-array
3 files changed +27
-13
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,20 @@ int main()
10
10
// clang-format would rewrite the "==>" as "== >"
11
11
__CPROVER_assume (!__CPROVER_exists { int i ; (i >=0 && i < 2 ) == > (__CPROVER_exists {int j ; (j >=0 && j < 2 ) == > a [i ][j ]<=10 }) });
12
12
13
+ assert (0 );
14
+
13
15
__CPROVER_assume (__CPROVER_forall { int i ; (i >=0 && i < 2 ) == > (!__CPROVER_exists {int j ; (j >=0 && j < 2 ) == > b [i ][j ]>=1 && b [i ][j ]<=10 }) });
14
16
17
+ assert (0 );
18
+
15
19
__CPROVER_assume (!__CPROVER_exists { int i ; (i >=0 && i < 2 ) == > (!__CPROVER_exists {int j ; (j >=0 && j < 2 ) == > c [i ][j ]>=1 && c [i ][j ]<=10 }) });
16
20
21
+ assert (0 );
22
+
17
23
__CPROVER_assume (!__CPROVER_exists { int i ; (i >=0 && i < 2 ) == > (__CPROVER_forall {int j ; (j >=0 && j < 2 ) == > d [i ][j ]>=1 && d [i ][j ]<=10 }) });
18
24
// clang-format on
19
25
26
+ assert (0 );
20
27
21
28
assert (a [0 ][0 ]> 10 );
22
29
Original file line number Diff line number Diff line change 1
- CORE
1
+ KNOWNBUG
2
2
main.c
3
3
4
4
^\*\* Results:$
5
- ^\[main.assertion.1 \] line 21 assertion a\[.*\]\[.*\] > 10: SUCCESS$
6
- ^\[main.assertion.2 \] line 23 assertion tmp_if_expr\$\d+: SUCCESS$
7
- ^\[main.assertion.3 \] line 24 assertion tmp_if_expr\$\d+: SUCCESS$
8
- ^\[main.assertion.4 \] line 26 assertion tmp_if_expr\$\d+: SUCCESS$
9
- ^\[main.assertion.5 \] line 28 assertion tmp_if_expr\$\d+: SUCCESS$
10
- ^\[main.assertion.6 \] line 29 assertion tmp_if_expr\$\d+: SUCCESS$
11
- ^\*\* 0 of 6 failed
5
+ ^\[main.assertion.5 \] line 28 assertion a\[.*\]\[.*\] > 10: SUCCESS$
6
+ ^\[main.assertion.6 \] line 30 assertion tmp_if_expr\$\d+: SUCCESS$
7
+ ^\[main.assertion.7 \] line 31 assertion tmp_if_expr\$\d+: SUCCESS$
8
+ ^\[main.assertion.8 \] line 33 assertion tmp_if_expr\$\d+: SUCCESS$
9
+ ^\[main.assertion.9 \] line 35 assertion tmp_if_expr\$\d+: SUCCESS$
10
+ ^\[main.assertion.10 \] line 36 assertion tmp_if_expr\$\d+: SUCCESS$
11
+ ^\*\* 0 of 10 failed
12
12
^VERIFICATION SUCCESSFUL$
13
13
^EXIT=0$
14
14
^SIGNAL=0$
15
15
--
16
16
^warning: ignoring
17
+ --
18
+ All assertions are unreachable as each of the __CPROVER_assume evaluate to false
19
+ (!exists i. i>=0 && i<2 ==> ... is equivalent to forall i. i>=0 && i<2 && ...,
20
+ where neither i>=0 nor i<2 is actually true for all values of i).
Original file line number Diff line number Diff line change 1
- CORE
1
+ KNOWNBUG
2
2
main.c
3
3
4
4
^\*\* Results:$
5
5
^\[main.assertion.1\] line 12 assertion a\[.*\]\[.*\] == 0: SUCCESS$
6
6
^\[main.assertion.2\] line 13 assertion a\[.*\]\[.*\] == 1: SUCCESS$
7
7
^\[main.assertion.3\] line 14 assertion a\[.*\]\[.*\] == 1: SUCCESS$
8
8
^\[main.assertion.4\] line 15 assertion a\[.*\]\[.*\] == 2: SUCCESS$
9
- ^\[main.assertion.5\] line 16 assertion tmp_if_expr\$\d+: SUCCESS $
10
- ^\*\* 0 of 5 failed
11
- ^VERIFICATION SUCCESSFUL $
12
- ^EXIT=0 $
9
+ ^\[main.assertion.5\] line 16 assertion tmp_if_expr\$\d+: FAILURE $
10
+ ^\*\* 1 of 5 failed
11
+ ^VERIFICATION FAILED $
12
+ ^EXIT=10 $
13
13
^SIGNAL=0$
14
14
--
15
15
^warning: ignoring
16
+ --
17
+ The assertion on line 13 need not hold as the assume can be satisfied by picking
18
+ a value for i that does not fulfil the left-hand side of the implication.
You can’t perform that action at this time.
0 commit comments