48 int RetValue, nBTLimit, iVar, b, Mint;
50 if (
p->nTotConfLim &&
p->nTotConfLim <=
p->pSat->stats.conflicts )
52 nBTLimit =
p->nTotConfLim?
p->nTotConfLim -
p->pSat->stats.conflicts : 0;
53 RetValue =
sat_solver_solve(
p->pSat, NULL, NULL, (ABC_INT64_T)nBTLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
68 Lits[b] = toLit( iVar );
69 if ( sat_solver_var_value(
p->pSat, iVar ) )
72 Lits[b] = lit_neg( Lits[b] );
75 assert( !Abc_InfoHasBit(
p->uCare, Mint) );
76 Abc_InfoSetBit(
p->uCare, Mint );
100 Vec_IntClear(
p->vProjVarsSat );
103 assert(
p->pCnf->pVarNums[pObjPo->
Id] >= 0 );
104 Vec_IntPush(
p->vProjVarsSat,
p->pCnf->pVarNums[pObjPo->
Id] );
108 p->nFanins = Vec_IntSize(
p->vProjVarsSat );
109 p->nWords = Abc_TruthWordNum(
p->nFanins );
110 memset(
p->uCare, 0,
sizeof(
unsigned) *
p->nWords );
114 p->nTotConfLim =
p->pPars->nBTLimit;
116 if ( RetValue == -1 )
120 p->nMintsCare +=
p->nCares;
121 p->nMintsTotal += (1<<
p->nFanins);
123 if (
p->pPars->fVeryVerbose )
125 printf(
"Node %4d : Care = %2d. Total = %2d. ", pNode->
Id,
p->nCares, (1<<
p->nFanins) );
131 if (
p->nFanins > 4 )
133 if (
p->nFanins == 4 )
134 p->uCare[0] =
p->uCare[0] | (
p->uCare[0] << 16);
135 if (
p->nFanins == 3 )
136 p->uCare[0] =
p->uCare[0] | (
p->uCare[0] << 8) | (
p->uCare[0] << 16) | (
p->uCare[0] << 24);
137 if (
p->nFanins == 2 )
138 p->uCare[0] =
p->uCare[0] | (
p->uCare[0] << 4) | (
p->uCare[0] << 8) | (
p->uCare[0] << 12) |
139 (
p->uCare[0] << 16) | (
p->uCare[0] << 20) | (
p->uCare[0] << 24) | (
p->uCare[0] << 28);
159 for ( i = 0; i < Vec_PtrSize(
p->pAigWin->vCis); i++ )
160 for ( k = i+1; k < Vec_PtrSize(
p->pAigWin->vCis); k++ )
162 pObj1 = Aig_ManCi(
p->pAigWin, i );
163 pObj2 = Aig_ManCi(
p->pAigWin, k );
164 Lits[0] = toLitCond(
p->pCnf->pVarNums[pObj1->
Id], 1 );
165 Lits[1] = toLitCond(
p->pCnf->pVarNums[pObj2->
Id], 1 );
struct Abc_Obj_t_ Abc_Obj_t
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
struct Aig_Obj_t_ Aig_Obj_t
#define sat_solver_addclause
void Extra_PrintBinary(FILE *pFile, unsigned Sign[], int nBits)
struct Mfs_Man_t_ Mfs_Man_t
#define MFS_FANIN_MAX
INCLUDES ///.
ABC_NAMESPACE_IMPL_START int Abc_NtkMfsSolveSat_iter(Mfs_Man_t *p)
DECLARATIONS ///.
int Abc_NtkMfsSolveSat(Mfs_Man_t *p, Abc_Obj_t *pNode)
int Abc_NtkAddOneHotness(Mfs_Man_t *p)
void sat_solver_delete(sat_solver *s)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
#define Vec_PtrForEachEntryStart(Type, vVec, pEntry, i, Start)