Skip to content

Commit

Permalink
Merge pull request #128 from vprover/fix-bsd-check
Browse files Browse the repository at this point in the history
Fix pre-check in BSD
  • Loading branch information
selig authored Jul 13, 2020
2 parents e2be959 + 9c5dabf commit 033d34d
Showing 1 changed file with 17 additions and 22 deletions.
39 changes: 17 additions & 22 deletions Inferences/BackwardSubsumptionDemodulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,8 @@ void BackwardSubsumptionDemodulation::perform(Clause* sideCl, BwSimplificationRe

void BackwardSubsumptionDemodulation::performWithQueryLit(Clause* sideCl, Literal* candidateQueryLit, vvector<BwSimplificationRecord>& simplifications)
{

// candidate
// vvvvvvvvvvvvvvvv
// cl matched /-- only look for a term to demodulate in this part!
// vvvvvvvvvv vv vvvvvvvvvv
// eqLit dlit
// vvvvv vvvvv
// sideCl
// vvvvvvvvvv
//
// l = r \/ C CΘ \/ L[lΘ] \/ D
// --------------------------------
Expand All @@ -201,7 +196,7 @@ void BackwardSubsumptionDemodulation::performWithQueryLit(Clause* sideCl, Litera
#endif

bool mustPredInit = false;
// bool mustPredActive = false;
bool mustPredActive = false;
unsigned mustPred;

SLQueryResultIterator rit = _index->getInstances(candidateQueryLit, false, false);
Expand Down Expand Up @@ -268,30 +263,30 @@ void BackwardSubsumptionDemodulation::performWithQueryLit(Clause* sideCl, Litera
mustPred = pred;
}
}
/*
if (mustPred == 0) {
// for positive equality we need to have skipped at least in the remaining literals
mustPredActive = (numPosEqs >= 2);
} else {
mustPredActive = true;
}
*/
}
bool haveMustPred = false;
for (unsigned ii = 0; ii < candidate->length(); ++ii) {
Literal* lit = (*candidate)[ii];
if (lit == qr.literal) {
continue;
if (mustPredActive) {
bool haveMustPred = false;
for (unsigned ii = 0; ii < candidate->length(); ++ii) {
Literal* lit = (*candidate)[ii];
if (lit == qr.literal) {
continue;
}
unsigned pred = lit->header();
if (pred == mustPred) {
haveMustPred = true;
break;
}
}
unsigned pred = lit->header();
if (pred == mustPred) {
haveMustPred = true;
break;
if (!haveMustPred) {
continue;
}
}
if (!haveMustPred) {
continue;
}
RSTAT_CTR_INC("bsd 1 mustPred survivors");

simplifyCandidate(sideCl, candidate, simplifications);
Expand Down

0 comments on commit 033d34d

Please sign in to comment.