mirror of
https://github.com/Z3Prover/z3
synced 2025-08-23 19:47:52 +00:00
This commit is contained in:
parent
6c0a790576
commit
d3194bb8a8
3 changed files with 23 additions and 12 deletions
|
@ -93,14 +93,19 @@ namespace sat {
|
|||
|
||||
void dual_solver::add_root(unsigned sz, literal const* clause) {
|
||||
flush();
|
||||
if (sz == 1) {
|
||||
if (false && sz == 1) {
|
||||
TRACE("dual", tout << "unit: " << clause[0] << "\n";);
|
||||
m_units.push_back(clause[0]);
|
||||
return;
|
||||
}
|
||||
literal root(m_solver.mk_var(), false);
|
||||
for (unsigned i = 0; i < sz; ++i)
|
||||
m_solver.mk_clause(root, ~ext2lit(clause[i]), status::input());
|
||||
literal root;
|
||||
if (sz == 1)
|
||||
root = ext2lit(clause[0]);
|
||||
else {
|
||||
root = literal(m_solver.mk_var(), false);
|
||||
for (unsigned i = 0; i < sz; ++i)
|
||||
m_solver.mk_clause(root, ~ext2lit(clause[i]), status::input());
|
||||
}
|
||||
m_roots.push_back(~root);
|
||||
TRACE("dual", tout << "root: " << ~root << " => " << literal_vector(sz, clause) << "\n";);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue