File tree Expand file tree Collapse file tree 6 files changed +66
-2
lines changed
Quantifiers-statement-expression2 Expand file tree Collapse file tree 6 files changed +66
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ int main()
5
5
6
6
// clang-format off
7
7
// clang-format would rewrite the "==>" as "== >"
8
- __CPROVER_assume ( __CPROVER_forall { char i ; ({ _Bool flag = (i >=0 && i < 2 ); flag == > b [i ]>=10 && b [i ]<=10 ; }) } );
8
+ __CPROVER_assume ( __CPROVER_forall { signed char i ; ({ _Bool flag = (i >=0 && i < 2 ); flag == > b [i ]>=10 && b [i ]<=10 ; }) } );
9
9
__CPROVER_assume ( __CPROVER_forall { unsigned i ; ({ _Bool flag = (i >=0 && i < 2 ); flag == > c [i ]>=10 && c [i ]<=10 ; }) } );
10
10
// clang-format on
11
11
Original file line number Diff line number Diff line change
1
+ int main ()
2
+ {
3
+ int b [2 ];
4
+ int c [2 ];
5
+
6
+ // clang-format off
7
+ // clang-format would rewrite the "==>" as "== >"
8
+ __CPROVER_assume ( __CPROVER_forall { unsigned char i ; ({ _Bool flag = (i >=0 && i < 2 ); flag == > b [i ]>=10 && b [i ]<=10 ; }) } );
9
+ __CPROVER_assume ( __CPROVER_forall { unsigned i ; ({ _Bool flag = (i >=0 && i < 2 ); flag == > c [i ]>=10 && c [i ]<=10 ; }) } );
10
+ // clang-format on
11
+
12
+ assert (b [0 ] == 10 && b [1 ] == 10 );
13
+ assert (c [0 ] == 10 && c [1 ] == 10 );
14
+
15
+ return 0 ;
16
+ }
Original file line number Diff line number Diff line change
1
+ CORE broken-cprover-smt-backend no-new-smt
2
+ main.c
3
+
4
+ ^\*\* Results:$
5
+ ^\[main.assertion.1\] line 12 assertion b\[.*0\] == 10 && b\[.*1\] == 10: SUCCESS$
6
+ ^\[main.assertion.2\] line 13 assertion c\[.*0\] == 10 && c\[.*1\] == 10: SUCCESS$
7
+ ^VERIFICATION SUCCESSFUL$
8
+ ^EXIT=0$
9
+ ^SIGNAL=0$
10
+ --
11
+ ^warning: ignoring
12
+ --
13
+ skip_typecast as used in expr_eq of boolbv_quantifier.cpp no longer applies when
14
+ using an unsigned char, which makes our quantifier instantiation fail when
15
+ triggered from our in-tree SMT solver. We need to audit all uses of
16
+ skip_typecast as some of these may even be unsound.
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ int main()
5
5
6
6
// clang-format off
7
7
// clang-format would rewrite the "==>" as "== >"
8
- __CPROVER_assume ( __CPROVER_forall { char i ; (i >=0 && i < 2 ) == > b [i ]>=10 && b [i ]<=10 } );
8
+ __CPROVER_assume ( __CPROVER_forall { signed char i ; (i >=0 && i < 2 ) == > b [i ]>=10 && b [i ]<=10 } );
9
9
__CPROVER_assume ( __CPROVER_forall { unsigned i ; (i >=0 && i < 2 ) == > c [i ]>=10 && c [i ]<=10 } );
10
10
// clang-format on
11
11
Original file line number Diff line number Diff line change
1
+ int main ()
2
+ {
3
+ int b [2 ];
4
+ int c [2 ];
5
+
6
+ // clang-format off
7
+ // clang-format would rewrite the "==>" as "== >"
8
+ __CPROVER_assume ( __CPROVER_forall { unsigned char i ; (i >=0 && i < 2 ) == > b [i ]>=10 && b [i ]<=10 } );
9
+ __CPROVER_assume ( __CPROVER_forall { unsigned i ; (i >=0 && i < 2 ) == > c [i ]>=10 && c [i ]<=10 } );
10
+ // clang-format on
11
+
12
+ assert (b [0 ] == 10 && b [1 ] == 10 );
13
+ assert (c [0 ] == 10 && c [1 ] == 10 );
14
+
15
+ return 0 ;
16
+ }
Original file line number Diff line number Diff line change
1
+ CORE broken-cprover-smt-backend no-new-smt
2
+ unsigned-char.c
3
+
4
+ ^\*\* Results:$
5
+ ^\[main.assertion.1\] line 12 assertion b\[.*0\] == 10 && b\[.*1\] == 10: SUCCESS$
6
+ ^\[main.assertion.2\] line 13 assertion c\[.*0\] == 10 && c\[.*1\] == 10: SUCCESS$
7
+ ^VERIFICATION SUCCESSFUL$
8
+ ^EXIT=0$
9
+ ^SIGNAL=0$
10
+ --
11
+ ^warning: ignoring
12
+ --
13
+ skip_typecast as used in expr_eq of boolbv_quantifier.cpp no longer applies when
14
+ using an unsigned char, which makes our quantifier instantiation fail when
15
+ triggered from our in-tree SMT solver. We need to audit all uses of
16
+ skip_typecast as some of these may even be unsound.
You can’t perform that action at this time.
0 commit comments