mirror of
https://github.com/Z3Prover/z3
synced 2025-08-24 20:16:00 +00:00
Merge remote-tracking branch 'origin/master' into polysat
This commit is contained in:
commit
8774952aeb
40 changed files with 708 additions and 189 deletions
|
@ -190,7 +190,7 @@ namespace dd {
|
|||
while (p2 != 0 && !m_todo.empty()) {
|
||||
PDD r = m_todo.back();
|
||||
m_todo.pop_back();
|
||||
if (is_marked(r))
|
||||
if (is_marked(r))
|
||||
continue;
|
||||
set_mark(r);
|
||||
if (!is_val(r)) {
|
||||
|
@ -203,7 +203,7 @@ namespace dd {
|
|||
p2 = val(r).trailing_zeros();
|
||||
}
|
||||
m_todo.reset();
|
||||
return p2;
|
||||
return p2;
|
||||
}
|
||||
|
||||
pdd pdd_manager::subst_val(pdd const& p, pdd const& s) {
|
||||
|
@ -1816,9 +1816,8 @@ namespace dd {
|
|||
pdd p = *this;
|
||||
while (!p.is_val())
|
||||
p = p.lo();
|
||||
return p.val();
|
||||
return p.val();
|
||||
}
|
||||
|
||||
|
||||
pdd pdd::shl(unsigned n) const {
|
||||
return (*this) * rational::power_of_two(n);
|
||||
|
|
|
@ -222,7 +222,7 @@ public:
|
|||
m_d_x.resize(m_d_A.column_count());
|
||||
pop_basis(k);
|
||||
m_stacked_simplex_strategy.pop(k);
|
||||
settings().simplex_strategy() = m_stacked_simplex_strategy;
|
||||
settings().set_simplex_strategy(m_stacked_simplex_strategy);
|
||||
lp_assert(m_r_solver.basis_heading_is_correct());
|
||||
lp_assert(!need_to_presolve_with_double_solver() || m_d_solver.basis_heading_is_correct());
|
||||
}
|
||||
|
|
|
@ -300,7 +300,7 @@ namespace lp {
|
|||
m_term_register.shrink(m_term_count);
|
||||
m_terms.resize(m_term_count);
|
||||
m_simplex_strategy.pop(k);
|
||||
m_settings.simplex_strategy() = m_simplex_strategy;
|
||||
m_settings.set_simplex_strategy(m_simplex_strategy);
|
||||
lp_assert(sizes_are_correct());
|
||||
lp_assert((!m_settings.use_tableau()) || m_mpq_lar_core_solver.m_r_solver.reduced_costs_are_correct_tableau());
|
||||
m_usage_in_terms.pop(k);
|
||||
|
@ -465,10 +465,10 @@ namespace lp {
|
|||
switch (settings().simplex_strategy()) {
|
||||
|
||||
case simplex_strategy_enum::tableau_rows:
|
||||
settings().simplex_strategy() = simplex_strategy_enum::tableau_costs;
|
||||
settings().set_simplex_strategy(simplex_strategy_enum::tableau_costs);
|
||||
prepare_costs_for_r_solver(term);
|
||||
ret = maximize_term_on_tableau(term, term_max);
|
||||
settings().simplex_strategy() = simplex_strategy_enum::tableau_rows;
|
||||
settings().set_simplex_strategy(simplex_strategy_enum::tableau_rows);
|
||||
set_costs_to_zero(term);
|
||||
m_mpq_lar_core_solver.m_r_solver.set_status(lp_status::OPTIMAL);
|
||||
return ret;
|
||||
|
@ -2006,10 +2006,10 @@ namespace lp {
|
|||
void lar_solver::decide_on_strategy_and_adjust_initial_state() {
|
||||
lp_assert(strategy_is_undecided());
|
||||
if (m_columns_to_ul_pairs.size() > m_settings.column_number_threshold_for_using_lu_in_lar_solver) {
|
||||
m_settings.simplex_strategy() = simplex_strategy_enum::lu;
|
||||
m_settings.set_simplex_strategy(simplex_strategy_enum::lu);
|
||||
}
|
||||
else {
|
||||
m_settings.simplex_strategy() = simplex_strategy_enum::tableau_rows; // todo: when to switch to tableau_costs?
|
||||
m_settings.set_simplex_strategy(simplex_strategy_enum::tableau_rows); // todo: when to switch to tableau_costs?
|
||||
}
|
||||
adjust_initial_state();
|
||||
}
|
||||
|
|
|
@ -74,9 +74,9 @@ public:
|
|||
vector<X> & m_x; // a feasible solution, the fist time set in the constructor
|
||||
vector<T> & m_costs;
|
||||
lp_settings & m_settings;
|
||||
lu<static_matrix<T, X>> * m_factorization = nullptr;
|
||||
vector<T> m_y; // the buffer for yB = cb
|
||||
// a device that is able to solve Bx=c, xB=d, and change the basis
|
||||
lu<static_matrix<T, X>> * m_factorization;
|
||||
const column_namer & m_column_names;
|
||||
indexed_vector<T> m_w; // the vector featuring in 24.3 of the Chvatal book
|
||||
vector<T> m_d; // the vector of reduced costs
|
||||
|
|
|
@ -55,7 +55,6 @@ lp_core_solver_base(static_matrix<T, X> & A,
|
|||
m_costs(costs),
|
||||
m_settings(settings),
|
||||
m_y(m_m()),
|
||||
m_factorization(nullptr),
|
||||
m_column_names(column_names),
|
||||
m_w(m_m()),
|
||||
m_d(m_n()),
|
||||
|
|
|
@ -336,8 +336,8 @@ public:
|
|||
return m_simplex_strategy;
|
||||
}
|
||||
|
||||
simplex_strategy_enum & simplex_strategy() {
|
||||
return m_simplex_strategy;
|
||||
void set_simplex_strategy(simplex_strategy_enum s) {
|
||||
m_simplex_strategy = s;
|
||||
}
|
||||
|
||||
bool use_lu() const {
|
||||
|
|
|
@ -131,7 +131,7 @@ namespace nla {
|
|||
return l_false;
|
||||
}
|
||||
|
||||
if (xval >= 3 && yval != 0 & rval <= yval + 1) {
|
||||
if (xval >= 3 && yval != 0 && rval <= yval + 1) {
|
||||
new_lemma lemma(c, "x >= 3, y != 0 => x^y > ln(x)y + 1");
|
||||
lemma |= ineq(x, llc::LT, rational(3));
|
||||
lemma |= ineq(y, llc::EQ, rational::zero());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue