File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
regression/cbmc-incr-smt2/bitvector-arithmetic-operators Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ #include <stdbool.h>
2
+
3
+ int main ()
4
+ {
5
+ int x ;
6
+ __CPROVER_assume (x < 100 );
7
+ __CPROVER_assume (x > -100 );
8
+ bool quadratic_solved = (x + 8 ) * (x - 42 ) == 0 ;
9
+
10
+ if (x < 0 )
11
+ __CPROVER_assert (!quadratic_solved , "No negative solution" );
12
+ else
13
+ __CPROVER_assert (!quadratic_solved , "No positive solution" );
14
+
15
+ return 0 ;
16
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ polynomial.c
3
+ --incremental-smt2-solver 'z3 --smt2 -in' --trace
4
+ \[main\.assertion\.1\] line \d+ No negative solution: FAILURE
5
+ \[main\.assertion\.2\] line \d+ No positive solution: FAILURE
6
+ x=-8\ \(11111111 11111111 11111111 11111000\)
7
+ x=42\ \(00000000 00000000 00000000 00101010\)
8
+ ^VERIFICATION FAILED$
9
+ ^EXIT=10$
10
+ ^SIGNAL=0$
11
+ --
12
+ --
13
+ This is an end-to-end test making sure that CBMC has encoded
14
+ the problem and sent it to the SMT solver, and we manage to
15
+ get the solutions to the polynomial back through the trace.
You can’t perform that action at this time.
0 commit comments