Skip to content

Commit 77f1e4c

Browse files
committed
WIP: Debugging output and additional constraint
1 parent 4e0fda8 commit 77f1e4c

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/solvers/flattening/boolbv_quantifier.cpp

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ Author: Daniel Kroening, [email protected]
88

99
#include "boolbv.h"
1010

11+
#include <iostream>
12+
#include <util/format_expr.h>
13+
1114
#include <util/arith_tools.h>
1215
#include <util/expr_util.h>
1316
#include <util/invariant.h>
@@ -169,11 +172,18 @@ instantiate_quantifier(const quantifier_exprt &expr, const namespacet &ns)
169172

170173
if(expr.id()==ID_forall)
171174
{
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);
173183
}
174184
else if(expr.id() == ID_exists)
175185
{
176-
return disjunction(expr_insts);
186+
return simplify_expr(disjunction(expr_insts), ns);
177187
}
178188

179189
UNREACHABLE;
@@ -183,10 +193,12 @@ literalt boolbvt::convert_quantifier(const quantifier_exprt &src)
183193
{
184194
PRECONDITION(src.id() == ID_forall || src.id() == ID_exists);
185195

196+
std::cerr << "Instantiate: " << format(src) << std::endl;
186197
const auto res = instantiate_quantifier(src, ns);
187198

188199
if(res)
189200
{
201+
std::cerr << "Instantiated: " << format(*res) << std::endl;
190202
return convert_bool(*res);
191203
}
192204
else

0 commit comments

Comments
 (0)