47 int nBTLimit =
p->pPars->nBTLimit;
48 int pLits[3], nLits, RetValue, RetValue1;
51 p->pMSat->nSolverCalls++;
54 assert( !Aig_IsComplement(pOld) );
55 assert( !Aig_IsComplement(pNew) );
66 pLits[0] = toLitCond( Ssw_ObjSatNum(
p->pMSat,pOld), 0 );
67 pLits[1] = toLitCond( Ssw_ObjSatNum(
p->pMSat,pNew), pOld->
fPhase == pNew->
fPhase );
68 if (
p->iOutputLit > -1 )
69 pLits[nLits++] =
p->iOutputLit;
70 if (
p->pPars->fPolarFlip )
72 if ( pOld->
fPhase ) pLits[0] = lit_neg( pLits[0] );
73 if ( pNew->
fPhase ) pLits[1] = lit_neg( pLits[1] );
77 if (
p->pMSat->pSat->qtail !=
p->pMSat->pSat->qhead )
85 (ABC_INT64_T)nBTLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
86p->timeSat += Abc_Clock() - clk;
89p->timeSatUnsat += Abc_Clock() - clk;
92 pLits[0] = lit_neg( pLits[0] );
93 pLits[1] = lit_neg( pLits[1] );
106 else if ( RetValue1 ==
l_True )
108p->timeSatSat += Abc_Clock() - clk;
114p->timeSatUndec += Abc_Clock() - clk;
120 if ( pOld == Aig_ManConst1(
p->pFrames) )
129 pLits[0] = toLitCond( Ssw_ObjSatNum(
p->pMSat,pOld), 1 );
130 pLits[1] = toLitCond( Ssw_ObjSatNum(
p->pMSat,pNew), pOld->
fPhase ^ pNew->
fPhase );
131 if (
p->iOutputLit > -1 )
132 pLits[nLits++] =
p->iOutputLit;
133 if (
p->pPars->fPolarFlip )
135 if ( pOld->
fPhase ) pLits[0] = lit_neg( pLits[0] );
136 if ( pNew->
fPhase ) pLits[1] = lit_neg( pLits[1] );
139 if (
p->pMSat->pSat->qtail !=
p->pMSat->pSat->qhead )
147 (ABC_INT64_T)nBTLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
148p->timeSat += Abc_Clock() - clk;
151p->timeSatUnsat += Abc_Clock() - clk;
154 pLits[0] = lit_neg( pLits[0] );
155 pLits[1] = lit_neg( pLits[1] );
168 else if ( RetValue1 ==
l_True )
170p->timeSatSat += Abc_Clock() - clk;
176p->timeSatUndec += Abc_Clock() - clk;
198 int pLits[2], RetValue, fComplNew;
202 assert( Aig_Regular(pOld) != Aig_Regular(pNew) );
203 assert(
p->pPars->fConstrs || Aig_ObjPhaseReal(pOld) == Aig_ObjPhaseReal(pNew) );
206 if ( Aig_Regular(pNew) == Aig_ManConst1(
p->pFrames) )
208 assert( Aig_Regular(pOld) != Aig_ManConst1(
p->pFrames) );
215 if ( Aig_IsComplement(pOld) )
217 pOld = Aig_Regular(pOld);
218 pNew = Aig_Not(pNew);
227 fComplNew = Aig_IsComplement( pNew );
228 pNew = Aig_Regular( pNew );
231 if ( pOld == Aig_ManConst1(
p->pFrames) )
234 pLits[0] = toLitCond( Ssw_ObjSatNum(
p->pMSat,pNew), fComplNew );
235 if (
p->pPars->fPolarFlip )
237 if ( pNew->
fPhase ) pLits[0] = lit_neg( pLits[0] );
247 pLits[0] = toLitCond( Ssw_ObjSatNum(
p->pMSat,pOld), 0 );
248 pLits[1] = toLitCond( Ssw_ObjSatNum(
p->pMSat,pNew), !fComplNew );
249 if (
p->pPars->fPolarFlip )
251 if ( pOld->
fPhase ) pLits[0] = lit_neg( pLits[0] );
252 if ( pNew->
fPhase ) pLits[1] = lit_neg( pLits[1] );
254 pLits[0] = lit_neg( pLits[0] );
255 pLits[1] = lit_neg( pLits[1] );
260 pLits[0] = toLitCond( Ssw_ObjSatNum(
p->pMSat,pOld), 1 );
261 pLits[1] = toLitCond( Ssw_ObjSatNum(
p->pMSat,pNew), fComplNew);
262 if (
p->pPars->fPolarFlip )
264 if ( pOld->
fPhase ) pLits[0] = lit_neg( pLits[0] );
265 if ( pNew->
fPhase ) pLits[1] = lit_neg( pLits[1] );
267 pLits[0] = lit_neg( pLits[0] );
268 pLits[1] = lit_neg( pLits[1] );
291 Lit = toLitCond( Ssw_ObjSatNum(
p->pMSat,Aig_ObjFanin0(pPoObj)), !Aig_ObjFaninC0(pPoObj) );
292 if (
p->pPars->fPolarFlip )
294 if ( Aig_ObjFanin0(pPoObj)->fPhase ) Lit = lit_neg( Lit );