mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 17:45:32 +00:00
add default tactic as option to overwrite the behavior of strategic solver factory
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
1e770af1cc
commit
f3b79087ee
6 changed files with 60 additions and 5 deletions
|
@ -43,6 +43,8 @@ Notes:
|
|||
#include "solver/solver2tactic.h"
|
||||
#include "solver/parallel_tactic.h"
|
||||
#include "solver/parallel_params.hpp"
|
||||
#include "tactic/tactic_params.hpp"
|
||||
#include "parsers/smt2/smt2parser.h"
|
||||
|
||||
|
||||
|
||||
|
@ -130,10 +132,30 @@ public:
|
|||
l = m_logic;
|
||||
else
|
||||
l = logic;
|
||||
solver* s = mk_special_solver_for_logic(m, p, l);
|
||||
if (s) return s;
|
||||
tactic * t = mk_tactic_for_logic(m, p, l);
|
||||
return mk_combined_solver(mk_tactic2solver(m, t, p, proofs_enabled, models_enabled, unsat_core_enabled, l),
|
||||
|
||||
tactic_params tp;
|
||||
tactic_ref t;
|
||||
if (tp.default_tactic() != symbol::null &&
|
||||
!tp.default_tactic().is_numerical() &&
|
||||
tp.default_tactic().bare_str() &&
|
||||
tp.default_tactic().bare_str()[0]) {
|
||||
cmd_context ctx(false, &m, l);
|
||||
std::istringstream is(tp.default_tactic().bare_str());
|
||||
char const* file_name = "";
|
||||
sexpr_ref se = parse_sexpr(ctx, is, p, file_name);
|
||||
if (se) {
|
||||
t = sexpr2tactic(ctx, se.get());
|
||||
}
|
||||
}
|
||||
|
||||
if (!t) {
|
||||
solver* s = mk_special_solver_for_logic(m, p, l);
|
||||
if (s) return s;
|
||||
}
|
||||
if (!t) {
|
||||
t = mk_tactic_for_logic(m, p, l);
|
||||
}
|
||||
return mk_combined_solver(mk_tactic2solver(m, t.get(), p, proofs_enabled, models_enabled, unsat_core_enabled, l),
|
||||
mk_solver_for_logic(m, p, l),
|
||||
p);
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@ def_module_params('tactic',
|
|||
('blast_term_ite.max_inflation', UINT, UINT_MAX, "multiplicative factor of initial term size."),
|
||||
('blast_term_ite.max_steps', UINT, UINT_MAX, "maximal number of steps allowed for tactic."),
|
||||
('propagate_values.max_rounds', UINT, 4, "maximal number of rounds to propagate values."),
|
||||
('default_tactic', SYMBOL, '', "overwrite default tactic in strategic solver"),
|
||||
|
||||
# ('aig.per_assertion', BOOL, True, "process one assertion at a time"),
|
||||
# ('add_bounds.lower, INT, -2, "lower bound to be added to unbounded variables."),
|
||||
# ('add_bounds.upper, INT, 2, "upper bound to be added to unbounded variables."),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue