mirror of
https://github.com/Z3Prover/z3
synced 2025-10-11 02:08:07 +00:00
extract lemmas
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
71b6f97fb1
commit
c33dce1161
9 changed files with 104 additions and 7 deletions
|
@ -3004,7 +3004,8 @@ namespace sat {
|
|||
// Iterators
|
||||
//
|
||||
// -----------------------
|
||||
void solver::collect_bin_clauses(svector<bin_clause> & r, bool learned) const {
|
||||
void solver::collect_bin_clauses(svector<bin_clause> & r, bool learned, bool learned_only) const {
|
||||
SASSERT(learned || !learned_only);
|
||||
unsigned sz = m_watches.size();
|
||||
for (unsigned l_idx = 0; l_idx < sz; l_idx++) {
|
||||
literal l = to_literal(l_idx);
|
||||
|
@ -3017,6 +3018,8 @@ namespace sat {
|
|||
continue;
|
||||
if (!learned && it->is_learned())
|
||||
continue;
|
||||
else if (learned && learned_only && !it->is_learned())
|
||||
continue;
|
||||
literal l2 = it->get_literal();
|
||||
if (l.index() > l2.index())
|
||||
continue;
|
||||
|
@ -3327,7 +3330,6 @@ namespace sat {
|
|||
m_user_bin_clauses.reset();
|
||||
m_binary_clause_graph.reset();
|
||||
collect_bin_clauses(m_user_bin_clauses, true);
|
||||
collect_bin_clauses(m_user_bin_clauses, false);
|
||||
hashtable<literal_pair, pair_hash<literal_hash, literal_hash>, default_eq<literal_pair> > seen_bc;
|
||||
for (unsigned i = 0; i < m_user_bin_clauses.size(); ++i) {
|
||||
literal l1 = m_user_bin_clauses[i].first;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue