Skip to content

Commit

Permalink
Mcsat -- keep binary clauses (#436)
Browse files Browse the repository at this point in the history
* keep binary clauses

* disabled problematic regression test

* fix
  • Loading branch information
ahmed-irfan committed Mar 28, 2023
1 parent eb46358 commit db89858
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
Original file line number Diff line number Diff line change
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 db89858

Please sign in to comment.