Skip to content

Commit

Permalink
Merge 4e18eb1 into eb46358
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-irfan committed Mar 28, 2023
2 parents eb46358 + 4e18eb1 commit 7db7511
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/mcsat/bool/bool_plugin.c
Expand Up @@ -863,6 +863,7 @@ void bool_plugin_gc_mark(plugin_t* plugin, gc_info_t* gc_vars) {
uint32_t i;
variable_t var;
clause_ref_t clause_ref;
mcsat_clause_t* c;

if (gc_vars->level == 0) {

Expand All @@ -885,6 +886,16 @@ void bool_plugin_gc_mark(plugin_t* plugin, gc_info_t* gc_vars) {
clause_ref = bool_plugin_get_reason_ref(bp, var);
gc_info_mark(&bp->gc_clauses, clause_ref);
}

// keep binary clauses
for (i = 0; i < bp->lemmas.size; ++ i) {
clause_ref = bp->lemmas.data[i];
assert(clause_db_is_clause(db, clause_ref, true));
c = clause_db_get_clause(&bp->clause_db, clause_ref);
if (c->size <= 2) {
gc_info_mark(&bp->gc_clauses, clause_ref);
}
}
}

// Mark all the CNF definitions
Expand Down

0 comments on commit 7db7511

Please sign in to comment.