mirror of
https://github.com/Z3Prover/z3
synced 2025-10-01 13:39:28 +00:00
add ite-finder, profile
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
a6c3c18e74
commit
e1fb74edc5
17 changed files with 321 additions and 168 deletions
|
@ -24,7 +24,7 @@
|
|||
|
||||
namespace sat {
|
||||
|
||||
void xor_finder::extract_xors(clause_vector& clauses) {
|
||||
void xor_finder::operator()(clause_vector& clauses) {
|
||||
m_removed_clauses.reset();
|
||||
if (!s.get_config().m_xor_solver) {
|
||||
return;
|
||||
|
@ -49,6 +49,11 @@ namespace sat {
|
|||
}
|
||||
}
|
||||
m_clause_filters.clear();
|
||||
|
||||
for (clause* cp : clauses) cp->unmark_used();
|
||||
for (clause* cp : m_removed_clauses) cp->mark_used();
|
||||
std::function<bool(clause*)> not_used = [](clause* cp) { return !cp->was_used(); };
|
||||
clauses.filter_update(not_used);
|
||||
}
|
||||
|
||||
void xor_finder::extract_xor(clause& c) {
|
||||
|
@ -108,7 +113,7 @@ namespace sat {
|
|||
s.set_external(l.var());
|
||||
}
|
||||
if (parity) lits[0].neg();
|
||||
m_add_xr(lits);
|
||||
m_on_xor(lits);
|
||||
}
|
||||
|
||||
bool xor_finder::extract_xor(bool parity, clause& c, literal l1, literal l2) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue