67 if ( pNode1 == pNode2 )
96 for ( i = 0; i < p->vOutputs->nSize; i++ )
100 if ( pNode == p->pConst1 )
108 p->vOutputs->pArray[i] =
Fraig_Not(p->pConst1);
110 p->vOutputs->pArray[i] = p->pConst1;
135 for ( i = 0; i < p->vOutputs->nSize; i++ )
138 pNode = p->vOutputs->pArray[i];
143 if ( pNode == p->pConst1 )
153 if ( p->pModel == NULL )
176 if ( pNode->
TravId == pMan->nTravIds )
178 pNode->
TravId = pMan->nTravIds;
180 if ( pNode->
NumPi >= 0 )
201 if ( pNode->
TravId == pMan->nTravIds )
204 if ( pNode->
TravId == pMan->nTravIds-1 )
206 pNode->
TravId = pMan->nTravIds;
209 pNode->
TravId = pMan->nTravIds;
211 if ( pNode->
NumPi >= 0 )
232 if ( pNode->
TravId == pMan->nTravIds )
235 if ( pNode->
TravId == pMan->nTravIds-1 )
237 pNode->
TravId = pMan->nTravIds;
240 pNode->
TravId = pMan->nTravIds;
242 if ( pNode->
NumPi >= 0 )
262 int NumPis, NumCut, fContain;
267 printf(
"(%d)(%d,%d):", NumPis, pOld->
Level, pNew->
Level );
270 if ( pOld->
TravId == p->nTravIds )
279 printf(
"%d", NumCut );
284 printf(
"%c ", fContain?
'+':
'-' );
304 int RetValue, RetValue1, i, fComp;
323 if ( nBTLimit <= 10 )
325 nBTLimit = (int)sqrt((
double)nBTLimit);
332 if ( p->pSat == NULL )
427 printf(
"s(%d)", pNew->
Level );
440 if ( pOld != p->pConst1 )
445 printf(
"T(%d)", pNew->
Level );
451 if ( pOld == p->pConst1 )
505 printf(
"s(%d)", pNew->
Level );
516 printf(
"T(%d)", pNew->
Level );
534 printf(
"u(%d)", pNew->
Level );
553 int RetValue, RetValue1, i, fComp;
565 if ( p->pSat == NULL )
656 int RetValue, RetValue1, i;
662 assert( pNode1R != pNode2R );
665 if ( p->pSat == NULL )
797 int fUseMuxes = 1, i;
802 if ( pNode->
TravId == pMan->nTravIds )
804 pNode->
TravId = pMan->nTravIds;
835 pMan->nVarsClauses++;
878 int i, k, Number, fUseMuxes = 1;
895 pOld->
TravId = pMan->nTravIds;
900 pNew->
TravId = pMan->nTravIds;
907 pNode = pMan->vNodes->pArray[Number];
938 pMan->nVarsClauses++;
947 if ( pFanin->
TravId == pMan->nTravIds )
952 pFanin->
TravId = pMan->nTravIds;
978 int * pVars, nVars, i, k;
983 for ( i = 0; i < nVars; i++ )
989 pNode = pMan->vNodes->pArray[pVars[i]];
1004 for ( i = 0; i < nVars; i++ )
1006 pNode = pMan->vNodes->pArray[pVars[i]];
1038 int * pVars, nVars, i, k;
1043 for ( i = 0; i < nVars; i++ )
1045 pNode = pMan->vNodes->pArray[pVars[i]];
1046 if ( pNode->
fMark2 == 0 )
1068 for ( i = 0; i < nVars; i++ )
1070 pNode = pMan->vNodes->pArray[pVars[i]];
1071 if ( pNode->
fMark2 == 0 )
1106 int fComp1, RetValue, nVars,
Var, Var1, i;
1113 for ( i = 0; i < vSuper->
nSize; i++ )
1136 for ( i = 0; i < vSuper->
nSize; i++ )
1166 int fComp, RetValue;
1217 int RetValue, VarF, VarI, VarT, VarE, fCompT, fCompE;
1417 printf(
"%d(%d)", vFanins->
nSize, nCubes );
1439 int i, Number, MaxLevel;
1441 if ( pFactors == NULL )
1449 pNode = pMan->vNodes->pArray[Number];
1450 pFactors[pNode->
Num] = (float)pow( 0.97, MaxLevel - pNode->
Level );
int * Fraig_ManAllocCounterExample(Fraig_Man_t *p)
Fraig_NodeVec_t * Fraig_CollectSupergate(Fraig_Node_t *pNode, int fStopAtMux)
int Fraig_ManCheckClauseUsingSat(Fraig_Man_t *p, Fraig_Node_t *pNode1, Fraig_Node_t *pNode2, int nBTLimit)
static void Fraig_SupergateAddClausesMux(Fraig_Man_t *pMan, Fraig_Node_t *pNode)
void Fraig_DetectFanoutFreeConeMux_rec(Fraig_Node_t *pNode, Fraig_NodeVec_t *vSuper, Fraig_NodeVec_t *vInside, int fFirst)
typedefABC_NAMESPACE_HEADER_START struct Fraig_ManStruct_t_ Fraig_Man_t
INCLUDES ///.
int Fraig_ManCheckMiter(Fraig_Man_t *p)
int * Msat_SolverReadModelArray(Msat_Solver_t *p)
int Msat_SolverAddClause(Msat_Solver_t *p, Msat_IntVec_t *pLits)
Msat_Clause_t * Msat_ClauseVecReadEntry(Msat_ClauseVec_t *p, int i)
int Fraig_NodeComparePhase(Fraig_Node_t *p1, Fraig_Node_t *p2)
static void Fraig_SupergateAddClausesExor(Fraig_Man_t *pMan, Fraig_Node_t *pNode)
int Fraig_CompareSimInfo(Fraig_Node_t *pNode1, Fraig_Node_t *pNode2, int iWordLast, int fUseRand)
void Msat_IntVecClear(Msat_IntVec_t *p)
int Fraig_NodeVecPushUnique(Fraig_NodeVec_t *p, Fraig_Node_t *Entry)
float * Msat_SolverReadFactors(Msat_Solver_t *p)
static abctime Abc_Clock()
static int Abc_MaxInt(int a, int b)
void Fraig_ManProveMiter(Fraig_Man_t *p)
static void Fraig_SetupAdjacentMark(Fraig_Man_t *pMan, Msat_IntVec_t *vConeVars)
int Fraig_CountPis(Fraig_Man_t *p, Msat_IntVec_t *vVarNums)
static void Fraig_PrepareCones_rec(Fraig_Man_t *pMan, Fraig_Node_t *pNode)
int Msat_SolverAddVar(Msat_Solver_t *p, int Level)
DECLARATIONS ///.
static void Fraig_SupergateAddClauses(Fraig_Man_t *pMan, Fraig_Node_t *pNode, Fraig_NodeVec_t *vSuper)
Fraig_Node_t * Fraig_NodeRecognizeMux(Fraig_Node_t *pNode, Fraig_Node_t **ppNodeT, Fraig_Node_t **ppNodeE)
int Fraig_MarkTfi3_rec(Fraig_Man_t *pMan, Fraig_Node_t *pNode)
int Msat_IntVecReadSize(Msat_IntVec_t *p)
void Msat_IntVecPush(Msat_IntVec_t *p, int Entry)
static void Fraig_SetupAdjacent(Fraig_Man_t *pMan, Msat_IntVec_t *vConeVars)
void Fraig_DetectFanoutFreeCone_rec(Fraig_Node_t *pNode, Fraig_NodeVec_t *vSuper, Fraig_NodeVec_t *vInside, int fFirst)
void Fraig_NodeVecFree(Fraig_NodeVec_t *p)
Fraig_NodeVec_t * Fraig_NodeVecAlloc(int nCap)
DECLARATIONS ///.
int Fraig_NodeIsExor(Fraig_Node_t *pNode)
int Fraig_NodeIsEquivalent(Fraig_Man_t *p, Fraig_Node_t *pOld, Fraig_Node_t *pNew, int nBTLimit, int nTimeLimit)
void Msat_IntVecFill(Msat_IntVec_t *p, int nSize, int Entry)
#define ABC_NAMESPACE_IMPL_END
static void Fraig_DetectFanoutFreeConeMux(Fraig_Man_t *pMan, Fraig_Node_t *pNode)
void Msat_SolverPrepare(Msat_Solver_t *pSat, Msat_IntVec_t *vVars)
int Msat_IntVecReadEntry(Msat_IntVec_t *p, int i)
int Fraig_NodeIsAnd(Fraig_Node_t *p)
static void Fraig_SetActivity(Fraig_Man_t *pMan, Fraig_Node_t *pOld, Fraig_Node_t *pNew)
static void Fraig_PrepareCones(Fraig_Man_t *pMan, Fraig_Node_t *pOld, Fraig_Node_t *pNew)
void Fraig_ManCreateSolver(Fraig_Man_t *p)
int Fraig_NodeIsImplication(Fraig_Man_t *p, Fraig_Node_t *pOld, Fraig_Node_t *pNew, int nBTLimit)
int * Fraig_ManSaveCounterExample(Fraig_Man_t *p, Fraig_Node_t *pNode)
int Fraig_NodesAreEqual(Fraig_Man_t *p, Fraig_Node_t *pNode1, Fraig_Node_t *pNode2, int nBTLimit, int nTimeLimit)
FUNCTION DEFINITIONS ///.
#define Fraig_IsComplement(p)
GLOBAL VARIABLES ///.
int Fraig_MarkTfi2_rec(Fraig_Man_t *pMan, Fraig_Node_t *pNode)
int Fraig_MarkTfi_rec(Fraig_Man_t *pMan, Fraig_Node_t *pNode)
#define ABC_NAMESPACE_IMPL_START
int Fraig_NodeIsMuxType(Fraig_Node_t *pNode)
int Msat_SolverReadVarNum(Msat_Solver_t *p)
FUNCTION DEFINITIONS ///.
int * Msat_IntVecReadArray(Msat_IntVec_t *p)
#define MSAT_VAR2LIT(v, s)
int Fraig_NodeIsVar(Fraig_Node_t *p)
void Fraig_VarsStudy(Fraig_Man_t *p, Fraig_Node_t *pOld, Fraig_Node_t *pNew)
void Msat_IntVecWriteEntry(Msat_IntVec_t *p, int i, int Entry)
static ABC_NAMESPACE_IMPL_START void Fraig_OrderVariables(Fraig_Man_t *pMan, Fraig_Node_t *pOld, Fraig_Node_t *pNew)
DECLARATIONS ///.
void Fraig_FeedBack(Fraig_Man_t *p, int *pModel, Msat_IntVec_t *vVars, Fraig_Node_t *pOld, Fraig_Node_t *pNew)
Fraig_NodeVec_t * vFanins
int Fraig_NodeIsExorType(Fraig_Node_t *pNode)
int Msat_SolverSolve(Msat_Solver_t *p, Msat_IntVec_t *pVecAssumps, int nBackTrackLimit, int nTimeLimit)