3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-18 02:16:40 +00:00

include chronological backtracking, two-phase sat, xor inprocessing, probsat, ddfw

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-06-13 03:34:31 -07:00
parent 46d23ea8d7
commit d17248821a
32 changed files with 3246 additions and 654 deletions

View file

@ -25,17 +25,20 @@ namespace sat {
public:
enum kind { NONE, BINARY, TERNARY, CLAUSE, EXT_JUSTIFICATION };
private:
unsigned m_level;
size_t m_val1;
unsigned m_val2;
justification(ext_justification_idx idx, kind k):m_val1(idx), m_val2(k) {}
justification(unsigned lvl, ext_justification_idx idx, kind k):m_level(lvl), m_val1(idx), m_val2(k) {}
unsigned val1() const { return static_cast<unsigned>(m_val1); }
public:
justification():m_val1(0), m_val2(NONE) {}
explicit justification(literal l):m_val1(l.to_uint()), m_val2(BINARY) {}
justification(literal l1, literal l2):m_val1(l1.to_uint()), m_val2(TERNARY + (l2.to_uint() << 3)) {}
explicit justification(clause_offset cls_off):m_val1(cls_off), m_val2(CLAUSE) {}
static justification mk_ext_justification(ext_justification_idx idx) { return justification(idx, EXT_JUSTIFICATION); }
justification(unsigned lvl):m_level(lvl), m_val1(0), m_val2(NONE) {}
explicit justification(unsigned lvl, literal l):m_level(lvl), m_val1(l.to_uint()), m_val2(BINARY) {}
justification(unsigned lvl, literal l1, literal l2):m_level(lvl), m_val1(l1.to_uint()), m_val2(TERNARY + (l2.to_uint() << 3)) {}
explicit justification(unsigned lvl, clause_offset cls_off):m_level(lvl), m_val1(cls_off), m_val2(CLAUSE) {}
static justification mk_ext_justification(unsigned lvl, ext_justification_idx idx) { return justification(lvl, idx, EXT_JUSTIFICATION); }
unsigned level() const { return m_level; }
kind get_kind() const { return static_cast<kind>(m_val2 & 7); }
bool is_none() const { return m_val2 == NONE; }
@ -72,6 +75,7 @@ namespace sat {
out << "external";
break;
}
out << " @" << j.level();
return out;
}
};