inc_sat_solver(ast_manager& m, params_ref const& p): m(m), m_solver(p, m.limit(), 0), m_params(p), m_optimize_model(false), m_fmls(m), m_asmsf(m), m_fmls_head(0), m_core(m), m_map(m), m_bb_rewriter(m, p), m_num_scopes(0), m_dep_core(m), m_unknown("no reason given") { m_params.set_bool("elim_vars", false); m_solver.updt_params(m_params); params_ref simp2_p = p; simp2_p.set_bool("som", true); simp2_p.set_bool("pull_cheap_ite", true); simp2_p.set_bool("push_ite_bv", false); simp2_p.set_bool("local_ctx", true); simp2_p.set_uint("local_ctx_limit", 10000000); simp2_p.set_bool("flat", true); // required by som simp2_p.set_bool("hoist_mul", false); // required by som simp2_p.set_bool("elim_and", true); m_preprocess = and_then(mk_card2bv_tactic(m, m_params), using_params(mk_simplify_tactic(m), simp2_p), mk_max_bv_sharing_tactic(m), mk_bit_blaster_tactic(m, &m_bb_rewriter), //mk_aig_tactic(), using_params(mk_simplify_tactic(m), simp2_p)); }
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); pull_ite_p.set_uint(":local-ctx-limit", 10000000); params_ref ctx_simp_p = p_ref; ctx_simp_p.set_uint(":max-depth", 30); ctx_simp_p.set_uint(":max-steps", 5000000); params_ref simp_p = p_ref; simp_p.set_bool(":hoist-mul", true); params_ref elim_p = p_ref; elim_p.set_uint(":max-memory",20); return and_then(mk_simplify_tactic(m), mk_propagate_values_tactic(m), using_params(mk_ctx_simplify_tactic(m), ctx_simp_p), using_params(mk_simplify_tactic(m), pull_ite_p), mk_elim_uncnstr_tactic(m), skip_if_failed(using_params(mk_cofactor_term_ite_tactic(m), elim_p)), using_params(mk_simplify_tactic(m), simp_p)); }
tactic * mk_qflra_tactic(ast_manager & m, params_ref const & p) { params_ref pivot_p; pivot_p.set_bool("arith.greatest_error_pivot", true); params_ref main_p = p; main_p.set_bool("elim_and", true); main_p.set_bool("som", true); main_p.set_bool("blast_distinct", true); params_ref ctx_simp_p; ctx_simp_p.set_uint("max_depth", 30); ctx_simp_p.set_uint("max_steps", 5000000); params_ref lhs_p; lhs_p.set_bool("arith_lhs", true); lhs_p.set_bool("eq2ineq", true); params_ref elim_to_real_p; elim_to_real_p.set_bool("elim_to_real", true); #if 0 tactic * mip = and_then(fail_if(mk_produce_proofs_probe()), fail_if(mk_produce_unsat_cores_probe()), using_params(and_then(and_then(mk_simplify_tactic(m), mk_recover_01_tactic(m), using_params(mk_simplify_tactic(m), elim_to_real_p), mk_propagate_values_tactic(m)), using_params(mk_ctx_simplify_tactic(m), ctx_simp_p), mk_elim_uncnstr_tactic(m), mk_solve_eqs_tactic(m), using_params(mk_simplify_tactic(m), lhs_p), using_params(mk_simplify_tactic(m), elim_to_real_p) ), main_p), fail_if(mk_not(mk_is_mip_probe())), try_for(mk_mip_tactic(m), 30000), mk_fail_if_undecided_tactic()); #endif // return using_params(or_else(mip, // using_params(mk_smt_tactic(m), pivot_p)), // p); #if 0 params_ref simplex_0, simplex_1, simplex_2; simplex_0.set_uint("lp.simplex_strategy", 0); simplex_1.set_uint("lp.simplex_strategy", 1); simplex_2.set_uint("lp.simplex_strategy", 2); return par(using_params(mk_smt_tactic(), simplex_0), using_params(mk_smt_tactic(), simplex_1), using_params(mk_smt_tactic(), simplex_2)); #else return using_params(using_params(mk_smt_tactic(m), pivot_p), p); #endif }
tactic * mk_qfnra_nlsat_tactic(ast_manager & m, params_ref const & p) { params_ref main_p = p; main_p.set_bool("elim_and", true); main_p.set_bool("blast_distinct", true); params_ref purify_p = p; purify_p.set_bool("complete", false); // temporary hack, solver does not support uninterpreted functions for encoding (div0 x) applications. So, we replace it application of this kind with an uninterpreted function symbol. tactic * factor; if (p.get_bool("factor", true)) factor = mk_factor_tactic(m, p); else factor = mk_skip_tactic(); return and_then(and_then(using_params(mk_simplify_tactic(m, p), main_p), using_params(mk_purify_arith_tactic(m, p), purify_p), mk_propagate_values_tactic(m, p), mk_solve_eqs_tactic(m, p), mk_elim_uncnstr_tactic(m, p), mk_elim_term_ite_tactic(m, p)), and_then(/* mk_degree_shift_tactic(m, p), */ // may affect full dimensionality detection factor, mk_solve_eqs_tactic(m, p), using_params(mk_simplify_tactic(m, p), main_p), mk_tseitin_cnf_core_tactic(m, p), using_params(mk_simplify_tactic(m, p), main_p), mk_nlsat_tactic(m, p))); }
tactic * mk_qfauflia_tactic(ast_manager & m, params_ref const & p) { params_ref main_p; main_p.set_bool("elim_and", true); main_p.set_bool("som", true); main_p.set_bool("sort_store", true); params_ref ctx_simp_p; ctx_simp_p.set_uint("max_depth", 30); ctx_simp_p.set_uint("max_steps", 5000000); params_ref solver_p; solver_p.set_bool("array.simplify", false); // disable array simplifications at old_simplify module tactic * preamble_st = and_then(mk_simplify_tactic(m), mk_propagate_values_tactic(m), mk_solve_eqs_tactic(m), mk_elim_uncnstr_tactic(m), mk_simplify_tactic(m) ); tactic * st = and_then(using_params(preamble_st, main_p), using_params(mk_smt_tactic(), solver_p)); st->updt_params(p); return st; }
tactic * mk_qfauflia_tactic(ast_manager & m, params_ref const & p) { params_ref main_p; main_p.set_bool(":elim-and", true); main_p.set_bool(":som", true); main_p.set_bool(":sort-store", true); params_ref ctx_simp_p; ctx_simp_p.set_uint(":max-depth", 30); ctx_simp_p.set_uint(":max-steps", 5000000); params_ref solver_p; solver_p.set_bool(":array-old-simplifier", false); tactic * preamble_st = and_then(mk_simplify_tactic(m), mk_propagate_values_tactic(m), mk_solve_eqs_tactic(m), mk_elim_uncnstr_tactic(m), mk_simplify_tactic(m) ); tactic * st = and_then(using_params(preamble_st, main_p), using_params(mk_smt_tactic(), solver_p)); st->updt_params(p); return st; }
tactic * mk_qffp_tactic(ast_manager & m, params_ref const & p) { params_ref simp_p = p; simp_p.set_bool("arith_lhs", true); simp_p.set_bool("elim_and", true); tactic * preamble = and_then(mk_simplify_tactic(m, simp_p), mk_propagate_values_tactic(m, p), mk_fpa2bv_tactic(m, p), mk_propagate_values_tactic(m, p), using_params(mk_simplify_tactic(m, p), simp_p), if_no_proofs(if_no_unsat_cores(mk_ackermannize_bv_tactic(m, p)))); tactic * st = and_then(preamble, mk_bit_blaster_tactic(m, p), using_params(mk_simplify_tactic(m, p), simp_p), cond(mk_is_propositional_probe(), cond(mk_produce_proofs_probe(), mk_smt_tactic(p), // `sat' does not support proofs. mk_sat_tactic(m, p)), cond(mk_is_fp_qfnra_probe(), mk_qfnra_tactic(m, p), mk_smt_tactic(p)))); st->updt_params(p); return st; }
static tactic * mk_quant_preprocessor(ast_manager & m, bool disable_gaussian = false) { params_ref pull_ite_p; pull_ite_p.set_bool("pull_cheap_ite", true); pull_ite_p.set_bool("local_ctx", true); pull_ite_p.set_uint("local_ctx_limit", 10000000); params_ref ctx_simp_p; ctx_simp_p.set_uint("max_depth", 30); ctx_simp_p.set_uint("max_steps", 5000000); tactic * solve_eqs; if (disable_gaussian) solve_eqs = mk_skip_tactic(); else solve_eqs = when(mk_not(mk_has_pattern_probe()), mk_solve_eqs_tactic(m)); // remark: investigate if gaussian elimination is useful when patterns are not provided. return and_then(mk_simplify_tactic(m), mk_propagate_values_tactic(m), using_params(mk_ctx_simplify_tactic(m), ctx_simp_p), using_params(mk_simplify_tactic(m), pull_ite_p), solve_eqs, mk_elim_uncnstr_tactic(m), mk_simplify_tactic(m)); }
tactic * mk_qflia_tactic(ast_manager & m, params_ref const & p) { params_ref main_p; main_p.set_bool("elim_and", true); main_p.set_bool("som", true); main_p.set_bool("blast_distinct", true); main_p.set_uint("blast_distinct_threshold", 128); // main_p.set_bool("push_ite_arith", true); params_ref pull_ite_p; pull_ite_p.set_bool("pull_cheap_ite", true); pull_ite_p.set_bool("push_ite_arith", false); pull_ite_p.set_bool("local_ctx", true); pull_ite_p.set_uint("local_ctx_limit", 10000000); params_ref ctx_simp_p; ctx_simp_p.set_uint("max_depth", 30); ctx_simp_p.set_uint("max_steps", 5000000); params_ref lhs_p; lhs_p.set_bool("arith_lhs", true); tactic * preamble_st = and_then(and_then(mk_simplify_tactic(m), mk_propagate_values_tactic(m), using_params(mk_ctx_simplify_tactic(m), ctx_simp_p), using_params(mk_simplify_tactic(m), pull_ite_p)), mk_solve_eqs_tactic(m), mk_elim_uncnstr_tactic(m), using_params(mk_simplify_tactic(m), lhs_p) ); params_ref quasi_pb_p; quasi_pb_p.set_uint("lia2pb_max_bits", 64); params_ref no_cut_p; no_cut_p.set_uint("arith.branch_cut_ratio", 10000000); tactic * st = using_params(and_then(preamble_st, or_else(mk_ilp_model_finder_tactic(m), mk_pb_tactic(m), and_then(fail_if_not(mk_quasi_pb_probe()), using_params(mk_lia2sat_tactic(m), quasi_pb_p), mk_fail_if_undecided_tactic()), mk_bounded_tactic(m), mk_smt_tactic())), main_p); st->updt_params(p); return st; }
tactic * mk_qflia_tactic(ast_manager & m, params_ref const & p) { params_ref main_p; main_p.set_bool(":elim-and", true); main_p.set_bool(":som", true); // main_p.set_bool(":push-ite-arith", true); params_ref pull_ite_p; pull_ite_p.set_bool(":pull-cheap-ite", true); pull_ite_p.set_bool(":push-ite-arith", false); pull_ite_p.set_bool(":local-ctx", true); pull_ite_p.set_uint(":local-ctx-limit", 10000000); params_ref ctx_simp_p; ctx_simp_p.set_uint(":max-depth", 30); ctx_simp_p.set_uint(":max-steps", 5000000); params_ref lhs_p; lhs_p.set_bool(":arith-lhs", true); tactic * preamble_st = and_then(and_then(mk_simplify_tactic(m), mk_propagate_values_tactic(m), using_params(mk_ctx_simplify_tactic(m), ctx_simp_p), using_params(mk_simplify_tactic(m), pull_ite_p)), mk_solve_eqs_tactic(m), mk_elim_uncnstr_tactic(m), using_params(mk_simplify_tactic(m), lhs_p) ); params_ref quasi_pb_p; quasi_pb_p.set_uint(":lia2pb-max-bits", 64); params_ref no_cut_p; no_cut_p.set_uint(":arith-branch-cut-ratio", 10000000); tactic * st = using_params(and_then(preamble_st, or_else(mk_ilp_model_finder_tactic(m), mk_pb_tactic(m), and_then(fail_if_not(mk_quasi_pb_probe()), using_params(mk_lia2sat_tactic(m), quasi_pb_p), mk_fail_if_undecided_tactic()), mk_bounded_tactic(m), mk_smt_tactic())), main_p); st->updt_params(p); return st; }
// Create SMT solver that does not use cuts static tactic * mk_no_cut_no_relevancy_smt_tactic(unsigned rs) { params_ref solver_p; solver_p.set_uint("arith.branch_cut_ratio", 10000000); solver_p.set_uint("random_seed", rs); solver_p.set_uint("relevancy", 0); return using_params(mk_smt_tactic_using(false), solver_p); }
static tactic * main_p(tactic* t) { params_ref p; p.set_bool("elim_and", true); p.set_bool("push_ite_bv", true); p.set_bool("blast_distinct", true); return using_params(t, p); }
tactic * mk_qfufbv_tactic(ast_manager & m, params_ref const & p) { params_ref main_p; main_p.set_bool(":elim-and", true); main_p.set_bool(":blast-distinct", true); tactic * preamble_st = and_then(mk_simplify_tactic(m), mk_propagate_values_tactic(m), mk_solve_eqs_tactic(m), mk_elim_uncnstr_tactic(m), if_no_proofs(if_no_unsat_cores(mk_reduce_args_tactic(m))), if_no_proofs(if_no_unsat_cores(mk_bv_size_reduction_tactic(m))), mk_max_bv_sharing_tactic(m) ); tactic * st = using_params(and_then(preamble_st, mk_smt_tactic()), main_p); //cond(is_qfbv(), // and_then(mk_bit_blaster(m), // mk_sat_solver(m)), // mk_smt_solver()) st->updt_params(p); return st; }
Z3_tactic Z3_API Z3_tactic_using_params(Z3_context c, Z3_tactic t, Z3_params p) { Z3_TRY; LOG_Z3_tactic_using_params(c, t, p); RESET_ERROR_CODE(); tactic * new_t = using_params(to_tactic_ref(t), to_param_ref(p)); RETURN_TACTIC(new_t); Z3_CATCH_RETURN(0); }
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); params_ref solver_p; solver_p.set_bool("preprocess", false); // preprocessor of smt::context is not needed. params_ref no_flat_p; no_flat_p.set_bool("flat", false); params_ref ctx_simp_p; ctx_simp_p.set_uint("max_depth", 32); ctx_simp_p.set_uint("max_steps", 50000000); params_ref big_aig_p; big_aig_p.set_bool("aig_per_assertion", false); tactic* preamble_st = mk_qfbv_preamble(m, p); tactic * st = main_p(and_then(preamble_st, // If the user sets HI_DIV0=false, then the formula may contain uninterpreted function // symbols. In this case, we should not use the `sat', but instead `smt'. Alternatively, // the UFs can be eliminated by eager ackermannization in the preamble. cond(mk_is_qfbv_eq_probe(), and_then(mk_bv1_blaster_tactic(m), using_params(smt, solver_p)), cond(mk_is_qfbv_probe(), and_then(mk_bit_blaster_tactic(m), when(mk_lt(mk_memory_probe(), mk_const_probe(MEMLIMIT)), and_then(using_params(and_then(mk_simplify_tactic(m), mk_solve_eqs_tactic(m)), local_ctx_p), if_no_proofs(cond(mk_produce_unsat_cores_probe(), mk_aig_tactic(), using_params(mk_aig_tactic(), big_aig_p))))), sat), smt)))); st->updt_params(p); return st; }
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); params_ref simp_p = p; simp_p.set_bool("hoist_mul", true); // hoist multipliers to create smaller circuits. return and_then(using_params(mk_simplify_tactic(m), simp_p), mk_nla2bv_tactic(m, nia2sat_p), mk_qfnia_bv_solver(m, p), mk_fail_if_undecided_tactic()); }
Z3_tactic Z3_API Z3_tactic_using_params(Z3_context c, Z3_tactic t, Z3_params p) { Z3_TRY; LOG_Z3_tactic_using_params(c, t, p); RESET_ERROR_CODE(); param_descrs r; to_tactic_ref(t)->collect_param_descrs(r); to_param_ref(p).validate(r); tactic * new_t = using_params(to_tactic_ref(t), to_param_ref(p)); RETURN_TACTIC(new_t); Z3_CATCH_RETURN(0); }
tactic * mk_qfaufbv_tactic(ast_manager & m, params_ref const & p) { params_ref main_p; main_p.set_bool("elim_and", true); main_p.set_bool("sort_store", true); tactic * preamble_st = mk_qfaufbv_preamble(m, p); tactic * st = using_params(and_then(preamble_st, mk_smt_tactic(m)), main_p); st->updt_params(p); return st; }
static tactic * mk_qfnia_nlsat_solver(ast_manager & m, params_ref const & p) { params_ref nia2sat_p = p; nia2sat_p.set_uint("nla2bv_max_bv_size", 64); params_ref simp_p = p; simp_p.set_bool("som", true); // expand into sums of monomials simp_p.set_bool("factor", false); return and_then(using_params(mk_simplify_tactic(m), simp_p), try_for(mk_qfnra_nlsat_tactic(m, simp_p), 3000), mk_fail_if_undecided_tactic()); }
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); p.set_bool("elim_and", true); p.set_bool("blast_distinct", true); params_ref simp2_p = p; simp2_p.set_bool("local_ctx", true); simp2_p.set_uint("local_ctx_limit", 10000000); tactic * r = using_params(and_then(mk_simplify_tactic(m), mk_propagate_values_tactic(m), using_params(mk_simplify_tactic(m), simp2_p), mk_max_bv_sharing_tactic(m), mk_bit_blaster_tactic(m), mk_sat_tactic(m)), p); return r; }
tactic * mk_qfuf_tactic(ast_manager & m, params_ref const & p) { params_ref s2_p; s2_p.set_bool("pull_cheap_ite", true); s2_p.set_bool("local_ctx", true); s2_p.set_uint("local_ctx_limit", 10000000); return and_then(mk_simplify_tactic(m, p), mk_propagate_values_tactic(m, p), mk_solve_eqs_tactic(m, p), using_params(mk_simplify_tactic(m, p), s2_p), if_no_proofs(if_no_unsat_cores(mk_symmetry_reduce_tactic(m, p))), mk_smt_tactic(m, p)); }
tactic * mk_qfuf_tactic(ast_manager & m, params_ref const & p) { params_ref s2_p; s2_p.set_bool(":pull-cheap-ite", true); s2_p.set_bool(":local-ctx", true); s2_p.set_uint(":local-ctx-limit", 10000000); return and_then(mk_simplify_tactic(m, p), mk_propagate_values_tactic(m, p), mk_solve_eqs_tactic(m, p), using_params(mk_simplify_tactic(m, p), s2_p), mk_symmetry_reduce_tactic(m, p), mk_smt_tactic(p)); }
// Try to find a model for an unbounded ILP problem. // Fails if the problem is no ILP. static tactic * mk_ilp_model_finder_tactic(ast_manager & m) { params_ref add_bounds_p1; add_bounds_p1.set_rat(":add-bound-lower", rational(-16)); add_bounds_p1.set_rat(":add-bound-upper", rational(15)); params_ref add_bounds_p2; add_bounds_p2.set_rat(":add-bound-lower", rational(-32)); add_bounds_p2.set_rat(":add-bound-upper", rational(31)); return and_then(fail_if_not(mk_and(mk_is_ilp_probe(), mk_is_unbounded_probe())), fail_if(mk_produce_proofs_probe()), fail_if(mk_produce_unsat_cores_probe()), mk_propagate_ineqs_tactic(m), or_else(try_for(mk_mip_tactic(m), 5000), try_for(mk_no_cut_smt_tactic(100), 2000), and_then(using_params(mk_add_bounds_tactic(m), add_bounds_p1), try_for(mk_lia2sat_tactic(m), 5000)), try_for(mk_no_cut_smt_tactic(200), 5000), and_then(using_params(mk_add_bounds_tactic(m), add_bounds_p2), try_for(mk_lia2sat_tactic(m), 10000)), mk_mip_tactic(m)), mk_fail_if_undecided_tactic()); }
static tactic * mk_qfbv_preamble(ast_manager& m, params_ref const& p) { params_ref solve_eq_p; // conservative guassian elimination. solve_eq_p.set_uint("solve_eqs_max_occs", 2); params_ref simp2_p = p; simp2_p.set_bool("som", true); simp2_p.set_bool("pull_cheap_ite", true); simp2_p.set_bool("push_ite_bv", false); simp2_p.set_bool("local_ctx", true); simp2_p.set_uint("local_ctx_limit", 10000000); simp2_p.set_bool("flat", true); // required by som simp2_p.set_bool("hoist_mul", false); // required by som params_ref hoist_p; hoist_p.set_bool("hoist_mul", true); hoist_p.set_bool("som", false); return and_then( mk_simplify_tactic(m), mk_propagate_values_tactic(m), using_params(mk_solve_eqs_tactic(m), solve_eq_p), mk_elim_uncnstr_tactic(m), if_no_proofs(if_no_unsat_cores(mk_bv_size_reduction_tactic(m))), using_params(mk_simplify_tactic(m), simp2_p), // // Z3 can solve a couple of extra benchmarks by using hoist_mul // but the timeout in SMT-COMP is too small. // Moreover, it impacted negatively some easy benchmarks. // We should decide later, if we keep it or not. // using_params(mk_simplify_tactic(m), hoist_p), mk_max_bv_sharing_tactic(m), if_no_proofs(if_no_unsat_cores(mk_ackermannize_bv_tactic(m,p))) ); }
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); pull_ite_p.set_uint("local_ctx_limit", 10000000); params_ref ctx_simp_p = p_ref; ctx_simp_p.set_uint("max_depth", 30); ctx_simp_p.set_uint("max_steps", 5000000); params_ref elim_p = p_ref; elim_p.set_uint("max_memory",20); return and_then(mk_simplify_tactic(m), mk_propagate_values_tactic(m), using_params(mk_ctx_simplify_tactic(m), ctx_simp_p), using_params(mk_simplify_tactic(m), pull_ite_p), mk_elim_uncnstr_tactic(m), mk_lia2card_tactic(m), skip_if_failed(using_params(mk_cofactor_term_ite_tactic(m), elim_p))); }
static tactic * mk_lia2sat_tactic(ast_manager & m) { params_ref pb2bv_p; pb2bv_p.set_bool("ite_extra", true); pb2bv_p.set_uint("pb2bv_all_clauses_limit", 8); return and_then(fail_if(mk_is_unbounded_probe()), fail_if(mk_produce_proofs_probe()), fail_if(mk_produce_unsat_cores_probe()), mk_propagate_ineqs_tactic(m), mk_normalize_bounds_tactic(m), mk_lia2pb_tactic(m), using_params(mk_pb2bv_tactic(m), pb2bv_p), fail_if_not(mk_is_qfbv_probe()), mk_bv2sat_tactic(m)); }
static tactic * mk_pb_tactic(ast_manager & m) { params_ref pb2bv_p; pb2bv_p.set_bool("ite_extra", true); pb2bv_p.set_uint("pb2bv_all_clauses_limit", 8); return and_then(fail_if_not(mk_is_pb_probe()), fail_if(mk_produce_proofs_probe()), fail_if(mk_produce_unsat_cores_probe()), or_else(and_then(fail_if(mk_ge(mk_num_exprs_probe(), mk_const_probe(SMALL_SIZE))), fail_if_not(mk_is_ilp_probe()), // try_for(mk_mip_tactic(m), 8000), mk_fail_if_undecided_tactic()), and_then(using_params(mk_pb2bv_tactic(m), pb2bv_p), fail_if_not(mk_is_qfbv_probe()), mk_bv2sat_tactic(m)))); }
tactic * mk_default_tactic(ast_manager & m, params_ref const & p) { tactic * st = using_params(and_then(mk_simplify_tactic(m), 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), cond(mk_is_qfauflia_probe(), mk_qfauflia_tactic(m), cond(mk_is_qflra_probe(), mk_qflra_tactic(m), cond(mk_is_qfnra_probe(), mk_qfnra_tactic(m), cond(mk_is_qfnia_probe(), mk_qfnia_tactic(m), cond(mk_is_nra_probe(), mk_nra_tactic(m), cond(mk_is_lira_probe(), mk_lira_tactic(m, p), cond(mk_is_qffp_probe(), mk_qffp_tactic(m, p), //cond(mk_is_qfufnra_probe(), mk_qfufnra_tactic(m, p), mk_smt_tactic()))))))))))), p); return st; }
tactic * mk_qffp_approx_tactic(ast_manager & m, params_ref const & p) { params_ref simp_p = p; simp_p.set_bool("arith_lhs", true); simp_p.set_bool("elim_and", true); tactic * st = and_then(mk_simplify_tactic(m, simp_p), mk_propagate_values_tactic(m, p), using_params(mk_simplify_tactic(m, p), simp_p), cond(mk_or(mk_produce_proofs_probe(), mk_produce_unsat_cores_probe()), mk_smt_tactic(), cond(mk_is_qffp_probe(), mk_fpa2bv_approx_tactic(m, p), mk_qfnra_tactic(m, p))), mk_fail_if_undecided_tactic()); st->updt_params(p); return st; }
static tactic * mk_bv2sat_tactic(ast_manager & m) { params_ref solver_p; // The cardinality constraint encoding generates a lot of shared if-then-else's that can be flattened. // Several of them are simplified to and/or. If we flat them, we increase a lot the memory consumption. solver_p.set_bool("flat", false); solver_p.set_bool("som", false); // dynamic psm seems to work well. solver_p.set_sym("gc", symbol("dyn_psm")); return using_params(and_then(mk_simplify_tactic(m), mk_propagate_values_tactic(m), mk_solve_eqs_tactic(m), mk_max_bv_sharing_tactic(m), mk_bit_blaster_tactic(m), mk_aig_tactic(), mk_sat_tactic(m)), solver_p); }