mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
enable on-clause with dependencies
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
9db636c38b
commit
3d8f75b3d8
9 changed files with 46 additions and 18 deletions
|
@ -266,7 +266,8 @@ namespace sat {
|
|||
m_clause.reset();
|
||||
switch (j.get_kind()) {
|
||||
case justification::NONE:
|
||||
m_clause.push_back(l);
|
||||
if (l != null_literal)
|
||||
m_clause.push_back(l);
|
||||
break;
|
||||
case justification::BINARY:
|
||||
m_clause.push_back(l);
|
||||
|
@ -282,7 +283,7 @@ namespace sat {
|
|||
break;
|
||||
}
|
||||
std::sort(m_clause.begin(), m_clause.end());
|
||||
IF_VERBOSE(3, verbose_stream() << "add core " << m_clause << "\n");
|
||||
IF_VERBOSE(3, verbose_stream() << "add core {" << m_clause << "}\n");
|
||||
auto& [clauses, id, in_core] = m_clauses.find(m_clause);
|
||||
in_core = true;
|
||||
insert_dep(id);
|
||||
|
@ -337,7 +338,13 @@ namespace sat {
|
|||
}
|
||||
|
||||
void proof_trim::assume(unsigned id, bool is_initial) {
|
||||
std::sort(m_clause.begin(), m_clause.end());
|
||||
std::sort(m_clause.begin(), m_clause.end());
|
||||
unsigned j = 0;
|
||||
sat::literal prev = null_literal;
|
||||
for (unsigned i = 0; i < m_clause.size(); ++i)
|
||||
if (m_clause[i] != prev)
|
||||
prev = m_clause[j++] = m_clause[i];
|
||||
m_clause.shrink(j);
|
||||
if (unit_or_binary_occurs())
|
||||
return;
|
||||
if (!m_conflict.empty() && m_clause.empty()) {
|
||||
|
|
|
@ -312,7 +312,7 @@ namespace euf {
|
|||
for (unsigned i = 0; i < n; ++i)
|
||||
m_clause.push_back(literal2expr(lits[i]));
|
||||
auto hint = status2proof_hint(st);
|
||||
m_on_clause(m_on_clause_ctx, hint, m_clause.size(), m_clause.data());
|
||||
m_on_clause(m_on_clause_ctx, hint, 0, nullptr, m_clause.size(), m_clause.data());
|
||||
}
|
||||
|
||||
void solver::on_proof(unsigned n, literal const* lits, sat::status st) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue