8
8
9
9
#include " boolbv.h"
10
10
11
+ #include < iostream>
12
+ #include < util/format_expr.h>
13
+
11
14
#include < util/arith_tools.h>
12
15
#include < util/expr_util.h>
13
16
#include < util/invariant.h>
@@ -169,11 +172,18 @@ instantiate_quantifier(const quantifier_exprt &expr, const namespacet &ns)
169
172
170
173
if (expr.id ()==ID_forall)
171
174
{
172
- return conjunction (expr_insts);
175
+ #if 0
176
+ if(re.id() == ID_and)
177
+ {
178
+ expr_insts.push_back(binary_predicate_exprt(var_expr, ID_gt, from_integer(lb, var_expr.type())));
179
+ expr_insts.push_back(binary_predicate_exprt(var_expr, ID_le, from_integer(ub, var_expr.type())));
180
+ }
181
+ #endif
182
+ return simplify_expr (conjunction (expr_insts), ns);
173
183
}
174
184
else if (expr.id () == ID_exists)
175
185
{
176
- return disjunction (expr_insts);
186
+ return simplify_expr ( disjunction (expr_insts), ns );
177
187
}
178
188
179
189
UNREACHABLE;
@@ -183,10 +193,12 @@ literalt boolbvt::convert_quantifier(const quantifier_exprt &src)
183
193
{
184
194
PRECONDITION (src.id () == ID_forall || src.id () == ID_exists);
185
195
196
+ std::cerr << " Instantiate: " << format (src) << std::endl;
186
197
const auto res = instantiate_quantifier (src, ns);
187
198
188
199
if (res)
189
200
{
201
+ std::cerr << " Instantiated: " << format (*res) << std::endl;
190
202
return convert_bool (*res);
191
203
}
192
204
else
0 commit comments