3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-26 18:45:33 +00:00

add clausal lookahead to arithmetic solver as part of portfolio

have legacy qfbv-sls solver use nnf pre-processing. It relies on it for correctness of the score updates.
This commit is contained in:
Nikolaj Bjorner 2025-01-20 16:16:46 -08:00
parent a941f5ae84
commit 22e4054674
13 changed files with 678 additions and 92 deletions

View file

@ -227,7 +227,7 @@ static tactic * mk_sls_tactic(ast_manager & m, params_ref const & p) {
clean(alloc(sls_tactic, m, p)));
}
static tactic * mk_preamble(ast_manager & m, params_ref const & p) {
static tactic * mk_preamble(ast_manager & m, params_ref const & p, bool add_nnf) {
params_ref simp2_p = p;
simp2_p.set_bool("som", true);
@ -244,27 +244,28 @@ static tactic * mk_preamble(ast_manager & m, params_ref const & p) {
// conservative gaussian elimination.
gaussian_p.set_uint("gaussian_max_occs", 2);
return and_then(and_then(mk_simplify_tactic(m, p),
mk_propagate_values_tactic(m),
using_params(mk_solve_eqs_tactic(m), gaussian_p),
mk_elim_uncnstr_tactic(m),
mk_bv_size_reduction_tactic(m),
using_params(mk_simplify_tactic(m), simp2_p)),
using_params(mk_simplify_tactic(m), hoist_p),
mk_max_bv_sharing_tactic(m)//,
// mk_nnf_tactic(m, p)
return and_then(
and_then(mk_simplify_tactic(m, p),
mk_propagate_values_tactic(m),
using_params(mk_solve_eqs_tactic(m), gaussian_p),
mk_elim_uncnstr_tactic(m),
mk_bv_size_reduction_tactic(m),
using_params(mk_simplify_tactic(m), simp2_p)),
using_params(mk_simplify_tactic(m), hoist_p),
mk_max_bv_sharing_tactic(m),
add_nnf ? mk_nnf_tactic(m, p) : mk_skip_tactic()
);
}
tactic * mk_qfbv_sls_tactic(ast_manager & m, params_ref const & p) {
tactic * t = and_then(mk_preamble(m, p), mk_sls_tactic(m, p));
tactic * t = and_then(mk_preamble(m, p, true), mk_sls_tactic(m, p));
t->updt_params(p);
return t;
}
tactic* mk_sls_smt_tactic(ast_manager& m, params_ref const& p) {
tactic* t = and_then(mk_preamble(m, p), alloc(sls_smt_tactic, m, p));
tactic* t = and_then(mk_preamble(m, p, false), alloc(sls_smt_tactic, m, p));
t->updt_params(p);
return t;
}