Lkc: Fix smoothing in atom counting nodes

This commit is contained in:
Tiago Gomes 2012-12-11 16:02:48 +00:00
parent bb68afe91d
commit a59c152962

View File

@ -765,7 +765,7 @@ LiftedCircuit::smoothCircuit (CircuitNode* node)
bool typeFound = false;
for (size_t k = 0; k < propagLits.size(); k++) {
if (litSet[i].first == propagLits[k].lid()
&& containsTypes (allTypes[j], propagLits[k].logVarTypes())) {
&& containsTypes (propagLits[k].logVarTypes(), allTypes[j])) {
typeFound = true;
break;
}
@ -776,8 +776,13 @@ LiftedCircuit::smoothCircuit (CircuitNode* node)
}
}
createSmoothNode (missingLids, casted->follow());
for (size_t i = 0; i < propagLits.size(); i++) {
propagLits[i].setAllFullLogVars();
// setAllFullLogVars() can cause repeated elements in
// the set. Fix this by reconstructing the set again
LitLvTypesSet copy = propagLits;
propagLits.clear();
for (size_t i = 0; i < copy.size(); i++) {
copy[i].setAllFullLogVars();
propagLits.insert (copy[i]);
}
break;
}