3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-22 16:45:31 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-02-17 19:37:47 -10:00
parent 1959b7c48a
commit f810f25d8d
4 changed files with 10 additions and 11 deletions

View file

@ -157,10 +157,8 @@ bool quasi_macros::is_quasi_macro(expr * e, app_ref & a, expr_ref & t) const {
if (is_forall(e)) {
quantifier * q = to_quantifier(e);
expr * qe = q->get_expr();
if ((m_manager.is_eq(qe))) {
expr * lhs = to_app(qe)->get_arg(0);
expr * rhs = to_app(qe)->get_arg(1);
expr * qe = q->get_expr(), *lhs = nullptr, *rhs = nullptr;
if ((m_manager.is_eq(qe, lhs, rhs))) {
if (is_non_ground_uninterp(lhs) && is_unique(to_app(lhs)->get_decl()) &&
!depends_on(rhs, to_app(lhs)->get_decl()) && fully_depends_on(to_app(lhs), q)) {
@ -173,9 +171,9 @@ bool quasi_macros::is_quasi_macro(expr * e, app_ref & a, expr_ref & t) const {
t = lhs;
return true;
}
} else if (m_manager.is_not(qe) && is_non_ground_uninterp(to_app(qe)->get_arg(0)) &&
is_unique(to_app(to_app(qe)->get_arg(0))->get_decl())) { // this is like f(...) = false
a = to_app(to_app(qe)->get_arg(0));
} else if (m_manager.is_not(qe, lhs) && is_non_ground_uninterp(lhs) &&
is_unique(to_app(lhs)->get_decl())) { // this is like f(...) = false
a = to_app(lhs);
t = m_manager.mk_false();
return true;
} else if (is_non_ground_uninterp(qe) && is_unique(to_app(qe)->get_decl())) { // this is like f(...) = true

View file

@ -690,7 +690,7 @@ namespace datalog {
void context::reopen() {
SASSERT(m_closed);
m_rule_set.reopen();
m_closed = false;
m_closed = false;
}
void context::transform_rules(rule_transformer::plugin* plugin) {

View file

@ -74,7 +74,7 @@ namespace datalog {
}
~scoped_query() {
m_ctx.reopen();
m_ctx.ensure_opened();
m_ctx.restrict_predicates(m_preds);
m_ctx.replace_rules(m_rules);
if (m_was_closed) {

View file

@ -58,7 +58,7 @@ class quasi_macros_tactic : public tactic {
deps.push_back(g->dep(i));
}
while (more) { // CMW: use repeat(...) ?
do {
if (m().canceled())
throw tactic_exception(m().limit().get_cancel_msg());
@ -69,7 +69,8 @@ class quasi_macros_tactic : public tactic {
forms.swap(new_forms);
proofs.swap(new_proofs);
deps.swap(new_deps);
}
}
while (more);
g->reset();
for (unsigned i = 0; i < new_forms.size(); i++)