mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 10:25:18 +00:00
fix bug incorrect clearing of goals during node creation. Issue #777
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
a5bae72bdf
commit
2ff5af7d42
|
@ -1001,14 +1001,20 @@ namespace datalog {
|
|||
if (is_quantifier(body)) {
|
||||
quantifier* q = to_quantifier(body);
|
||||
expr* e = q->get_expr();
|
||||
VERIFY(m.is_implies(e, body, e2));
|
||||
fml = m.mk_quantifier(false, q->get_num_decls(),
|
||||
q->get_decl_sorts(), q->get_decl_names(),
|
||||
body);
|
||||
if (m.is_implies(e, body, e2)) {
|
||||
fml = m.mk_quantifier(false, q->get_num_decls(),
|
||||
q->get_decl_sorts(), q->get_decl_names(),
|
||||
body);
|
||||
}
|
||||
else {
|
||||
fml = body;
|
||||
}
|
||||
}
|
||||
else {
|
||||
VERIFY(m.is_implies(body, body, e2));
|
||||
fml = body;
|
||||
if (m.is_implies(body, body, e2)) {
|
||||
fml = body;
|
||||
}
|
||||
}
|
||||
queries.push_back(fml);
|
||||
}
|
||||
|
|
|
@ -895,14 +895,12 @@ namespace pdr {
|
|||
|
||||
|
||||
void model_node::dequeue(model_node*& root) {
|
||||
TRACE("pdr", tout << this << " " << state() << "\n";);
|
||||
root = 0;
|
||||
TRACE("pdr", tout << this << " root: " << root << " " << state() << "\n";);
|
||||
if (!m_next && !m_prev) return;
|
||||
SASSERT(m_next);
|
||||
SASSERT(m_prev);
|
||||
SASSERT(children().empty());
|
||||
if (this == m_next) {
|
||||
// SASSERT(root == this);
|
||||
root = 0;
|
||||
}
|
||||
else {
|
||||
|
@ -975,7 +973,7 @@ namespace pdr {
|
|||
}
|
||||
|
||||
void model_search::enqueue_leaf(model_node* n) {
|
||||
TRACE("pdr_verbose", tout << n << " " << n->state() << " goal: " << m_goal << "\n";);
|
||||
TRACE("pdr_verbose", tout << "node: " << n << " " << n->state() << " goal: " << m_goal << "\n";);
|
||||
SASSERT(n->is_open());
|
||||
if (!m_goal) {
|
||||
m_goal = n;
|
||||
|
@ -1005,7 +1003,7 @@ namespace pdr {
|
|||
return m_cache[l];
|
||||
}
|
||||
|
||||
void model_search::erase_children(model_node& n, bool backtrack) {
|
||||
void model_search::erase_children(model_node& n, bool backtrack) {
|
||||
ptr_vector<model_node> todo, nodes;
|
||||
todo.append(n.children());
|
||||
remove_goal(n);
|
||||
|
|
|
@ -148,6 +148,7 @@ lbool dl_interface::query(expr * query) {
|
|||
TRACE("pdr",
|
||||
tout << "rules:\n";
|
||||
m_ctx.display_rules(tout);
|
||||
m_ctx.display_smt2(0, 0, tout);
|
||||
);
|
||||
|
||||
IF_VERBOSE(2, m_ctx.display_rules(verbose_stream()););
|
||||
|
|
Loading…
Reference in a new issue