File tree 4 files changed +36
-0
lines changed
regression/cbmc/Quantifiers-simplify
4 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ int main ()
2
+ {
3
+ __CPROVER_assert (
4
+ !__CPROVER_forall {
5
+ int i ;
6
+ i >= 0
7
+ },
8
+ "simplify" );
9
+
10
+ return 0 ;
11
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --program-only
4
+ ASSERT\(exists \{ signed int i!0#0; !\(i!0#0 >= 0\) \}\)$
5
+ ^EXIT=0$
6
+ ^SIGNAL=0$
7
+ --
8
+ ^warning: ignoring
Original file line number Diff line number Diff line change
1
+ KNOWNBUG
2
+ main.c
3
+
4
+ ^VERIFICATION SUCCESSFUL$
5
+ ^EXIT=0$
6
+ ^SIGNAL=0$
7
+ --
8
+ ^warning: ignoring
Original file line number Diff line number Diff line change @@ -222,6 +222,15 @@ bool simplify_exprt::simplify_not(exprt &expr)
222
222
expr = rewritten_op;
223
223
return false ;
224
224
}
225
+ else if (op.id () == ID_forall) // !(forall: a) <-> exists: not a
226
+ {
227
+ auto const &op_as_forall = to_forall_expr (op);
228
+ exists_exprt rewritten_op (
229
+ op_as_forall.symbol (), not_exprt (op_as_forall.where ()));
230
+ simplify_node (rewritten_op.where ());
231
+ expr = rewritten_op;
232
+ return false ;
233
+ }
225
234
226
235
return true ;
227
236
}
You can’t perform that action at this time.
0 commit comments