35static inline int CbsP_VarIsAssigned(
Gia_Obj_t * pVar ) {
return pVar->
fMark0; }
40static inline int CbsP_VarIsJust(
Gia_Obj_t * pVar ) {
return Gia_ObjIsAnd(pVar) && !CbsP_VarIsAssigned(Gia_ObjFanin0(pVar)) && !CbsP_VarIsAssigned(Gia_ObjFanin1(pVar)); }
41static inline int CbsP_VarFanin0Value(
Gia_Obj_t * pVar ) {
return !CbsP_VarIsAssigned(Gia_ObjFanin0(pVar)) ? 2 : (CbsP_VarValue(Gia_ObjFanin0(pVar)) ^ Gia_ObjFaninC0(pVar)); }
42static inline int CbsP_VarFanin1Value(
Gia_Obj_t * pVar ) {
return !CbsP_VarIsAssigned(Gia_ObjFanin1(pVar)) ? 2 : (CbsP_VarValue(Gia_ObjFanin1(pVar)) ^ Gia_ObjFaninC1(pVar)); }
44static inline int CbsP_VarDecLevel(
CbsP_Man_t *
p,
Gia_Obj_t * pVar ) {
int Value =
p->vValue->pArray[Gia_ObjId(
p->pAig,pVar)];
assert( Value != ~0 );
return Vec_IntEntry(
p->vLevReas, 3*Value); }
45static inline Gia_Obj_t * CbsP_VarReason0(
CbsP_Man_t *
p,
Gia_Obj_t * pVar ) {
int Value =
p->vValue->pArray[Gia_ObjId(
p->pAig,pVar)];
assert( Value != ~0 );
return pVar + Vec_IntEntry(
p->vLevReas, 3*Value+1); }
46static inline Gia_Obj_t * CbsP_VarReason1(
CbsP_Man_t *
p,
Gia_Obj_t * pVar ) {
int Value =
p->vValue->pArray[Gia_ObjId(
p->pAig,pVar)];
assert( Value != ~0 );
return pVar + Vec_IntEntry(
p->vLevReas, 3*Value+2); }
47static inline int CbsP_ClauseDecLevel(
CbsP_Man_t *
p,
int hClause ) {
return CbsP_VarDecLevel(
p,
p->pClauses.pData[hClause] ); }
49#define CbsP_QueForEachEntry( Que, pObj, i ) \
50 for ( i = (Que).iHead; (i < (Que).iTail) && ((pObj) = (Que).pData[i]); i++ )
52#define CbsP_ClauseForEachVar( p, hClause, pObj ) \
53 for ( (p)->pIter = (p)->pClauses.pData + hClause; (pObj = *pIter); (p)->pIter++ )
54#define CbsP_ClauseForEachVar1( p, hClause, pObj ) \
55 for ( (p)->pIter = (p)->pClauses.pData+hClause+1; (pObj = *pIter); (p)->pIter++ )
75 pPars->nBTLimit = 1000;
76 pPars->nJustLimit = 100;
77 pPars->fUseHighest = 1;
78 pPars->fUseLowest = 0;
82 pPars->fUseProved = 1;
85 pPars->nJscanThis = 0;
86 pPars->nRscanThis = 0;
87 pPars->maxJscanUndec = 0;
88 pPars->maxRscanUndec = 0;
89 pPars->maxJscanSolved = 0;
90 pPars->maxRscanSolved = 0;
93 pPars->accJscanSat = 0;
94 pPars->accJscanUnsat = 0;
95 pPars->accJscanUndec = 0;
96 pPars->accRscanSat = 0;
97 pPars->accRscanUnsat = 0;
98 pPars->accRscanUndec = 0;
103 pPars->nJscanLimit = 100;
104 pPars->nRscanLimit = 100;
105 pPars->nPropLimit = 500;
109 p->Pars.nBTLimit = Num;
112static inline void CbsP_UpdateRecord(
CbsP_Par_t * pPars,
int res ){
115 if( pPars-> maxJscanUndec < pPars->nJscanThis )
116 pPars-> maxJscanUndec = pPars->nJscanThis;
117 if( pPars-> maxRscanUndec < pPars->nRscanThis )
118 pPars-> maxRscanUndec = pPars->nRscanThis;
119 if( pPars-> maxPropUndec < pPars->nPropThis )
120 pPars-> maxPropUndec = pPars->nPropThis;
122 pPars->accJscanUndec += pPars->nJscanThis;
123 pPars->accRscanUndec += pPars->nRscanThis;
124 pPars-> accPropUndec += pPars->nPropThis;
126 if( pPars->maxJscanSolved < pPars->nJscanThis )
127 pPars->maxJscanSolved = pPars->nJscanThis;
128 if( pPars->maxRscanSolved < pPars->nRscanThis )
129 pPars->maxRscanSolved = pPars->nRscanThis;
130 if( pPars-> maxPropSolved < pPars->nPropThis )
131 pPars-> maxPropSolved = pPars->nPropThis;
134 pPars->accJscanSat += pPars->nJscanThis;
135 pPars->accRscanSat += pPars->nRscanThis;
136 pPars-> accPropSat += pPars->nPropThis;
140 pPars->accJscanUnsat += pPars->nJscanThis;
141 pPars->accRscanUnsat += pPars->nRscanThis;
142 pPars-> accPropUnsat += pPars->nPropThis;
149 printf(
"max of solved: jscan# %13d rscan %13d prop %13d\n" , pPars->maxJscanSolved, pPars->maxRscanSolved , pPars->maxPropSolved );
150 printf(
"max of undec: jscan# %13d rscan %13d prop %13d\n" , pPars->maxJscanUndec , pPars->maxRscanUndec , pPars->maxPropUndec );
151 printf(
"acc of sat: jscan# %13ld rscan %13ld prop %13ld\n", pPars->accJscanSat , pPars->accRscanSat , pPars->accPropSat );
152 printf(
"acc of unsat: jscan# %13ld rscan %13ld prop %13ld\n", pPars->accJscanUnsat , pPars->accRscanUnsat , pPars->accPropUnsat );
153 printf(
"acc of undec: jscan# %13ld rscan %13ld prop %13ld\n", pPars->accJscanUndec , pPars->accRscanUndec , pPars->accPropUndec );
155 printf(
"avg of sat: jscan# %13ld rscan %13ld prop %13ld\n", pPars->accJscanSat / pPars->nSat , pPars->accRscanSat / pPars->nSat , pPars->accPropSat / pPars->nSat );
157 printf(
"avg of unsat: jscan# %13ld rscan %13ld prop %13ld\n", pPars->accJscanUnsat / pPars->nUnsat , pPars->accRscanUnsat / pPars->nUnsat , pPars->accPropUnsat / pPars->nUnsat );
159 printf(
"avg of undec: jscan# %13ld rscan %13ld prop %13ld\n", pPars->accJscanUndec / pPars->nUndec , pPars->accRscanUndec / pPars->nUndec , pPars->accPropUndec / pPars->nUndec );
177 p->pProp.nSize =
p->pJust.nSize =
p->pClauses.nSize = 10000;
181 p->pClauses.iHead =
p->pClauses.iTail = 1;
182 p->vModel = Vec_IntAlloc( 1000 );
183 p->vLevReas = Vec_IntAlloc( 1000 );
184 p->vTemp = Vec_PtrAlloc( 1000 );
186 p->vValue = Vec_IntAlloc( Gia_ManObjNum(pGia) );
187 Vec_IntFill(
p->vValue, Gia_ManObjNum(pGia), ~0 );
206 Vec_IntFree(
p->vLevReas );
207 Vec_IntFree(
p->vModel );
208 Vec_PtrFree(
p->vTemp );
209 Vec_IntFree(
p->vValue );
247static inline int CbsP_ManCheckPropLimits(
CbsP_Man_t *
p )
249 return p->Pars.nPropThis >
p->Pars.nPropLimit;
251static inline int CbsP_ManCheckLimits(
CbsP_Man_t *
p )
253 return CbsP_ManCheckPropLimits(
p) ||
p->Pars.nJscanThis >
p->Pars.nJscanLimit ||
p->Pars.nRscanThis >
p->Pars.nRscanLimit ||
p->Pars.nJustThis >
p->Pars.nJustLimit ||
p->Pars.nBTThis >
p->Pars.nBTLimit;
271 Vec_IntClear( vCex );
274 if ( Gia_ObjIsCi(pVar) )
275 Vec_IntPush( vCex, Abc_Var2Lit(Gia_ObjId(
p->pAig,pVar), !CbsP_VarValue(pVar)) );
282 Vec_IntClear( vCex );
285 Vec_IntPush( vCex, Abc_Var2Lit(Gia_ObjId(
p->pAig,pVar), !CbsP_VarValue(pVar)) );
301 return p->iHead ==
p->iTail;
317 assert( !Gia_IsComplement(pObj) );
318 if (
p->iTail ==
p->nSize )
323 p->pData[
p->iTail++] = pObj;
358static inline void CbsP_QueStore(
CbsP_Que_t *
p,
int * piHeadOld,
int * piTailOld )
361 *piHeadOld =
p->iHead;
362 *piTailOld =
p->iTail;
363 for ( i = *piHeadOld; i < *piTailOld; i++ )
364 CbsP_QuePush(
p,
p->pData[i] );
365 p->iHead = *piTailOld;
379static inline void CbsP_QueRestore(
CbsP_Que_t *
p,
int iHeadOld,
int iTailOld )
398 int iHeadOld =
p->iHead;
400 CbsP_QuePush(
p, NULL );
420 assert( !Gia_IsComplement(pObj) );
421 assert( Gia_ObjIsAnd(pObj) );
422 Count0 = Gia_ObjRefNum(
p->pAig, Gia_ObjFanin0(pObj) );
423 Count1 = Gia_ObjRefNum(
p->pAig, Gia_ObjFanin1(pObj) );
424 return Abc_MaxInt( Count0, Count1 );
443 if ( pObjMax == NULL || pObjMax < pObj )
464 if ( pObjMin == NULL || pObjMin > pObj )
483 int i, iMaxFF = 0, iCurFF;
484 assert(
p->pAig->pRefs != NULL );
487 iCurFF = CbsP_VarFaninFanoutMax(
p, pObj );
489 if ( iMaxFF < iCurFF )
511static inline void CbsP_ManCancelUntil(
CbsP_Man_t *
p,
int iBound )
515 assert( iBound <= p->pProp.iTail );
516 p->pProp.iHead = iBound;
518 CbsP_VarUnassign(
p, pVar );
519 p->pProp.iTail = iBound;
520 Vec_IntShrink(
p->vLevReas, 3*iBound );
539 assert( Gia_ObjIsCand(pObjR) );
540 assert( !CbsP_VarIsAssigned(pObjR) );
541 CbsP_VarAssign( pObjR );
542 CbsP_VarSetValue( pObjR, !Gia_IsComplement(pObj) );
543 assert(
p->vValue->pArray[Gia_ObjId(
p->pAig,pObjR)] == ~0 );
544 p->vValue->pArray[Gia_ObjId(
p->pAig,pObjR)] =
p->pProp.iTail;
545 CbsP_QuePush( &
p->pProp, pObjR );
546 Vec_IntPush(
p->vLevReas, Level );
547 Vec_IntPush(
p->vLevReas, pRes0 ? pRes0-pObjR : 0 );
548 Vec_IntPush(
p->vLevReas, pRes1 ? pRes1-pObjR : 0 );
549 assert( Vec_IntSize(
p->vLevReas) == 3 *
p->pProp.iTail );
551 p->Pars.nPropThis ++ ;
568static inline int CbsP_ManClauseSize(
CbsP_Man_t *
p,
int hClause )
572 for ( pIter = pQue->
pData + hClause; *pIter; pIter++ );
573 return pIter - pQue->
pData - hClause ;
587static inline void CbsP_ManPrintClause(
CbsP_Man_t *
p,
int Level,
int hClause )
592 assert( CbsP_QueIsEmpty( pQue ) );
593 printf(
"Level %2d : ", Level );
594 for ( i = hClause; (pObj = pQue->
pData[i]); i++ )
595 printf(
"%d=%d(%d) ", Gia_ObjId(
p->pAig, pObj), CbsP_VarValue(pObj), CbsP_VarDecLevel(
p, pObj) );
610static inline void CbsP_ManPrintClauseNew(
CbsP_Man_t *
p,
int Level,
int hClause )
615 assert( CbsP_QueIsEmpty( pQue ) );
616 printf(
"Level %2d : ", Level );
617 for ( i = hClause; (pObj = pQue->
pData[i]); i++ )
618 printf(
"%c%d ", CbsP_VarValue(pObj)?
'+':
'-', Gia_ObjId(
p->pAig, pObj) );
633static inline void CbsP_ManDeriveReason(
CbsP_Man_t *
p,
int Level )
648 Vec_PtrClear(
p->vTemp );
649 for ( i = k = pQue->
iHead + 1; i < pQue->iTail; i++ )
651 pObj = pQue->
pData[i];
656 Vec_PtrPush(
p->vTemp, pObj );
658 iLitLevel = CbsP_VarDecLevel(
p, pObj );
659 if ( iLitLevel < Level )
661 pQue->
pData[k++] = pObj;
664 assert( iLitLevel == Level );
665 pReason = CbsP_VarReason0(
p, pObj );
666 if ( pReason == pObj )
672 CbsP_QuePush( pQue, pReason );
673 pReason = CbsP_VarReason1(
p, pObj );
674 if ( pReason != pObj )
675 CbsP_QuePush( pQue, pReason );
698 assert( CbsP_VarIsAssigned(pVar) );
699 assert( CbsP_VarIsAssigned(pFan0) );
700 assert( pFan1 == NULL || CbsP_VarIsAssigned(pFan1) );
701 assert( CbsP_QueIsEmpty( pQue ) );
702 CbsP_QuePush( pQue, NULL );
703 CbsP_QuePush( pQue, pVar );
704 CbsP_QuePush( pQue, pFan0 );
706 CbsP_QuePush( pQue, pFan1 );
707 CbsP_ManDeriveReason(
p, Level );
708 return CbsP_QueFinish( pQue );
723static inline int CbsP_ManResolve(
CbsP_Man_t *
p,
int Level,
int hClause0,
int hClause1 )
727 int i, LevelMax = -1, LevelCur;
736 assert( CbsP_QueIsEmpty( pQue ) );
737 CbsP_QuePush( pQue, NULL );
738 for ( i = hClause0 + 1; (pObj = pQue->
pData[i]); i++ )
744 CbsP_QuePush( pQue, pObj );
745 p->Pars.nRscanThis ++ ;
746 LevelCur = CbsP_VarDecLevel(
p, pObj );
747 if ( LevelMax < LevelCur )
750 for ( i = hClause1 + 1; (pObj = pQue->
pData[i]); i++ )
756 CbsP_QuePush( pQue, pObj );
757 p->Pars.nRscanThis ++ ;
758 LevelCur = CbsP_VarDecLevel(
p, pObj );
759 if ( LevelMax < LevelCur )
762 for ( i = pQue->
iHead + 1; i < pQue->iTail; i++ )
764 CbsP_ManDeriveReason(
p, LevelMax );
765 return CbsP_QueFinish( pQue );
782 assert( !Gia_IsComplement(pVar) );
783 assert( CbsP_VarIsAssigned(pVar) );
784 if ( Gia_ObjIsCi(pVar) )
786 assert( Gia_ObjIsAnd(pVar) );
787 Value0 = CbsP_VarFanin0Value(pVar);
788 Value1 = CbsP_VarFanin1Value(pVar);
789 if ( CbsP_VarValue(pVar) )
791 if ( Value0 == 0 || Value1 == 0 )
793 if ( Value0 == 0 && Value1 != 0 )
794 return CbsP_ManAnalyze(
p, Level, pVar, Gia_ObjFanin0(pVar), NULL );
795 if ( Value0 != 0 && Value1 == 0 )
796 return CbsP_ManAnalyze(
p, Level, pVar, Gia_ObjFanin1(pVar), NULL );
797 assert( Value0 == 0 && Value1 == 0 );
798 return CbsP_ManAnalyze(
p, Level, pVar, Gia_ObjFanin0(pVar), Gia_ObjFanin1(pVar) );
801 CbsP_ManAssign(
p, Gia_ObjChild0(pVar), Level, pVar, NULL );
803 CbsP_ManAssign(
p, Gia_ObjChild1(pVar), Level, pVar, NULL );
807 if ( Value0 == 0 || Value1 == 0 )
809 if ( Value0 == 1 && Value1 == 1 )
810 return CbsP_ManAnalyze(
p, Level, pVar, Gia_ObjFanin0(pVar), Gia_ObjFanin1(pVar) );
811 if ( Value0 == 1 || Value1 == 1 )
814 CbsP_ManAssign(
p, Gia_Not(Gia_ObjChild0(pVar)), Level, pVar, Gia_ObjFanin1(pVar) );
816 CbsP_ManAssign(
p, Gia_Not(Gia_ObjChild1(pVar)), Level, pVar, Gia_ObjFanin0(pVar) );
819 assert( CbsP_VarIsJust(pVar) );
820 assert( !CbsP_QueHasNode( &
p->pJust, pVar ) );
821 CbsP_QuePush( &
p->pJust, pVar );
839 assert( !Gia_IsComplement(pVar) );
840 assert( Gia_ObjIsAnd(pVar) );
841 assert( CbsP_VarIsAssigned(pVar) );
842 assert( !CbsP_VarValue(pVar) );
843 Value0 = CbsP_VarFanin0Value(pVar);
844 Value1 = CbsP_VarFanin1Value(pVar);
846 if ( Value0 == 0 || Value1 == 0 )
848 if ( Value0 == 1 && Value1 == 1 )
849 return CbsP_ManAnalyze(
p, Level, pVar, Gia_ObjFanin0(pVar), Gia_ObjFanin1(pVar) );
850 assert( Value0 == 1 || Value1 == 1 );
852 CbsP_ManAssign(
p, Gia_Not(Gia_ObjChild0(pVar)), Level, pVar, Gia_ObjFanin1(pVar) );
854 CbsP_ManAssign(
p, Gia_Not(Gia_ObjChild1(pVar)), Level, pVar, Gia_ObjFanin0(pVar) );
878 if ( (hClause = CbsP_ManPropagateOne(
p, pVar, Level )) )
880 if( CbsP_ManCheckPropLimits(
p) )
883 p->pProp.iHead =
p->pProp.iTail;
887 if ( CbsP_VarIsJust( pVar ) )
888 p->pJust.pData[k++] = pVar;
889 else if ( (hClause = CbsP_ManPropagateTwo(
p, pVar, Level )) )
891 if( CbsP_ManCheckPropLimits(
p) )
894 if ( k ==
p->pJust.iTail )
916 int hClause, hLearn0, hLearn1;
917 int iPropHead, iJustHead, iJustTail;
919 assert( !CbsP_QueIsEmpty(&
p->pProp) );
924 if ( CbsP_ManCheckLimits(
p ) )
927 assert( CbsP_QueIsEmpty(&
p->pProp) );
928 if ( CbsP_QueIsEmpty(&
p->pJust) )
930 p->Pars.nJustThis = Abc_MaxInt(
p->Pars.nJustThis,
p->pJust.iTail -
p->pJust.iHead );
932 iPropHead =
p->pProp.iHead;
933 CbsP_QueStore( &
p->pJust, &iJustHead, &iJustTail );
934 p->Pars.nJscanThis += iJustTail - iJustHead;
935 if ( CbsP_ManCheckLimits(
p ) )
938 if (
p->Pars.fUseHighest )
939 pVar = CbsP_ManDecideHighest(
p );
940 else if (
p->Pars.fUseLowest )
941 pVar = CbsP_ManDecideLowest(
p );
942 else if (
p->Pars.fUseMaxFF )
943 pVar = CbsP_ManDecideMaxFF(
p );
945 assert( CbsP_VarIsJust( pVar ) );
948 if ( Gia_ObjRefNum(
p->pAig, Gia_ObjFanin0(pVar)) > Gia_ObjRefNum(
p->pAig, Gia_ObjFanin1(pVar)) )
949 pDecVar = Gia_Not(Gia_ObjChild0(pVar));
951 pDecVar = Gia_Not(Gia_ObjChild1(pVar));
956 CbsP_ManAssign(
p, pDecVar, Level+1, NULL, NULL );
959 if ( CbsP_ManCheckLimits(
p ) )
961 if ( pQue->
pData[hLearn0] != Gia_Regular(pDecVar) )
963 CbsP_ManCancelUntil(
p, iPropHead );
964 CbsP_QueRestore( &
p->pJust, iJustHead, iJustTail );
966 CbsP_ManAssign(
p, Gia_Not(pDecVar), Level+1, NULL, NULL );
969 if ( CbsP_ManCheckLimits(
p ) )
971 if ( pQue->
pData[hLearn1] != Gia_Regular(pDecVar) )
973 hClause = CbsP_ManResolve(
p, Level, hLearn0, hLearn1 );
998 assert( !
p->pProp.iHead && !
p->pProp.iTail );
999 assert( !
p->pJust.iHead && !
p->pJust.iTail );
1000 assert(
p->pClauses.iHead == 1 &&
p->pClauses.iTail == 1 );
1001 p->Pars.nBTThis =
p->Pars.nJustThis =
p->Pars.nBTThisNc = 0;
1002 CbsP_ManAssign(
p, pObj, 0, NULL, NULL );
1004 CbsP_ManSaveModel(
p,
p->vModel );
1007 CbsP_ManCancelUntil(
p, 0 );
1008 p->pJust.iHead =
p->pJust.iTail = 0;
1009 p->pClauses.iHead =
p->pClauses.iTail = 1;
1010 p->Pars.nBTTotal +=
p->Pars.nBTThis;
1011 p->Pars.nJustTotal = Abc_MaxInt(
p->Pars.nJustTotal,
p->Pars.nJustThis );
1012 if ( CbsP_ManCheckLimits(
p ) )
1022 assert( !
p->pProp.iHead && !
p->pProp.iTail );
1023 assert( !
p->pJust.iHead && !
p->pJust.iTail );
1024 assert(
p->pClauses.iHead == 1 &&
p->pClauses.iTail == 1 );
1025 p->Pars.nBTThis =
p->Pars.nJustThis =
p->Pars.nBTThisNc = 0;
1026 p->Pars.nJscanThis =
p->Pars.nRscanThis =
p->Pars.nPropThis = 0;
1027 CbsP_ManAssign(
p, pObj, 0, NULL, NULL );
1029 CbsP_ManAssign(
p, pObj2, 0, NULL, NULL );
1031 CbsP_ManSaveModel(
p,
p->vModel );
1034 CbsP_ManCancelUntil(
p, 0 );
1036 p->pJust.iHead =
p->pJust.iTail = 0;
1037 p->pClauses.iHead =
p->pClauses.iTail = 1;
1038 p->Pars.nBTTotal +=
p->Pars.nBTThis;
1039 p->Pars.nJustTotal = Abc_MaxInt(
p->Pars.nJustTotal,
p->Pars.nJustThis );
1040 if ( CbsP_ManCheckLimits(
p ) )
1045 p->timeSatSat += Abc_Clock() - clk;
1046 p->nConfSat +=
p->Pars.nBTThis;
1050 p->timeSatUnsat += Abc_Clock() - clk;
1051 p->nConfUnsat +=
p->Pars.nBTThis;
1054 p->timeSatUndec += Abc_Clock() - clk;
1055 p->nConfUndec +=
p->Pars.nBTThis;
1058 CbsP_UpdateRecord(&
p->Pars,RetValue);
1075 printf(
"CO = %8d ", Gia_ManCoNum(
p->pAig) );
1076 printf(
"AND = %8d ", Gia_ManAndNum(
p->pAig) );
1077 printf(
"Conf = %6d ",
p->Pars.nBTLimit );
1078 printf(
"JustMax = %5d ",
p->Pars.nJustLimit );
1080 printf(
"Unsat calls %6d (%6.2f %%) Ave conf = %8.1f ",
1081 p->nSatUnsat,
p->nSatTotal? 100.0*
p->nSatUnsat/
p->nSatTotal :0.0,
p->nSatUnsat? 1.0*
p->nConfUnsat/
p->nSatUnsat :0.0 );
1082 ABC_PRTP(
"Time",
p->timeSatUnsat,
p->timeTotal );
1083 printf(
"Sat calls %6d (%6.2f %%) Ave conf = %8.1f ",
1084 p->nSatSat,
p->nSatTotal? 100.0*
p->nSatSat/
p->nSatTotal :0.0,
p->nSatSat? 1.0*
p->nConfSat/
p->nSatSat : 0.0 );
1085 ABC_PRTP(
"Time",
p->timeSatSat,
p->timeTotal );
1086 printf(
"Undef calls %6d (%6.2f %%) Ave conf = %8.1f ",
1087 p->nSatUndec,
p->nSatTotal? 100.0*
p->nSatUndec/
p->nSatTotal :0.0,
p->nSatUndec? 1.0*
p->nConfUndec/
p->nSatUndec : 0.0 );
1088 ABC_PRTP(
"Time",
p->timeSatUndec,
p->timeTotal );
1089 ABC_PRT(
"Total time",
p->timeTotal );
1108 Vec_Int_t * vCex, * vVisit, * vCexStore;
1112 abctime clk, clkTotal = Abc_Clock();
1113 assert( Gia_ManRegNum(pAig) == 0 );
1123 p->Pars.nBTLimit = nConfs;
1125 vStatus = Vec_StrAlloc( Gia_ManPoNum(pAig) );
1126 vCexStore = Vec_IntAlloc( 10000 );
1127 vVisit = Vec_IntAlloc( 100 );
1134 Vec_IntClear( vCex );
1135 if ( Gia_ObjIsConst0(Gia_ObjFanin0(pRoot)) )
1137 if ( Gia_ObjFaninC0(pRoot) )
1141 Vec_StrPush( vStatus, 0 );
1146 Vec_StrPush( vStatus, 1 );
1151 p->Pars.fUseHighest = 1;
1152 p->Pars.fUseLowest = 0;
1163 Vec_StrPush( vStatus, (
char)status );
1167 p->nConfUndec +=
p->Pars.nBTThis;
1169 p->timeSatUndec += Abc_Clock() - clk;
1175 Gia_ManPatchCoDriver( pAig, i, 0 );
1177 p->nConfUnsat +=
p->Pars.nBTThis;
1178 p->timeSatUnsat += Abc_Clock() - clk;
1182 p->nConfSat +=
p->Pars.nBTThis;
1185 p->timeSatSat += Abc_Clock() - clk;
1187 Vec_IntFree( vVisit );
1188 p->nSatTotal = Gia_ManPoNum(pAig);
1189 p->timeTotal = Abc_Clock() - clkTotal;
1194 *pvStatus = vStatus;
#define ABC_ALLOC(type, num)
#define ABC_PRTP(a, t, T)
#define ABC_REALLOC(type, obj, num)
#define ABC_CALLOC(type, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
struct Vec_Str_t_ Vec_Str_t
void Cec_ManSatAddToStore(Vec_Int_t *vCexStore, Vec_Int_t *vCex, int Out)
int CbsP_ManSolve_rec(CbsP_Man_t *p, int Level)
CbsP_Man_t * CbsP_ManAlloc(Gia_Man_t *pGia)
void CbsP_PrintRecord(CbsP_Par_t *pPars)
void CbsP_ManStop(CbsP_Man_t *p)
void CbsP_SetDefaultParams(CbsP_Par_t *pPars)
FUNCTION DEFINITIONS ///.
void CbsP_ManSatPrintStats(CbsP_Man_t *p)
#define CbsP_QueForEachEntry(Que, pObj, i)
Vec_Int_t * CbsP_ReadModel(CbsP_Man_t *p)
int CbsP_ManPropagate(CbsP_Man_t *p, int Level)
int CbsP_ManSolve(CbsP_Man_t *p, Gia_Obj_t *pObj)
void CbsP_ManSetConflictNum(CbsP_Man_t *p, int Num)
int CbsP_ManSolve2(CbsP_Man_t *p, Gia_Obj_t *pObj, Gia_Obj_t *pObj2)
Vec_Int_t * CbsP_ManSolveMiterNc(Gia_Man_t *pAig, int nConfs, Vec_Str_t **pvStatus, int f0Proved, int fVerbose)
struct CbsP_Man_t_ CbsP_Man_t
struct CbsP_Que_t_ CbsP_Que_t
typedefABC_NAMESPACE_HEADER_START struct CbsP_Par_t_ CbsP_Par_t
INCLUDES ///.
void Gia_ManCollectTest(Gia_Man_t *p)
struct Gia_Obj_t_ Gia_Obj_t
void Gia_ManFillValue(Gia_Man_t *p)
struct Gia_Man_t_ Gia_Man_t
void Gia_ManCleanMark0(Gia_Man_t *p)
void Gia_ManCreateRefs(Gia_Man_t *p)
#define Gia_ManForEachCo(p, pObj, i)
void Gia_ManSetPhase(Gia_Man_t *p)
void Gia_ManCleanMark1(Gia_Man_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.