3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 09:35:32 +00:00
This commit is contained in:
Nikolaj Bjorner 2018-06-23 21:57:19 -07:00
commit 61c25fdc8e
4 changed files with 51 additions and 19 deletions

View file

@ -466,6 +466,38 @@ class tseitin_cnf_tactic : public tactic {
}
return NO;
}
mres match_iff_or(app * t, bool first, bool root) {
expr * a = nullptr, * _b = nullptr;
if (!root) return NO;
if (!is_iff(m, t, a, _b)) return NO;
bool sign = m.is_not(_b, _b);
if (!m.is_or(_b)) return NO;
app* b = to_app(_b);
unsigned num = b->get_num_args();
if (first) {
bool visited = true;
visit(a, visited);
for (expr* arg : *b) {
visit(arg, visited);
}
if (!visited)
return CONT;
}
expr_ref la(m), nla(m), nlb(m), lb(m);
get_lit(a, sign, la);
inv(la, nla);
expr_ref_buffer lits(m);
lits.push_back(nla);
for (expr* arg : *b) {
get_lit(arg, false, lb);
lits.push_back(lb);
inv(lb, nlb);
mk_clause(la, nlb);
}
mk_clause(lits.size(), lits.c_ptr());
return DONE;
}
mres match_iff(app * t, bool first, bool root) {
expr * a, * b;
@ -784,6 +816,7 @@ class tseitin_cnf_tactic : public tactic {
TRY(match_or_3and);
TRY(match_or);
TRY(match_iff3);
// TRY(match_iff_or);
TRY(match_iff);
TRY(match_ite);
TRY(match_not);

View file

@ -31,9 +31,11 @@ Notes:
#include "tactic/fpa/qffplra_tactic.h"
#include "tactic/smtlogics/qfaufbv_tactic.h"
#include "tactic/smtlogics/qfauflia_tactic.h"
#include "tactic/portfolio/fd_solver.h"
tactic * mk_default_tactic(ast_manager & m, params_ref const & p) {
tactic * st = using_params(and_then(mk_simplify_tactic(m),
cond(mk_is_propositional_probe(), if_no_proofs(mk_fd_tactic(m, p)),
cond(mk_is_qfbv_probe(), mk_qfbv_tactic(m),
cond(mk_is_qfaufbv_probe(), mk_qfaufbv_tactic(m),
cond(mk_is_qflia_probe(), mk_qflia_tactic(m),
@ -46,7 +48,7 @@ tactic * mk_default_tactic(ast_manager & m, params_ref const & p) {
cond(mk_is_qffp_probe(), mk_qffp_tactic(m, p),
cond(mk_is_qffplra_probe(), mk_qffplra_tactic(m, p),
//cond(mk_is_qfufnra_probe(), mk_qfufnra_tactic(m, p),
mk_smt_tactic())))))))))))),
mk_smt_tactic()))))))))))))),
p);
return st;
}