mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
integrating NB suggestions
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
7642f74142
commit
ac0b8ba455
|
@ -129,7 +129,7 @@ public:
|
||||||
|
|
||||||
bool contains(lpvar j) const { return j == m_j; }
|
bool contains(lpvar j) const { return j == m_j; }
|
||||||
int get_degree() const { return 1; }
|
int get_degree() const { return 1; }
|
||||||
bool virtual is_linear() const { return true; }
|
bool is_linear() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class nex_scalar : public nex {
|
class nex_scalar : public nex {
|
||||||
|
@ -195,8 +195,8 @@ class nex_mul : public nex {
|
||||||
rational m_coeff;
|
rational m_coeff;
|
||||||
vector<nex_pow> m_children;
|
vector<nex_pow> m_children;
|
||||||
public:
|
public:
|
||||||
virtual const nex* get_child_exp(unsigned j) const { return m_children[j].e(); }
|
const nex* get_child_exp(unsigned j) const override { return m_children[j].e(); }
|
||||||
virtual unsigned get_child_pow(unsigned j) const { return m_children[j].pow(); }
|
unsigned get_child_pow(unsigned j) const override { return m_children[j].pow(); }
|
||||||
|
|
||||||
unsigned number_of_child_powers() const { return m_children.size(); }
|
unsigned number_of_child_powers() const { return m_children.size(); }
|
||||||
|
|
||||||
|
@ -391,7 +391,7 @@ public:
|
||||||
|
|
||||||
void add_child(nex* e) { m_children.push_back(e); }
|
void add_child(nex* e) { m_children.push_back(e); }
|
||||||
#ifdef Z3DEBUG
|
#ifdef Z3DEBUG
|
||||||
virtual void sort() {
|
void sort() override {
|
||||||
NOT_IMPLEMENTED_YET();
|
NOT_IMPLEMENTED_YET();
|
||||||
/*
|
/*
|
||||||
for (nex * c : m_children) {
|
for (nex * c : m_children) {
|
||||||
|
|
|
@ -196,7 +196,8 @@ bool nex_creator::gt_on_var_nex(const nex_var* a, const nex* b) const {
|
||||||
case expr_type::MUL:
|
case expr_type::MUL:
|
||||||
return b->get_degree() <= 1 && gt_on_var_nex(a, (*to_mul(b))[0].e());
|
return b->get_degree() <= 1 && gt_on_var_nex(a, (*to_mul(b))[0].e());
|
||||||
case expr_type::SUM:
|
case expr_type::SUM:
|
||||||
return !gt((*to_sum(b))[0], a);
|
SASSERT(b->size() > 1);
|
||||||
|
return gt(a, (*to_sum(b))[0]);
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue