mirror of
https://github.com/Z3Prover/z3
synced 2025-05-05 23:05:46 +00:00
Polysat: disjunctive lemmas (#5311)
* Add macro to disable linear solver for development * Move new_* and add_* to header * Add ref_vector_core::push_back(ref<T>&&) * Attempt to simplify lifetime handling * Make operator bool() explicit * clause improvements * display boolean assignment * clause::resolve * bug fixes * more fixes * final case of backtrack
This commit is contained in:
parent
5fd3ef6580
commit
8757f04d20
19 changed files with 524 additions and 294 deletions
|
@ -63,6 +63,7 @@ namespace polysat {
|
|||
}
|
||||
|
||||
void bool_var_manager::reset_marks() {
|
||||
LOG_V("-------------------------- (reset boolean marks)");
|
||||
m_marks.reserve(size());
|
||||
m_clock++;
|
||||
if (m_clock != 0)
|
||||
|
@ -72,7 +73,19 @@ namespace polysat {
|
|||
}
|
||||
|
||||
void bool_var_manager::set_mark(sat::bool_var var) {
|
||||
LOG_V("Marking: b" << var);
|
||||
SASSERT(var != sat::null_bool_var);
|
||||
m_marks[var] = m_clock;
|
||||
}
|
||||
|
||||
std::ostream& bool_var_manager::display(std::ostream& out) const {
|
||||
for (sat::bool_var v = 0; v < size(); ++v) {
|
||||
sat::literal lit{v};
|
||||
if (value(lit) == l_true)
|
||||
out << " " << lit;
|
||||
if (value(lit) == l_false)
|
||||
out << " " << ~lit;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue