3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-11-06 06:16:02 +00:00

add option branch_flip to lp_settings

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2020-02-22 21:30:09 -08:00
parent b9bfa950f6
commit ab92c20106
5 changed files with 11 additions and 10 deletions

View file

@ -393,9 +393,10 @@ class theory_lra::imp {
lp().settings().print_statistics = lpar.arith_print_stats();
// todo : do not use m_arith_branch_cut_ratio for deciding on cheap cuts
lp().settings().set_branch_flip(lpar.arith_branch_flip());
unsigned branch_cut_ratio = ctx().get_fparams().m_arith_branch_cut_ratio;
lp().set_cut_strategy(branch_cut_ratio);
lp().settings().m_int_run_gcd_test = ctx().get_fparams().m_arith_gcd_test;
lp().settings().set_random_seed(ctx().get_fparams().m_random_seed);
m_switcher.m_use_nla = lpar.arith_nla();
@ -2079,12 +2080,7 @@ public:
app_ref b(m);
bool u = m_lia->is_upper();
auto const & k = m_lia->get_offset();
if (0 == ctx().get_random_value() % 2) {
b = mk_bound(m_lia->get_term(), k, !u);
}
else {
b = mk_bound(m_lia->get_term(), u ? k - 1 : k + 1, u);
}
b = mk_bound(m_lia->get_term(), k, !u);
if (m.has_trace_stream()) {
app_ref body(m);
body = m.mk_or(b, m.mk_not(b));