mirror of
https://github.com/Z3Prover/z3
synced 2025-08-10 21:20:52 +00:00
fix #6300
several boundary cases with repeated rows being retired twice and non-termination for K = 1 where decomposition is just identity.
This commit is contained in:
parent
fb8532bf55
commit
d975886cdc
2 changed files with 42 additions and 20 deletions
|
@ -60,14 +60,13 @@ namespace opt {
|
|||
}
|
||||
};
|
||||
struct row {
|
||||
row(): m_type(t_le), m_value(0), m_alive(false) {}
|
||||
vector<var> m_vars; // variables with coefficients
|
||||
rational m_coeff; // constant in inequality
|
||||
rational m_mod; // value the term divide
|
||||
ineq_type m_type; // inequality type
|
||||
rational m_value; // value of m_vars + m_coeff under interpretation of m_var2value.
|
||||
bool m_alive; // rows can be marked dead if they have been processed.
|
||||
unsigned m_id; // variable defined by row (used for mod_t and div_t)
|
||||
vector<var> m_vars; // variables with coefficients
|
||||
rational m_coeff = rational::zero(); // constant in inequality
|
||||
rational m_mod = rational::zero(); // value the term divide
|
||||
ineq_type m_type = t_le; // inequality type
|
||||
rational m_value = rational::zero(); // value of m_vars + m_coeff under interpretation of m_var2value.
|
||||
bool m_alive = false; // rows can be marked dead if they have been processed.
|
||||
unsigned m_id = UINT_MAX; // variable defined by row (used for mod_t and div_t)
|
||||
void reset() { m_vars.reset(); m_coeff.reset(); m_value.reset(); }
|
||||
|
||||
row& normalize();
|
||||
|
@ -139,7 +138,7 @@ namespace opt {
|
|||
|
||||
void add_upper_bound(unsigned x, rational const& hi);
|
||||
|
||||
void add_constraint(vector<var> const& coeffs, rational const& c, rational const& m, ineq_type r, unsigned id);
|
||||
unsigned add_constraint(vector<var> const& coeffs, rational const& c, rational const& m, ineq_type r, unsigned id);
|
||||
|
||||
void replace_var(unsigned row_id, unsigned x, rational const& A, unsigned y, rational const& B);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue