mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +00:00
expose internal API for set_phase
This commit is contained in:
parent
8f577d3943
commit
fb1509d011
13 changed files with 24 additions and 2 deletions
|
@ -352,7 +352,8 @@ namespace sat {
|
|||
bool was_eliminated(bool_var v) const { return m_eliminated[v]; }
|
||||
void set_eliminated(bool_var v, bool f) override;
|
||||
bool was_eliminated(literal l) const { return was_eliminated(l.var()); }
|
||||
void set_phase(literal l) override { m_phase[l.var()] = !l.sign(); }
|
||||
void set_phase(literal l) override { m_best_phase[l.var()] = m_phase[l.var()] = !l.sign(); }
|
||||
void set_phase(bool_var b, bool sign) { set_phase(literal(b, sign)); }
|
||||
unsigned scope_lvl() const { return m_scope_lvl; }
|
||||
unsigned search_lvl() const { return m_search_lvl; }
|
||||
bool at_search_lvl() const { return m_scope_lvl == m_search_lvl; }
|
||||
|
|
|
@ -294,6 +294,13 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void set_phase(expr* e) override {
|
||||
bool is_not = m.is_not(e, e);
|
||||
sat::bool_var b = m_map.to_bool_var(e);
|
||||
if (b != sat::null_bool_var)
|
||||
m_solver.set_phase(b, is_not);
|
||||
}
|
||||
|
||||
unsigned get_scope_level() const override {
|
||||
return m_num_scopes;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue