mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +00:00
merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
commit
df492e200f
99 changed files with 1659 additions and 702 deletions
|
@ -68,7 +68,8 @@ inline aig_lit right(aig_lit const & n) { return right(n.ptr()); }
|
|||
|
||||
inline unsigned to_idx(aig * p) { SASSERT(!is_var(p)); return p->m_id - FIRST_NODE_ID; }
|
||||
|
||||
void unmark(unsigned sz, aig * const * ns) {
|
||||
|
||||
static void unmark(unsigned sz, aig * const * ns) {
|
||||
for (unsigned i = 0; i < sz; i++) {
|
||||
ns[i]->m_mark = false;
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@ public:
|
|||
virtual result operator()(goal const & g) {
|
||||
return is_unbounded(g);
|
||||
}
|
||||
virtual ~is_unbounded_probe() {}
|
||||
};
|
||||
|
||||
probe * mk_is_unbounded_probe() {
|
||||
|
@ -109,11 +110,11 @@ class add_bounds_tactic : public tactic {
|
|||
void operator()(quantifier*) {}
|
||||
};
|
||||
|
||||
virtual void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
mc = 0; pc = 0; core = 0;
|
||||
tactic_report report("add-bounds", *g);
|
||||
bound_manager bm(m);
|
||||
|
|
|
@ -312,11 +312,11 @@ class diff_neq_tactic : public tactic {
|
|||
return md;
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
m_produce_models = g->models_enabled();
|
||||
mc = 0; pc = 0; core = 0; result.reset();
|
||||
|
|
|
@ -1549,11 +1549,11 @@ class fm_tactic : public tactic {
|
|||
throw tactic_exception(TACTIC_MAX_MEMORY_MSG);
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
mc = 0; pc = 0; core = 0;
|
||||
tactic_report report("fm", *g);
|
||||
|
|
|
@ -188,11 +188,11 @@ class lia2pb_tactic : public tactic {
|
|||
return true;
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
fail_if_proof_generation("lia2pb", g);
|
||||
m_produce_models = g->models_enabled();
|
||||
|
|
|
@ -80,11 +80,11 @@ class normalize_bounds_tactic : public tactic {
|
|||
return false;
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & in,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
mc = 0; pc = 0; core = 0;
|
||||
bool produce_models = in->models_enabled();
|
||||
bool produce_proofs = in->proofs_enabled();
|
||||
|
|
|
@ -885,11 +885,11 @@ private:
|
|||
r.erase("elim_and");
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
TRACE("pb2bv", g->display(tout););
|
||||
SASSERT(g->is_well_sorted());
|
||||
fail_if_proof_generation("pb2bv", g);
|
||||
|
|
|
@ -819,7 +819,7 @@ class elim_uncnstr_tactic : public tactic {
|
|||
m_rw = alloc(rw, m(), produce_proofs, m_vars, m_mc.get(), m_max_memory, m_max_steps);
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & g,
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
|
|
|
@ -46,11 +46,11 @@ class fpa2bv_tactic : public tactic {
|
|||
m_rw.cfg().updt_params(p);
|
||||
}
|
||||
|
||||
virtual void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
void operator()(goal_ref const & g,
|
||||
goal_ref_buffer & result,
|
||||
model_converter_ref & mc,
|
||||
proof_converter_ref & pc,
|
||||
expr_dependency_ref & core) {
|
||||
SASSERT(g->is_well_sorted());
|
||||
m_proofs_enabled = g->proofs_enabled();
|
||||
m_produce_models = g->models_enabled();
|
||||
|
|
|
@ -94,13 +94,13 @@ public:
|
|||
|
||||
};
|
||||
|
||||
tactic * mk_sls_tactic(ast_manager & m, params_ref const & p) {
|
||||
static tactic * mk_sls_tactic(ast_manager & m, params_ref const & p) {
|
||||
return and_then(fail_if_not(mk_is_qfbv_probe()), // Currently only QF_BV is supported.
|
||||
clean(alloc(sls_tactic, m, p)));
|
||||
}
|
||||
|
||||
|
||||
tactic * mk_preamble(ast_manager & m, params_ref const & p) {
|
||||
static tactic * mk_preamble(ast_manager & m, params_ref const & p) {
|
||||
params_ref main_p;
|
||||
main_p.set_bool("elim_and", true);
|
||||
// main_p.set_bool("pull_cheap_ite", true);
|
||||
|
|
|
@ -32,7 +32,7 @@ Notes:
|
|||
|
||||
#define MEMLIMIT 300
|
||||
|
||||
tactic * mk_qfbv_preamble(ast_manager& m, params_ref const& p) {
|
||||
static tactic * mk_qfbv_preamble(ast_manager& m, params_ref const& p) {
|
||||
|
||||
params_ref solve_eq_p;
|
||||
// conservative guassian elimination.
|
||||
|
@ -80,7 +80,7 @@ static tactic * main_p(tactic* t) {
|
|||
}
|
||||
|
||||
|
||||
tactic * mk_qfbv_tactic(ast_manager& m, params_ref const & p, tactic* sat, tactic* smt) {
|
||||
static tactic * mk_qfbv_tactic(ast_manager& m, params_ref const & p, tactic* sat, tactic* smt) {
|
||||
|
||||
params_ref local_ctx_p = p;
|
||||
local_ctx_p.set_bool("local_ctx", true);
|
||||
|
|
|
@ -29,7 +29,7 @@ Notes:
|
|||
#include"ctx_simplify_tactic.h"
|
||||
#include"cofactor_term_ite_tactic.h"
|
||||
|
||||
tactic * mk_qfnia_bv_solver(ast_manager & m, params_ref const & p_ref) {
|
||||
static tactic * mk_qfnia_bv_solver(ast_manager & m, params_ref const & p_ref) {
|
||||
params_ref p = p_ref;
|
||||
p.set_bool("flat", false);
|
||||
p.set_bool("hi_div0", true);
|
||||
|
@ -51,7 +51,7 @@ tactic * mk_qfnia_bv_solver(ast_manager & m, params_ref const & p_ref) {
|
|||
return r;
|
||||
}
|
||||
|
||||
tactic * mk_qfnia_premable(ast_manager & m, params_ref const & p_ref) {
|
||||
static tactic * mk_qfnia_premable(ast_manager & m, params_ref const & p_ref) {
|
||||
params_ref pull_ite_p = p_ref;
|
||||
pull_ite_p.set_bool("pull_cheap_ite", true);
|
||||
pull_ite_p.set_bool("local_ctx", true);
|
||||
|
@ -77,7 +77,7 @@ tactic * mk_qfnia_premable(ast_manager & m, params_ref const & p_ref) {
|
|||
using_params(mk_simplify_tactic(m), simp_p));
|
||||
}
|
||||
|
||||
tactic * mk_qfnia_sat_solver(ast_manager & m, params_ref const & p) {
|
||||
static tactic * mk_qfnia_sat_solver(ast_manager & m, params_ref const & p) {
|
||||
params_ref nia2sat_p = p;
|
||||
nia2sat_p.set_uint("nla2bv_max_bv_size", 64);
|
||||
|
||||
|
|
|
@ -104,21 +104,12 @@ tactic * mk_aufnira_tactic(ast_manager & m, params_ref const & p) {
|
|||
}
|
||||
|
||||
tactic * mk_lra_tactic(ast_manager & m, params_ref const & p) {
|
||||
#if 0
|
||||
tactic * st = and_then(mk_quant_preprocessor(m),
|
||||
or_else(try_for(mk_smt_tactic(), 100),
|
||||
try_for(qe::mk_sat_tactic(m), 1000),
|
||||
try_for(mk_smt_tactic(), 1000),
|
||||
and_then(mk_qe_tactic(m), mk_smt_tactic())
|
||||
));
|
||||
#else
|
||||
tactic * st = and_then(mk_quant_preprocessor(m),
|
||||
mk_qe_lite_tactic(m, p),
|
||||
cond(mk_has_quantifier_probe(),
|
||||
or_else(mk_qsat_tactic(m, p),
|
||||
and_then(mk_qe_tactic(m), mk_smt_tactic())),
|
||||
mk_smt_tactic()));
|
||||
#endif
|
||||
st->updt_params(p);
|
||||
return st;
|
||||
}
|
||||
|
|
|
@ -31,11 +31,11 @@ Notes:
|
|||
#include"ufbv_tactic.h"
|
||||
|
||||
|
||||
tactic * mk_der_fp_tactic(ast_manager & m, params_ref const & p) {
|
||||
static tactic * mk_der_fp_tactic(ast_manager & m, params_ref const & p) {
|
||||
return repeat(and_then(mk_der_tactic(m), mk_simplify_tactic(m, p)));
|
||||
}
|
||||
|
||||
tactic * mk_ufbv_preprocessor_tactic(ast_manager & m, params_ref const & p) {
|
||||
static tactic * mk_ufbv_preprocessor_tactic(ast_manager & m, params_ref const & p) {
|
||||
params_ref no_elim_and(p);
|
||||
no_elim_and.set_bool("elim_and", false);
|
||||
|
||||
|
|
|
@ -23,8 +23,6 @@ Notes:
|
|||
class ast_manager;
|
||||
class tactic;
|
||||
|
||||
tactic * mk_ufbv_preprocessor_tactic(ast_manager & m, params_ref const & p = params_ref());
|
||||
|
||||
tactic * mk_ufbv_tactic(ast_manager & m, params_ref const & p = params_ref());
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue