mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 04:03:39 +00:00
add extra fields to nlsat-clause
This commit is contained in:
parent
39dc8861ee
commit
4c070f9e76
|
@ -25,7 +25,10 @@ namespace nlsat {
|
||||||
m_size(sz),
|
m_size(sz),
|
||||||
m_capacity(sz),
|
m_capacity(sz),
|
||||||
m_learned(learned),
|
m_learned(learned),
|
||||||
m_activity(0),
|
m_active(false),
|
||||||
|
m_removed(false),
|
||||||
|
m_marked(false),
|
||||||
|
m_var_hash(0),
|
||||||
m_assumptions(as) {
|
m_assumptions(as) {
|
||||||
for (unsigned i = 0; i < sz; i++) {
|
for (unsigned i = 0; i < sz; i++) {
|
||||||
m_lits[i] = lits[i];
|
m_lits[i] = lits[i];
|
||||||
|
|
|
@ -29,7 +29,10 @@ namespace nlsat {
|
||||||
unsigned m_size;
|
unsigned m_size;
|
||||||
unsigned m_capacity:31;
|
unsigned m_capacity:31;
|
||||||
unsigned m_learned:1;
|
unsigned m_learned:1;
|
||||||
unsigned m_activity;
|
unsigned m_active:1;
|
||||||
|
unsigned m_removed:1;
|
||||||
|
unsigned m_marked:1;
|
||||||
|
unsigned m_var_hash;
|
||||||
assumption_set m_assumptions;
|
assumption_set m_assumptions;
|
||||||
literal m_lits[0];
|
literal m_lits[0];
|
||||||
static size_t get_obj_size(unsigned num_lits) { return sizeof(clause) + num_lits * sizeof(literal); }
|
static size_t get_obj_size(unsigned num_lits) { return sizeof(clause) + num_lits * sizeof(literal); }
|
||||||
|
@ -46,9 +49,15 @@ namespace nlsat {
|
||||||
literal const * begin() const { return m_lits; }
|
literal const * begin() const { return m_lits; }
|
||||||
literal const * end() const { return m_lits + m_size; }
|
literal const * end() const { return m_lits + m_size; }
|
||||||
literal const * data() const { return m_lits; }
|
literal const * data() const { return m_lits; }
|
||||||
void inc_activity() { m_activity++; }
|
void set_active(bool b) { m_active = b; }
|
||||||
void set_activity(unsigned v) { m_activity = v; }
|
bool is_active() const { return m_active; }
|
||||||
unsigned get_activity() const { return m_activity; }
|
void set_removed() { m_removed = true; }
|
||||||
|
bool is_removed() const { return m_removed; }
|
||||||
|
unsigned var_hash() const { return m_var_hash; }
|
||||||
|
void set_var_hash(unsigned h) { m_var_hash = h; }
|
||||||
|
bool is_marked() const { return m_marked; }
|
||||||
|
void mark() { m_marked = true; }
|
||||||
|
void unmark() { m_marked = false; }
|
||||||
bool contains(literal l) const;
|
bool contains(literal l) const;
|
||||||
bool contains(bool_var v) const;
|
bool contains(bool_var v) const;
|
||||||
void shrink(unsigned num_lits) { SASSERT(num_lits <= m_size); if (num_lits < m_size) { m_size = num_lits; } }
|
void shrink(unsigned num_lits) { SASSERT(num_lits <= m_size); if (num_lits < m_size) { m_size = num_lits; } }
|
||||||
|
|
Loading…
Reference in a new issue