mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 03:45:51 +00:00
follow logic annotation/enable diff logic when configured
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
18b491eee0
commit
c1580fb85a
11 changed files with 71 additions and 30 deletions
|
@ -36,17 +36,14 @@ Notes:
|
|||
namespace opt {
|
||||
|
||||
opt_solver::opt_solver(ast_manager & mgr, params_ref const & p,
|
||||
filter_model_converter& fm, symbol const & l):
|
||||
filter_model_converter& fm):
|
||||
solver_na2as(mgr),
|
||||
m_params(p),
|
||||
m_context(mgr, m_params),
|
||||
m(mgr),
|
||||
m_dump_benchmarks(false),
|
||||
m_fm(fm) {
|
||||
m_logic = l;
|
||||
if (m_logic != symbol::null) {
|
||||
m_context.set_logic(m_logic);
|
||||
}
|
||||
m_fm(fm),
|
||||
m_first(true) {
|
||||
m_params.updt_params(p);
|
||||
m_params.m_relevancy_lvl = 0;
|
||||
}
|
||||
|
@ -83,6 +80,10 @@ namespace opt {
|
|||
m_context.pop(n);
|
||||
}
|
||||
|
||||
void opt_solver::set_logic(symbol const& logic) {
|
||||
m_context.set_logic(logic);
|
||||
}
|
||||
|
||||
smt::theory_opt& opt_solver::get_optimizer() {
|
||||
smt::context& ctx = m_context.get_context();
|
||||
smt::theory_id arith_id = m_context.m().get_family_id("arith");
|
||||
|
@ -143,7 +144,14 @@ namespace opt {
|
|||
IF_VERBOSE(1, verbose_stream() << "(created benchmark: " << file_name.str() << "...";
|
||||
verbose_stream().flush(););
|
||||
}
|
||||
lbool r = m_context.check(num_assumptions, assumptions);
|
||||
lbool r;
|
||||
if (m_first && num_assumptions == 0 && m_context.get_scope_level() == 0) {
|
||||
r = m_context.setup_and_check();
|
||||
}
|
||||
else {
|
||||
r = m_context.check(num_assumptions, assumptions);
|
||||
}
|
||||
m_first = false;
|
||||
if (dump_benchmarks()) {
|
||||
w.stop();
|
||||
IF_VERBOSE(1, verbose_stream() << ".. " << r << " " << std::fixed << w.get_seconds() << ")\n";);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue