3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-05-21 01:19:34 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-04-08 04:56:15 -07:00
parent dde0c9bd0d
commit 7595371721
5 changed files with 22 additions and 19 deletions

View file

@ -1000,19 +1000,18 @@ namespace datalog {
var_subst vs(m, false);
expr_ref new_head_e = vs(m_head, subst_vals.size(), subst_vals.c_ptr());
m.inc_ref(new_head_e);
app_ref new_head_a = rm.ensure_app(vs(m_head, subst_vals.size(), subst_vals.c_ptr()));
m.inc_ref(new_head_a);
m.dec_ref(m_head);
m_head = to_app(new_head_e);
m_head = new_head_a;
for (unsigned i = 0; i < m_tail_size; i++) {
app * old_tail = get_tail(i);
expr_ref new_tail_e = vs(old_tail, subst_vals.size(), subst_vals.c_ptr());
app_ref new_tail_a = rm.ensure_app(vs(old_tail, subst_vals.size(), subst_vals.c_ptr()));
bool sign = is_neg_tail(i);
m.inc_ref(new_tail_e);
m.inc_ref(new_tail_a);
m.dec_ref(old_tail);
m_tail[i] = TAG(app *, to_app(new_tail_e), sign);
m_tail[i] = TAG(app *, new_tail_a.get(), sign);
}
}