mirror of
https://github.com/Z3Prover/z3
synced 2025-04-16 05:48:44 +00:00
after rebase
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
efa149bed1
commit
7b59e2094d
|
@ -25,6 +25,7 @@ Revision History:
|
||||||
#include "util/z3_exception.h"
|
#include "util/z3_exception.h"
|
||||||
#include "util/common_msgs.h"
|
#include "util/common_msgs.h"
|
||||||
#include "util/vector.h"
|
#include "util/vector.h"
|
||||||
|
#include "util/uint_set.h"
|
||||||
#include<iomanip>
|
#include<iomanip>
|
||||||
|
|
||||||
namespace sat {
|
namespace sat {
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
#include "smt/arith_eq_adapter.h"
|
#include "smt/arith_eq_adapter.h"
|
||||||
#include "util/nat_set.h"
|
#include "util/nat_set.h"
|
||||||
#include "util/lp/nra_solver.h"
|
#include "util/lp/nra_solver.h"
|
||||||
#include "tactic/filter_model_converter.h"
|
#include "tactic/generic_model_converter.h"
|
||||||
#include "math/polynomial/algebraic_numbers.h"
|
#include "math/polynomial/algebraic_numbers.h"
|
||||||
#include "math/polynomial/polynomial.h"
|
#include "math/polynomial/polynomial.h"
|
||||||
#include "ast/ast_pp.h"
|
#include "ast/ast_pp.h"
|
||||||
|
@ -2770,7 +2770,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
expr_ref mk_ge(filter_model_converter& fm, theory_var v, inf_rational const& val) {
|
expr_ref mk_ge(generic_model_converter& fm, theory_var v, inf_rational const& val) {
|
||||||
rational r = val.get_rational();
|
rational r = val.get_rational();
|
||||||
bool is_strict = val.get_infinitesimal().is_pos();
|
bool is_strict = val.get_infinitesimal().is_pos();
|
||||||
app_ref b(m);
|
app_ref b(m);
|
||||||
|
@ -2782,7 +2782,7 @@ public:
|
||||||
b = a.mk_ge(mk_obj(v), a.mk_numeral(r, is_int));
|
b = a.mk_ge(mk_obj(v), a.mk_numeral(r, is_int));
|
||||||
}
|
}
|
||||||
if (!ctx().b_internalized(b)) {
|
if (!ctx().b_internalized(b)) {
|
||||||
fm.insert(b->get_decl());
|
fm.hide(b->get_decl());
|
||||||
bool_var bv = ctx().mk_bool_var(b);
|
bool_var bv = ctx().mk_bool_var(b);
|
||||||
ctx().set_var_theory(bv, get_id());
|
ctx().set_var_theory(bv, get_id());
|
||||||
// ctx().set_enode_flag(bv, true);
|
// ctx().set_enode_flag(bv, true);
|
||||||
|
@ -2983,7 +2983,7 @@ theory_lra::inf_eps theory_lra::maximize(theory_var v, expr_ref& blocker, bool&
|
||||||
theory_var theory_lra::add_objective(app* term) {
|
theory_var theory_lra::add_objective(app* term) {
|
||||||
return m_imp->add_objective(term);
|
return m_imp->add_objective(term);
|
||||||
}
|
}
|
||||||
expr_ref theory_lra::mk_ge(filter_model_converter& fm, theory_var v, inf_rational const& val) {
|
expr_ref theory_lra::mk_ge(generic_model_converter& fm, theory_var v, inf_rational const& val) {
|
||||||
return m_imp->mk_ge(fm, v, val);
|
return m_imp->mk_ge(fm, v, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,12 +12,13 @@ namespace lp {
|
||||||
|
|
||||||
|
|
||||||
void int_solver::trace_inf_rows() const {
|
void int_solver::trace_inf_rows() const {
|
||||||
unsigned num = m_lar_solver->A_r().column_count();
|
TRACE("arith_int_rows",
|
||||||
for (unsigned v = 0; v < num; v++) {
|
unsigned num = m_lar_solver->A_r().column_count();
|
||||||
if (is_int(v) && !get_value(v).is_int()) {
|
for (unsigned v = 0; v < num; v++) {
|
||||||
display_column(tout, v);
|
if (is_int(v) && !get_value(v).is_int()) {
|
||||||
}
|
display_column(tout, v);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
num = 0;
|
num = 0;
|
||||||
for (unsigned i = 0; i < m_lar_solver->A_r().row_count(); i++) {
|
for (unsigned i = 0; i < m_lar_solver->A_r().row_count(); i++) {
|
||||||
|
|
|
@ -217,7 +217,7 @@ void lar_solver::explain_implied_bound(implied_bound & ib, bound_propagator & bp
|
||||||
}
|
}
|
||||||
for (auto const& r : A_r().m_rows[i]) {
|
for (auto const& r : A_r().m_rows[i]) {
|
||||||
unsigned j = r.m_j;
|
unsigned j = r.m_j;
|
||||||
if (j == m_j) continue;
|
if (j == bound_j) continue;
|
||||||
mpq const& a = r.get_val();
|
mpq const& a = r.get_val();
|
||||||
int a_sign = is_pos(a)? 1: -1;
|
int a_sign = is_pos(a)? 1: -1;
|
||||||
int sign = j_sign * a_sign;
|
int sign = j_sign * a_sign;
|
||||||
|
|
|
@ -144,7 +144,7 @@ mpz_manager<SYNCH>::mpz_manager():
|
||||||
else {
|
else {
|
||||||
m_init_cell_capacity = 6;
|
m_init_cell_capacity = 6;
|
||||||
}
|
}
|
||||||
set(m_int_min, -static_cast<int64>(INT_MIN));
|
set(m_int_min, -static_cast<int64_t>(INT_MIN));
|
||||||
#else
|
#else
|
||||||
// GMP
|
// GMP
|
||||||
mpz_init(m_tmp);
|
mpz_init(m_tmp);
|
||||||
|
@ -231,7 +231,7 @@ void mpz_manager<SYNCH>::sub(mpz const & a, mpz const & b, mpz & c) {
|
||||||
}
|
}
|
||||||
|
|
||||||
template<bool SYNCH>
|
template<bool SYNCH>
|
||||||
void mpz_manager<SYNCH>::set_big_i64(mpz & c, int64 v) {
|
void mpz_manager<SYNCH>::set_big_i64(mpz & c, int64_t v) {
|
||||||
#ifndef _MP_GMP
|
#ifndef _MP_GMP
|
||||||
if (c.m_ptr == nullptr) {
|
if (c.m_ptr == nullptr) {
|
||||||
c.m_ptr = allocate(m_init_cell_capacity);
|
c.m_ptr = allocate(m_init_cell_capacity);
|
||||||
|
@ -505,8 +505,8 @@ template<bool SYNCH>
|
||||||
void mpz_manager<SYNCH>::machine_div_rem(mpz const & a, mpz const & b, mpz & q, mpz & r) {
|
void mpz_manager<SYNCH>::machine_div_rem(mpz const & a, mpz const & b, mpz & q, mpz & r) {
|
||||||
STRACE("mpz", tout << "[mpz-ext] divrem(" << to_string(a) << ", " << to_string(b) << ") == ";);
|
STRACE("mpz", tout << "[mpz-ext] divrem(" << to_string(a) << ", " << to_string(b) << ") == ";);
|
||||||
if (is_small(a) && is_small(b)) {
|
if (is_small(a) && is_small(b)) {
|
||||||
int64 _a = i64(a);
|
int64_t _a = i64(a);
|
||||||
int64 _b = i64(b);
|
int64_t _b = i64(b);
|
||||||
set_i64(q, _a / _b);
|
set_i64(q, _a / _b);
|
||||||
set_i64(r, _a % _b);
|
set_i64(r, _a % _b);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue