mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 17:45:32 +00:00
add a way to use new smt core for selected logics
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
73ce5c5fc8
commit
2328a6e839
8 changed files with 88 additions and 15 deletions
|
@ -13,6 +13,7 @@ z3_add_component(smtlogic_tactics
|
|||
qfufbv_tactic.cpp
|
||||
qfuf_tactic.cpp
|
||||
quant_tactics.cpp
|
||||
smt_tactic_select.cpp
|
||||
COMPONENT_DEPENDENCIES
|
||||
ackermannization
|
||||
aig_tactic
|
||||
|
|
|
@ -25,6 +25,7 @@ Notes:
|
|||
#include "tactic/bv/bv_size_reduction_tactic.h"
|
||||
#include "tactic/core/ctx_simplify_tactic.h"
|
||||
#include "tactic/smtlogics/qfbv_tactic.h"
|
||||
#include "tactic/smtlogics/smt_tactic_select.h"
|
||||
#include "ackermannization/ackermannize_bv_tactic.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
|
||||
|
@ -59,7 +60,7 @@ tactic * mk_qfaufbv_tactic(ast_manager & m, params_ref const & p) {
|
|||
|
||||
tactic * st = using_params(
|
||||
and_then(preamble_st,
|
||||
cond(mk_is_qfbv_probe(), mk_qfbv_tactic(m), mk_smt_tactic(m))), main_p);
|
||||
cond(mk_is_qfbv_probe(), mk_qfbv_tactic(m), mk_smt_tactic_select(m, p))), main_p);
|
||||
|
||||
st->updt_params(p);
|
||||
return st;
|
||||
|
|
|
@ -23,6 +23,7 @@ Notes:
|
|||
#include "tactic/core/solve_eqs_tactic.h"
|
||||
#include "tactic/core/propagate_values_tactic.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "tactic/smtlogics/smt_tactic_select.h"
|
||||
|
||||
tactic * mk_qfuf_tactic(ast_manager & m, params_ref const & p) {
|
||||
params_ref s2_p;
|
||||
|
@ -34,7 +35,7 @@ tactic * mk_qfuf_tactic(ast_manager & m, params_ref const & 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));
|
||||
mk_smt_tactic_select(m, p));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ Notes:
|
|||
#include "sat/sat_solver/inc_sat_solver.h"
|
||||
#include "tactic/smtlogics/qfaufbv_tactic.h"
|
||||
#include "tactic/smtlogics/qfbv_tactic.h"
|
||||
#include "tactic/smtlogics/smt_tactic_select.h"
|
||||
#include "solver/tactic2solver.h"
|
||||
#include "tactic/bv/bv_bound_chk_tactic.h"
|
||||
#include "ackermannization/ackermannize_bv_tactic.h"
|
||||
|
@ -181,8 +182,11 @@ tactic * mk_qfufbv_tactic(ast_manager & m, params_ref const & p) {
|
|||
|
||||
tactic * const preamble_st = mk_qfufbv_preamble(m, p);
|
||||
|
||||
tactic * st = using_params(and_then(preamble_st,
|
||||
cond(mk_is_qfbv_probe(), mk_qfbv_tactic(m), mk_smt_tactic(m))),
|
||||
tactic * st = using_params(
|
||||
and_then(preamble_st,
|
||||
cond(mk_is_qfbv_probe(),
|
||||
mk_qfbv_tactic(m),
|
||||
mk_smt_tactic_select(m, p))),
|
||||
main_p);
|
||||
|
||||
st->updt_params(p);
|
||||
|
@ -194,5 +198,5 @@ tactic * mk_qfufbv_ackr_tactic(ast_manager & m, params_ref const & p) {
|
|||
|
||||
tactic * const actual_tactic = alloc(qfufbv_ackr_tactic, m, p);
|
||||
return and_then(preamble_t,
|
||||
cond(mk_is_qfufbv_probe(), actual_tactic, mk_smt_tactic(m)));
|
||||
cond(mk_is_qfufbv_probe(), actual_tactic, mk_smt_tactic_select(m, p)));
|
||||
}
|
||||
|
|
26
src/tactic/smtlogics/smt_tactic_select.cpp
Normal file
26
src/tactic/smtlogics/smt_tactic_select.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*++
|
||||
Copyright (c) 2020 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
smt_tactic_select.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
Tactic that selects SMT backend.
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2020-09-14
|
||||
|
||||
|
||||
--*/
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "sat/tactic/sat_tactic.h"
|
||||
#include "sat/sat_params.hpp"
|
||||
|
||||
tactic * mk_smt_tactic_select(ast_manager & m, params_ref const & p) {
|
||||
sat_params sp(p);
|
||||
return sp.euf() ? mk_sat_tactic(m, p) : mk_smt_tactic(m, p);
|
||||
}
|
||||
|
25
src/tactic/smtlogics/smt_tactic_select.h
Normal file
25
src/tactic/smtlogics/smt_tactic_select.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*++
|
||||
Copyright (c) 2020 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
smt_tactic_select.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Tactic that selects SMT backend.
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2020-09-14
|
||||
|
||||
|
||||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "util/params.h"
|
||||
class ast_manager;
|
||||
class tactic;
|
||||
|
||||
tactic * mk_smt_tactic_select(ast_manager & m, params_ref const & p);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue