mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 02:42:02 +00:00
fix non-termination
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0a404f94be
commit
289f8360f2
2 changed files with 4 additions and 4 deletions
|
@ -175,7 +175,7 @@ void elim_unconstrained::eliminate() {
|
||||||
if (!inverted)
|
if (!inverted)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
IF_VERBOSE(1, verbose_stream() << "replace " << mk_bounded_pp(t, m) << " / " << mk_bounded_pp(rr, m) << " -> " << mk_bounded_pp(r, m) << "\n");
|
IF_VERBOSE(4, verbose_stream() << "replace " << mk_bounded_pp(t, m) << " / " << mk_bounded_pp(rr, m) << " -> " << mk_bounded_pp(r, m) << "\n");
|
||||||
|
|
||||||
|
|
||||||
TRACE("elim_unconstrained", tout << mk_bounded_pp(t, m) << " / " << mk_bounded_pp(rr, m) << " -> " << mk_bounded_pp(r, m) << "\n");
|
TRACE("elim_unconstrained", tout << mk_bounded_pp(t, m) << " / " << mk_bounded_pp(rr, m) << " -> " << mk_bounded_pp(r, m) << "\n");
|
||||||
|
@ -309,8 +309,10 @@ expr* elim_unconstrained::reconstruct_term(node& n) {
|
||||||
expr_ref new_t(m);
|
expr_ref new_t(m);
|
||||||
while (!todo.empty()) {
|
while (!todo.empty()) {
|
||||||
node* np = todo.back();
|
node* np = todo.back();
|
||||||
if (!np->is_dirty())
|
if (!np->is_dirty()) {
|
||||||
|
todo.pop_back();
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
SASSERT(np->is_root());
|
SASSERT(np->is_root());
|
||||||
auto t = np->term();
|
auto t = np->term();
|
||||||
unsigned sz0 = todo.size();
|
unsigned sz0 = todo.size();
|
||||||
|
|
|
@ -492,14 +492,12 @@ namespace intblast {
|
||||||
else {
|
else {
|
||||||
expr_ref bv2int(bv.mk_bv2int(n->get_expr()), m);
|
expr_ref bv2int(bv.mk_bv2int(n->get_expr()), m);
|
||||||
euf::enode* b2i = ctx.get_enode(bv2int);
|
euf::enode* b2i = ctx.get_enode(bv2int);
|
||||||
if (!b2i) verbose_stream() << bv2int << "\n";
|
|
||||||
SASSERT(b2i);
|
SASSERT(b2i);
|
||||||
VERIFY(b2i);
|
VERIFY(b2i);
|
||||||
arith::arith_value av(ctx);
|
arith::arith_value av(ctx);
|
||||||
rational r;
|
rational r;
|
||||||
VERIFY(av.get_value(b2i->get_expr(), r));
|
VERIFY(av.get_value(b2i->get_expr(), r));
|
||||||
value = bv.mk_numeral(r, bv.get_bv_size(n->get_expr()));
|
value = bv.mk_numeral(r, bv.get_bv_size(n->get_expr()));
|
||||||
verbose_stream() << ctx.bpp(n) << " := " << value << "\n";
|
|
||||||
}
|
}
|
||||||
values.set(n->get_root_id(), value);
|
values.set(n->get_root_id(), value);
|
||||||
TRACE("model", tout << "add_value " << ctx.bpp(n) << " := " << value << "\n");
|
TRACE("model", tout << "add_value " << ctx.bpp(n) << " := " << value << "\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue