Commit feebac41 by Alan Mishchenko

Corner-case bug fixed in CNF generation.

parent 680af189
...@@ -420,8 +420,13 @@ Cnf_Dat_t * Mf_ManDeriveCnf( Mf_Man_t * p, int fCnfObjIds, int fAddOrCla ) ...@@ -420,8 +420,13 @@ Cnf_Dat_t * Mf_ManDeriveCnf( Mf_Man_t * p, int fCnfObjIds, int fAddOrCla )
continue; continue;
pCut = Mf_ObjCutBest( p, Id ); pCut = Mf_ObjCutBest( p, Id );
iFunc = Abc_Lit2Var( Mf_CutFunc(pCut) ); iFunc = Abc_Lit2Var( Mf_CutFunc(pCut) );
//Dau_DsdPrintFromTruth( Vec_MemReadEntry(p->vTtMem, iFunc), 3 );
fComplLast = Abc_LitIsCompl( Mf_CutFunc(pCut) ); fComplLast = Abc_LitIsCompl( Mf_CutFunc(pCut) );
if ( iFunc == 0 ) // constant cut
{
pCnf->pClauses[iCla++] = pCnf->pClauses[0] + iLit;
pCnf->pClauses[0][iLit++] = Abc_Var2Lit(pCnfIds[Id], !fComplLast);
continue;
}
for ( k = 0; k < Mf_CutSize(pCut); k++ ) for ( k = 0; k < Mf_CutSize(pCut); k++ )
pFanins[k] = pCnfIds[pCut[k+1]]; pFanins[k] = pCnfIds[pCut[k+1]];
pFanins[k++] = pCnfIds[Id]; pFanins[k++] = pCnfIds[Id];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment