Skip to content

Commit

Permalink
delete binary clauses that are true at the base level
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-irfan committed Dec 16, 2023
1 parent e27cf30 commit 8d9e85f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/mcsat/bool/bool_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,7 @@ void bool_plugin_gc_mark(plugin_t* plugin, gc_info_t* gc_vars) {

bool_plugin_t* bp = (bool_plugin_t*) plugin;
clause_db_t* db = &bp->clause_db;
const mcsat_trail_t* trail = bp->ctx->trail;

uint32_t i;
float act_threshold;
Expand Down Expand Up @@ -910,8 +911,11 @@ void bool_plugin_gc_mark(plugin_t* plugin, gc_info_t* gc_vars) {
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);
if (c->size == 2) {
if (!literal_is_true(c->literals[0], trail) &&
!literal_is_true(c->literals[1], trail)) {
gc_info_mark(&bp->gc_clauses, clause_ref);
}
}
}
}
Expand Down

0 comments on commit 8d9e85f

Please sign in to comment.