Skip to content

Commit

Permalink
Performance and assertion fix in min unsat cores
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomaqa committed Nov 4, 2024
1 parent 6503ff8 commit ecd1474
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/unsatcores/UnsatCoreBuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,19 @@ void UnsatCoreBuilder::partitionNamedTerms() {
namedTerms.clear();
hiddenTerms.clear();

bool const minCore = config.minimal_unsat_cores();
// See the comment in `minimize` for why we exclude hidden terms here

auto const & termNames = solver.getTermNames();
if (termNames.empty()) {
hiddenTerms = std::move(allTerms);
if (not minCore) { hiddenTerms = std::move(allTerms); }
return;
}

bool const minCore = config.minimal_unsat_cores();
for (PTRef term : allTerms) {
if (termNames.contains(term)) {
namedTerms.push(term);
} else if (not minCore) {
// See the comment in `minimize` for why we exclude hidden terms
hiddenTerms.push(term);
}
}
Expand Down

0 comments on commit ecd1474

Please sign in to comment.