File tree Expand file tree Collapse file tree 4 files changed +10
-3
lines changed
contracts/quantifiers-loop-01
contracts-dfcc/quantifiers-loop-01
goto-instrument/contracts Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
1
#include <assert.h>
2
+ #include <stdbool.h>
2
3
3
4
#define N 16
4
5
5
6
void main ()
6
7
{
7
8
int a [N ];
8
9
a [10 ] = 0 ;
10
+ bool flag = true;
9
11
10
12
for (int i = 0 ; i < N ; ++ i )
11
13
// clang-format off
12
14
__CPROVER_assigns (i , __CPROVER_object_whole (a ))
13
15
__CPROVER_loop_invariant (
14
16
(0 <= i ) && (i <= N ) &&
15
- __CPROVER_forall {
17
+ flag == __CPROVER_forall {
16
18
int k ;
17
19
// constant bounds for explicit unrolling with SAT backend
18
20
(0 <= k && k <= N ) == > (
Original file line number Diff line number Diff line change 1
1
#include <assert.h>
2
+ #include <stdbool.h>
2
3
3
4
#define N 16
4
5
5
6
void main ()
6
7
{
7
8
int a [N ];
8
9
a [10 ] = 0 ;
10
+ bool flag = true;
9
11
10
12
for (int i = 0 ; i < N ; ++ i )
11
13
// clang-format off
12
14
__CPROVER_assigns (i , __CPROVER_object_whole (a ))
13
15
__CPROVER_loop_invariant (
14
16
(0 <= i ) && (i <= N ) &&
15
- __CPROVER_forall {
17
+ flag == __CPROVER_forall {
16
18
int k ;
17
19
// constant bounds for explicit unrolling with SAT backend
18
20
(0 <= k && k <= N ) == > (
Original file line number Diff line number Diff line change @@ -376,7 +376,9 @@ void add_quantified_variable(
376
376
auto &unary_expression = to_unary_expr (expression);
377
377
add_quantified_variable (symbol_table, unary_expression.op (), mode);
378
378
}
379
- if (expression.id () == ID_notequal || expression.id () == ID_implies)
379
+ if (
380
+ expression.id () == ID_notequal || expression.id () == ID_equal ||
381
+ expression.id () == ID_implies)
380
382
{
381
383
// For binary connectives, recursively check for
382
384
// nested quantified formulae in the left and right terms
Original file line number Diff line number Diff line change 17
17
#include < util/symbol.h>
18
18
19
19
#include " goto_symex_state.h"
20
+ #include < iostream>
20
21
21
22
renamedt<ssa_exprt, L0>
22
23
symex_level0 (ssa_exprt ssa_expr, const namespacet &ns, std::size_t thread_nr)
You can’t perform that action at this time.
0 commit comments