mirror of
https://github.com/Z3Prover/z3
synced 2025-06-28 08:58:44 +00:00
enable propagation when there are changed columns
- to fix bug reported by Nikhil Swamy/F* - deal with some compiler warnings by adding annotations
This commit is contained in:
parent
558758fcf1
commit
85356c5548
3 changed files with 9 additions and 2 deletions
|
@ -1800,10 +1800,12 @@ namespace lp {
|
||||||
switch (k) {
|
switch (k) {
|
||||||
case LT:
|
case LT:
|
||||||
k = LE;
|
k = LE;
|
||||||
|
Z3_fallthrough;
|
||||||
case LE:
|
case LE:
|
||||||
return floor(bound);
|
return floor(bound);
|
||||||
case GT:
|
case GT:
|
||||||
k = GE;
|
k = GE;
|
||||||
|
Z3_fallthrough;
|
||||||
case GE:
|
case GE:
|
||||||
return ceil(bound);
|
return ceil(bound);
|
||||||
case EQ:
|
case EQ:
|
||||||
|
@ -2028,6 +2030,7 @@ namespace lp {
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
case LT:
|
case LT:
|
||||||
y_of_bound = -1;
|
y_of_bound = -1;
|
||||||
|
Z3_fallthrough;
|
||||||
case LE: {
|
case LE: {
|
||||||
auto up = numeric_pair<mpq>(right_side, y_of_bound);
|
auto up = numeric_pair<mpq>(right_side, y_of_bound);
|
||||||
if (up < m_mpq_lar_core_solver.m_r_lower_bounds[j]) {
|
if (up < m_mpq_lar_core_solver.m_r_lower_bounds[j]) {
|
||||||
|
@ -2043,6 +2046,7 @@ namespace lp {
|
||||||
}
|
}
|
||||||
case GT:
|
case GT:
|
||||||
y_of_bound = 1;
|
y_of_bound = 1;
|
||||||
|
Z3_fallthrough;
|
||||||
case GE: {
|
case GE: {
|
||||||
auto low = numeric_pair<mpq>(right_side, y_of_bound);
|
auto low = numeric_pair<mpq>(right_side, y_of_bound);
|
||||||
if (low > m_mpq_lar_core_solver.m_r_upper_bounds[j]) {
|
if (low > m_mpq_lar_core_solver.m_r_upper_bounds[j]) {
|
||||||
|
@ -2145,6 +2149,7 @@ namespace lp {
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
case LT:
|
case LT:
|
||||||
y_of_bound = -1;
|
y_of_bound = -1;
|
||||||
|
Z3_fallthrough;
|
||||||
case LE:
|
case LE:
|
||||||
{
|
{
|
||||||
auto up = numeric_pair<mpq>(right_side, y_of_bound);
|
auto up = numeric_pair<mpq>(right_side, y_of_bound);
|
||||||
|
@ -2156,6 +2161,7 @@ namespace lp {
|
||||||
break;
|
break;
|
||||||
case GT:
|
case GT:
|
||||||
y_of_bound = 1;
|
y_of_bound = 1;
|
||||||
|
Z3_fallthrough;
|
||||||
case GE:
|
case GE:
|
||||||
{
|
{
|
||||||
auto low = numeric_pair<mpq>(right_side, y_of_bound);
|
auto low = numeric_pair<mpq>(right_side, y_of_bound);
|
||||||
|
@ -2198,6 +2204,7 @@ namespace lp {
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
case LT:
|
case LT:
|
||||||
y_of_bound = -1;
|
y_of_bound = -1;
|
||||||
|
Z3_fallthrough;
|
||||||
case LE: {
|
case LE: {
|
||||||
auto up = numeric_pair<mpq>(right_side, y_of_bound);
|
auto up = numeric_pair<mpq>(right_side, y_of_bound);
|
||||||
m_mpq_lar_core_solver.m_r_upper_bounds[j] = up;
|
m_mpq_lar_core_solver.m_r_upper_bounds[j] = up;
|
||||||
|
|
|
@ -25,7 +25,7 @@ template < typename B> class stacked_vector {
|
||||||
struct log_entry {
|
struct log_entry {
|
||||||
unsigned m_i; unsigned m_ts; B b;
|
unsigned m_i; unsigned m_ts; B b;
|
||||||
log_entry(unsigned i, unsigned t, B const& b): m_i(i), m_ts(t), b(b) {}
|
log_entry(unsigned i, unsigned t, B const& b): m_i(i), m_ts(t), b(b) {}
|
||||||
log_entry():m_i(UINT_MAX), m_ts(0) {}
|
log_entry():m_i(UINT_MAX), m_ts(0), b() {}
|
||||||
};
|
};
|
||||||
svector<unsigned> m_stack_of_vector_sizes;
|
svector<unsigned> m_stack_of_vector_sizes;
|
||||||
svector<unsigned> m_stack_of_change_sizes;
|
svector<unsigned> m_stack_of_change_sizes;
|
||||||
|
|
|
@ -2131,7 +2131,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool can_propagate_core() {
|
bool can_propagate_core() {
|
||||||
return m_asserted_atoms.size() > m_asserted_qhead || m_new_def;
|
return m_asserted_atoms.size() > m_asserted_qhead || m_new_def || lp().has_changed_columns();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool propagate() {
|
bool propagate() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue