105static int Gla_ManCheckVar(
Gla_Man_t *
p,
int iObj,
int iFrame );
106static int Gla_ManGetVar(
Gla_Man_t *
p,
int iObj,
int iFrame );
109static inline int Gla_ObjId(
Gla_Man_t *
p,
Gla_Obj_t * pObj ) {
assert( pObj >
p->pObjs && pObj < p->pObjs +
p->nObjs );
return pObj -
p->pObjs; }
110static inline Gla_Obj_t * Gla_ManObj(
Gla_Man_t *
p,
int i ) {
assert( i >= 0 && i < p->nObjs );
return i ?
p->pObjs + i : NULL; }
112static inline int Gla_ObjSatValue(
Gla_Man_t *
p,
int iGia,
int f ) {
return Gla_ManCheckVar(
p,
p->pObj2Obj[iGia], f) ? sat_solver2_var_value(
p->pSat, Gla_ManGetVar(
p,
p->pObj2Obj[iGia], f) ) : 0; }
115static inline void Gla_ObjClearRef(
Rfn_Obj_t *
p ) { *((
int *)
p) = 0; }
119#define Gla_ManForEachObj( p, pObj ) \
120 for ( pObj = p->pObjs + 1; pObj < p->pObjs + p->nObjs; pObj++ )
121#define Gla_ManForEachObjAbs( p, pObj, i ) \
122 for ( i = 0; i < Vec_IntSize(p->vAbs) && ((pObj = Gla_ManObj(p, Vec_IntEntry(p->vAbs, i))),1); i++)
123#define Gla_ManForEachObjAbsVec( vVec, p, pObj, i ) \
124 for ( i = 0; i < Vec_IntSize(vVec) && ((pObj = Gla_ManObj(p, Vec_IntEntry(vVec, i))),1); i++)
127#define Gla_ObjForEachFanin( p, pObj, pFanin, i ) \
128 for ( i = 0; (i < (int)pObj->nFanins) && ((pFanin = Gla_ManObj(p, pObj->Fanins[i])),1); i++ )
157 vMap = Vec_IntAlloc( 1000 );
163 Vec_IntPush( vMap, pFanin->
iGiaObj );
165 Vec_IntUniqify( vMap );
167 pCex =
Abc_CexAlloc( 0, Vec_IntSize(vMap),
p->pPars->iFrame+1 );
168 pCex->iFrame =
p->pPars->iFrame;
169 for ( f = 0; f <=
p->pPars->iFrame; f++ )
171 if ( Gla_ObjSatValue(
p, Gia_ObjId(
p->pGia, pGiaObj), f ) )
172 Abc_InfoSetBit( pCex->pData, f * Vec_IntSize(vMap) + k );
193 pCex =
Abc_CexAlloc( Gia_ManRegNum(
p->pGia), Gia_ManPiNum(
p->pGia),
p->pPars->iFrame+1 );
195 pCex->iFrame =
p->pPars->iFrame;
198 if ( !Gia_ObjIsPi(
p->pGia, pObj) )
200 assert( Gia_ObjIsPi(
p->pGia, pObj) );
201 for ( f = 0; f <= pCex->iFrame; f++ )
202 if ( Gla_ObjSatValue(
p, Gia_ObjId(
p->pGia, pObj), f ) )
203 Abc_InfoSetBit( pCex->pData, pCex->nRegs + f * pCex->nPis + Gia_ObjCioId(pObj) );
221 if ( Gia_ObjIsTravIdCurrent(
p, pGiaObj) )
223 Gia_ObjSetTravIdCurrent(
p, pGiaObj);
224 assert( Gia_ObjIsAnd(pGiaObj) );
227 Vec_IntPush( vRoAnds, Gia_ObjId(
p, pGiaObj) );
236 Vec_IntPush( vCos, Gia_ObjId(
p->pGia, Gia_ManPo(
p->pGia, 0)) );
243 pGiaObj = Gia_ObjRoToRi(
p->pGia, Gia_ManObj(
p->pGia, pObj->
iGiaObj) );
244 Vec_IntPush( vCos, Gia_ObjId(
p->pGia, pGiaObj) );
248 Vec_IntPush( (pFanin->
fPi ? vPis : vPPis), pFanin->
iGiaObj );
250 Vec_IntUniqify( vPis );
251 Vec_IntUniqify( vPPis );
252 Vec_IntSort( vCos, 0 );
257 Gia_ObjSetTravIdCurrent(
p->pGia, Gia_ManConst0(
p->pGia) );
259 Gia_ObjSetTravIdCurrent(
p->pGia, pGiaObj );
261 Gia_ObjSetTravIdCurrent(
p->pGia, pGiaObj );
265 if ( i == 0 )
continue;
266 pGiaObj = Gia_ObjRiToRo(
p->pGia, pGiaObj );
267 Gia_ObjSetTravIdCurrent(
p->pGia, pGiaObj );
268 Vec_IntPush( vRoAnds, Gia_ObjId(
p->pGia, pGiaObj) );
289 Rfn_Obj_t * pRef0, * pRef1, * pRef = Gla_ObjRef(
p, pObj, f );
292 if ( (
int)pRef->Sign != Sign )
294 assert( pRef->fVisit == 0 );
298 assert( (
int)pRef->Prio > 0 );
299 for ( i =
p->pPars->iFrame; i >= 0; i-- )
300 if ( !Gla_ObjRef(
p, pObj, i)->fVisit )
302 Vec_IntPush( vSelect, Gia_ObjId(
p->pGia, pObj) );
305 if ( (Gia_ObjIsCo(pObj) && f ==
p->pPars->iFrame) || Gia_ObjIsPo(
p->pGia, pObj) )
307 if ( Gia_ObjIsRi(
p->pGia, pObj) )
309 pFanout = Gia_ObjRiToRo(
p->pGia, pObj);
310 if ( !Gla_ObjRef(
p, pFanout, f+1)->fVisit )
314 assert( Gia_ObjIsRo(
p->pGia, pObj) || Gia_ObjIsAnd(pObj) );
318 if ( Gla_ObjRef(
p, pFanout, f)->fVisit )
320 if ( Gia_ObjIsCo(pFanout) )
325 assert( Gia_ObjIsAnd(pFanout) );
326 pRef0 = Gla_ObjRef(
p, Gia_ObjFanin0(pFanout), f );
327 pRef1 = Gla_ObjRef(
p, Gia_ObjFanin1(pFanout), f );
328 if ( ((pRef0->Value ^ Gia_ObjFaninC0(pFanout)) == 0 && pRef0->fVisit) ||
329 ((pRef1->Value ^ Gia_ObjFaninC1(pFanout)) == 0 && pRef1->fVisit) ||
330 ( ((pRef0->Value ^ Gia_ObjFaninC0(pFanout)) == 1 && pRef0->fVisit) &&
331 ((pRef1->Value ^ Gia_ObjFaninC1(pFanout)) == 1 && pRef1->fVisit) ) )
354 if (
p->pPars->fPropFanout )
360 assert( (
int)pRef->Prio > 0 );
361 if (
p->pPars->fPropFanout )
363 for ( i =
p->pPars->iFrame; i >= 0; i-- )
364 if ( !Gla_ObjRef(
p, pObj, i)->fVisit )
369 Vec_IntPush( vSelect, Gia_ObjId(
p->pGia, pObj) );
370 Vec_IntAddToEntry(
p->vObjCounts, f, 1 );
374 if ( Gia_ObjIsPi(
p->pGia, pObj) || Gia_ObjIsConst0(pObj) )
376 if ( Gia_ObjIsRo(
p->pGia, pObj) )
382 if ( Gia_ObjIsAnd(pObj) )
384 Rfn_Obj_t * pRef0 = Gla_ObjRef(
p, Gia_ObjFanin0(pObj), f );
385 Rfn_Obj_t * pRef1 = Gla_ObjRef(
p, Gia_ObjFanin1(pObj), f );
386 if ( pRef->Value == 1 )
388 if ( pRef0->Prio > 0 )
390 if ( pRef1->Prio > 0 )
395 if ( (pRef0->Value ^ Gia_ObjFaninC0(pObj)) == 0 && (pRef1->Value ^ Gia_ObjFaninC1(pObj)) == 0 )
397 if ( pRef0->Prio <= pRef1->Prio )
399 if ( pRef0->Prio > 0 )
404 if ( pRef1->Prio > 0 )
408 else if ( (pRef0->Value ^ Gia_ObjFaninC0(pObj)) == 0 )
410 if ( pRef0->Prio > 0 )
413 else if ( (pRef1->Value ^ Gia_ObjFaninC1(pObj)) == 0 )
415 if ( pRef1->Prio > 0 )
442 for ( f = 0; f <=
p->pPars->iFrame; f++ )
444 Gia_ObjTerSimSet0( Gia_ManConst0(
p->pGia) );
447 if ( Gla_ObjSatValue(
p, Gia_ObjId(
p->pGia, pObj), f ) )
448 Gia_ObjTerSimSet1( pObj );
450 Gia_ObjTerSimSet0( pObj );
453 Gia_ObjTerSimSetX( pObj );
455 if ( Gla_ObjSatValue(
p, Gia_ObjId(
p->pGia, pObj), f ) )
456 Gia_ObjTerSimSet1( pObj );
458 Gia_ObjTerSimSet0( pObj );
462 if ( Gia_ObjIsAnd(pObj) )
463 Gia_ObjTerSimAnd( pObj );
465 Gia_ObjTerSimSet0( pObj );
467 Gia_ObjTerSimRo(
p->pGia, pObj );
470 Gia_ObjTerSimCo( pObj );
472 pObj = Gia_ManPo(
p->pGia, 0 );
473 if ( !Gia_ObjTerSimGet1(pObj) )
474 Abc_Print( 1,
"\nRefinement verification has failed!!!\n" );
476 Gia_ObjTerSimSetC( Gia_ManConst0(
p->pGia) );
478 Gia_ObjTerSimSetC( pObj );
480 Gia_ObjTerSimSetC( pObj );
482 Gia_ObjTerSimSetC( pObj );
484 Gia_ObjTerSimSetC( pObj );
506 vVec =
Rnm_ManRefine(
p->pRnm, pCex, vMap,
p->pPars->fPropFanout,
p->pPars->fNewRefine, 1 );
508 if ( Vec_IntSize(vVec) == 0 )
519 Vec_IntWriteEntry( vVec, i,
p->pObj2Obj[Gia_ObjId(
p->pGia, pObj)] );
520 p->nObjAdded += Vec_IntSize(vVec);
539 Vec_Int_t * vPis, * vPPis, * vCos, * vRoAnds, * vSelect = NULL;
546 vCos = Vec_IntAlloc( 1000 );
547 vPis = Vec_IntAlloc( 1000 );
548 vPPis = Vec_IntAlloc( 1000 );
549 vRoAnds = Vec_IntAlloc( 1000 );
572 for ( f = 0; f <=
p->pPars->iFrame; f++ )
575 pRef = Gla_ObjRef(
p, Gia_ManConst0(
p->pGia), f ); Gla_ObjClearRef( pRef );
583 pRef = Gla_ObjRef(
p, pObj, f ); Gla_ObjClearRef( pRef );
584 pRef->Value = Gla_ObjSatValue(
p, Gia_ObjId(
p->pGia, pObj), f );
587 assert( pRef->fVisit == 0 );
593 assert( Gia_ObjIsAnd(pObj) || Gia_ObjIsRo(
p->pGia, pObj) );
594 pRef = Gla_ObjRef(
p, pObj, f ); Gla_ObjClearRef( pRef );
595 pRef->Value = Gla_ObjSatValue(
p, Gia_ObjId(
p->pGia, pObj), f );
599 assert( pRef->fVisit == 0 );
604 assert( Gia_ObjIsAnd(pObj) || Gia_ObjIsRo(
p->pGia, pObj) );
605 pRef = Gla_ObjRef(
p, pObj, f ); Gla_ObjClearRef( pRef );
606 if ( Gia_ObjIsRo(
p->pGia, pObj) )
616 pRef0 = Gla_ObjRef(
p, Gia_ObjRoToRi(
p->pGia, pObj), f-1 );
617 pRef->Value = pRef0->Value;
618 pRef->Prio = pRef0->Prio;
623 assert( Gia_ObjIsAnd(pObj) );
624 pRef0 = Gla_ObjRef(
p, Gia_ObjFanin0(pObj), f );
625 pRef1 = Gla_ObjRef(
p, Gia_ObjFanin1(pObj), f );
626 pRef->Value = (pRef0->Value ^ Gia_ObjFaninC0(pObj)) & (pRef1->Value ^ Gia_ObjFaninC1(pObj));
628 if (
p->pObj2Obj[Gia_ObjId(
p->pGia, pObj)] != ~0 &&
629 Gla_ManCheckVar(
p,
p->pObj2Obj[Gia_ObjId(
p->pGia, pObj)], f) &&
630 (
int)pRef->Value != Gla_ObjSatValue(
p, Gia_ObjId(
p->pGia, pObj), f) )
632 Abc_Print( 1,
"Object has value mismatch " );
636 if ( pRef->Value == 1 )
637 pRef->Prio = Abc_MaxInt( pRef0->Prio, pRef1->Prio );
638 else if ( (pRef0->Value ^ Gia_ObjFaninC0(pObj)) == 0 && (pRef1->Value ^ Gia_ObjFaninC1(pObj)) == 0 )
639 pRef->Prio = Abc_MinInt( pRef0->Prio, pRef1->Prio );
640 else if ( (pRef0->Value ^ Gia_ObjFaninC0(pObj)) == 0 )
641 pRef->Prio = pRef0->Prio;
643 pRef->Prio = pRef1->Prio;
644 assert( pRef->fVisit == 0 );
650 pRef = Gla_ObjRef(
p, pObj, f ); Gla_ObjClearRef( pRef );
651 pRef0 = Gla_ObjRef(
p, Gia_ObjFanin0(pObj), f );
652 pRef->Value = (pRef0->Value ^ Gia_ObjFaninC0(pObj));
653 pRef->Prio = pRef0->Prio;
654 assert( pRef->fVisit == 0 );
660 pObj = Gia_ManPo(
p->pGia, 0 );
661 pRef = Gla_ObjRef(
p, pObj,
p->pPars->iFrame );
662 if ( pRef->Value != 1 )
663 Abc_Print( 1,
"\nCounter-example verification has failed!!!\n" );
666 if ( pRef->Prio == 0 )
670 Vec_IntFree( vPPis );
671 Vec_IntFree( vRoAnds );
677 vSelect = Vec_IntAlloc( 100 );
678 Vec_IntFill(
p->vObjCounts,
p->pPars->iFrame+1, 0 );
680 Vec_IntUniqify( vSelect );
692 Vec_IntWriteEntry( vSelect, i,
p->pObj2Obj[Gia_ObjId(
p->pGia, pObj)] );
695 Vec_IntFree( vPPis );
696 Vec_IntFree( vRoAnds );
699 p->nObjAdded += Vec_IntSize(vSelect);
717 int i, nClauses, iFirstClause, * pLit;
718 nClauses =
p->pCnf->pObj2Count[pGla->
iGiaObj];
719 iFirstClause =
p->pCnf->pObj2Clause[pGla->
iGiaObj];
720 Vec_IntClear( vFanins );
721 for ( i = iFirstClause; i < iFirstClause + nClauses; i++ )
722 for ( pLit =
p->pCnf->pClauses[i]; pLit < p->pCnf->pClauses[i+1]; pLit++ )
723 if ( lit_var(*pLit) != iObj )
724 Vec_IntPushUnique( vFanins, lit_var(*pLit) );
725 assert( Vec_IntSize( vFanins ) <= 4 );
726 Vec_IntSort( vFanins, 0 );
743 if ( Gia_ObjIsTravIdCurrent(
p, pObj) )
745 Gia_ObjSetTravIdCurrent(
p, pObj);
746 assert( Gia_ObjIsAnd(pObj) );
749 pObj->
Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
756 int i, k, * pMapping, * pObj2Obj;
759 pNew->
pName = Abc_UtilStrsav(
p->pName );
760 pNew->
pSpec = Abc_UtilStrsav(
p->pSpec );
766 pNew->
vLutConfigs = Vec_IntAlloc( Gia_ManObjNum(
p) * 4 / 3 );
770 if ( Gia_ObjIsAnd(pObj) )
772 int Offset = Vec_IntEntry(vMapping, Gia_ObjId(
p, pObj));
775 pMapping = Vec_IntEntryP( vMapping, Offset );
777 for ( k = 1; k <= 4; k++ )
779 if ( pMapping[k] == -1 )
781 pFanin = Gia_ManObj(
p, pMapping[k]);
782 Gia_ObjSetTravIdCurrent(
p, pFanin );
783 pFanin->
Value = pObj2Obj[pMapping[k]];
786 assert( !Gia_ObjIsTravIdCurrent(
p, pObj) );
789 pObj2Obj[i] = pObj->
Value;
792 else if ( Gia_ObjIsCi(pObj) )
794 pObj2Obj[i] = Gia_ManAppendCi( pNew );
797 else if ( Gia_ObjIsCo(pObj) )
799 Gia_ObjFanin0(pObj)->Value = pObj2Obj[Gia_ObjFaninId0p(
p, pObj)];
800 assert( ~Gia_ObjFanin0(pObj)->Value );
801 pObj2Obj[i] = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
809 pObj->
Value = pObj2Obj[i];
832 int i, k, Offset, * pMapping, * pLits, * pObj2Count, * pObj2Clause;
838 p->vAbs = Vec_IntAlloc( 100 );
839 p->vTemp = Vec_IntAlloc( 100 );
840 p->vAddedNew = Vec_IntAlloc( 100 );
841 p->vObjCounts = Vec_IntAlloc( 100 );
849 if ( pPars->fPropFanout )
854 p->pGia->vGateClasses = Vec_IntStart( Gia_ManObjNum(
p->pGia) );
855 p->vCoreCounts = Vec_IntStart( Gia_ManObjNum(
p->pGia) );
856 p->vProofIds = Vec_IntAlloc(0);
859 vMappingNew = Vec_IntStart( Gia_ManObjNum(
p->pGia) );
860 pObj2Count =
ABC_FALLOC(
int, Gia_ManObjNum(
p->pGia) );
861 pObj2Clause =
ABC_FALLOC(
int, Gia_ManObjNum(
p->pGia) );
872 pObj2Count[pObj->
Value] =
p->pCnf->pObj2Count[i];
873 pObj2Clause[pObj->
Value] =
p->pCnf->pObj2Clause[i];
875 Vec_IntWriteEntry(
p->pGia->vGateClasses, pObj->
Value, 1 );
877 Offset = Vec_IntEntry(
p->pCnf->vMapping, i);
878 Vec_IntWriteEntry( vMappingNew, pObj->
Value, Vec_IntSize(vMappingNew) );
879 pMapping = Vec_IntEntryP(
p->pCnf->vMapping, Offset);
880 Vec_IntPush( vMappingNew, pMapping[0] );
881 for ( k = 1; k <= 4; k++ )
883 if ( pMapping[k] == -1 )
884 Vec_IntPush( vMappingNew, -1 );
887 assert( ~Gia_ManObj(pGia0, pMapping[k])->Value );
888 Vec_IntPush( vMappingNew, Gia_ManObj(pGia0, pMapping[k])->Value );
893 Vec_IntFree(
p->pCnf->vMapping );
p->pCnf->vMapping = vMappingNew;
894 ABC_FREE(
p->pCnf->pObj2Count );
p->pCnf->pObj2Count = pObj2Count;
895 ABC_FREE(
p->pCnf->pObj2Clause );
p->pCnf->pObj2Clause = pObj2Clause;
901 if (
p->pCnf->pObj2Count[i] >= 0 )
907 pLits =
p->pCnf->pClauses[0];
908 for ( i = 0; i <
p->pCnf->nLiterals; i++ )
911 pObj = Gia_ManObj( pGia0, lit_var(pLits[i]) );
914 pObj = Gia_ManObj(
p->pGia, pObj->
Value );
917 pLits[i] = toLitCond( pObj->
Value, lit_sign(pLits[i]) );
922 p->pObj2Obj =
ABC_FALLOC(
unsigned, Gia_ManObjNum(
p->pGia) );
926 p->pObj2Obj[i] = pObj->
Value;
929 pGla = Gla_ManObj(
p, pObj->
Value );
931 pGla->
fCompl0 = Gia_ObjFaninC0(pObj);
932 pGla->
fConst = Gia_ObjIsConst0(pObj);
933 pGla->
fPi = Gia_ObjIsPi(
p->pGia, pObj);
934 pGla->
fPo = Gia_ObjIsPo(
p->pGia, pObj);
935 pGla->
fRi = Gia_ObjIsRi(
p->pGia, pObj);
936 pGla->
fRo = Gia_ObjIsRo(
p->pGia, pObj);
937 pGla->
fAnd = Gia_ObjIsAnd(pObj);
938 if ( Gia_ObjIsConst0(pObj) || Gia_ObjIsPi(
p->pGia, pObj) )
940 if ( Gia_ObjIsCo(pObj) )
943 pGla->
Fanins[0] = Gia_ObjFanin0(pObj)->Value;
946 if ( Gia_ObjIsAnd(pObj) )
951 Offset = Vec_IntEntry(
p->pCnf->vMapping, i );
952 pMapping = Vec_IntEntryP(
p->pCnf->vMapping, Offset );
954 for ( k = 1; k <= 4; k++ )
955 if ( pMapping[k] != -1 )
956 pGla->
Fanins[ pGla->
nFanins++ ] = Gia_ManObj(
p->pGia, pMapping[k])->Value;
959 assert( Gia_ObjIsRo(
p->pGia, pObj) );
961 pGla->
Fanins[0] = Gia_ObjFanin0( Gia_ObjRoToRi(
p->pGia, pObj) )->Value;
962 pGla->
fCompl0 = Gia_ObjFaninC0( Gia_ObjRoToRi(
p->pGia, pObj) );
964 p->pObjRoot = Gla_ManObj(
p, Gia_ManPo(
p->pGia, 0)->Value );
966 assert(
p->pGia->vGateClasses != NULL );
969 if ( Vec_IntEntry(
p->pGia->vGateClasses, pGla->
iGiaObj ) == 0 )
972 Vec_IntPush(
p->vAbs, Gla_ObjId(
p, pGla) );
976 if ( pPars->fUseFullProof )
977 p->pSat->pPrf1 = Vec_SetAlloc( 20 );
980 p->pSat->nLearntStart =
p->pPars->nLearnedStart;
981 p->pSat->nLearntDelta =
p->pPars->nLearnedDelta;
982 p->pSat->nLearntRatio =
p->pPars->nLearnedPerce;
983 p->pSat->nLearntMax =
p->pSat->nLearntStart;
1013 p->vAbs = Vec_IntAlloc( 100 );
1014 p->vTemp = Vec_IntAlloc( 100 );
1015 p->vAddedNew = Vec_IntAlloc( 100 );
1023 if (
p->pCnf->pObj2Count[i] >= 0 )
1024 pObj->
Value =
p->nObjs++;
1028 pLits =
p->pCnf->pClauses[0];
1029 for ( i = 0; i <
p->pCnf->nLiterals; i++ )
1031 pObj = Gia_ManObj(
p->pGia, lit_var(pLits[i]) );
1033 pLits[i] = toLitCond( pObj->
Value, lit_sign(pLits[i]) );
1037 p->pObj2Obj =
ABC_FALLOC(
unsigned, Gia_ManObjNum(
p->pGia) );
1041 p->pObj2Obj[i] = pObj->
Value;
1042 if ( !~pObj->
Value )
1044 pGla = Gla_ManObj(
p, pObj->
Value );
1046 pGla->
fCompl0 = Gia_ObjFaninC0(pObj);
1047 pGla->
fConst = Gia_ObjIsConst0(pObj);
1048 pGla->
fPi = Gia_ObjIsPi(
p->pGia, pObj);
1049 pGla->
fPo = Gia_ObjIsPo(
p->pGia, pObj);
1050 pGla->
fRi = Gia_ObjIsRi(
p->pGia, pObj);
1051 pGla->
fRo = Gia_ObjIsRo(
p->pGia, pObj);
1052 pGla->
fAnd = Gia_ObjIsAnd(pObj);
1053 if ( Gia_ObjIsConst0(pObj) || Gia_ObjIsPi(
p->pGia, pObj) )
1055 if ( Gia_ObjIsAnd(pObj) || Gia_ObjIsCo(pObj) )
1058 pGla->
nFanins = Vec_IntSize(
p->vTemp );
1059 memcpy( pGla->
Fanins, Vec_IntArray(
p->vTemp),
sizeof(
int) * Vec_IntSize(
p->vTemp) );
1062 assert( Gia_ObjIsRo(
p->pGia, pObj) );
1064 pGla->
Fanins[0] = Gia_ObjFanin0( Gia_ObjRoToRi(
p->pGia, pObj) )->Value;
1065 pGla->
fCompl0 = Gia_ObjFaninC0( Gia_ObjRoToRi(
p->pGia, pObj) );
1067 p->pObjRoot = Gla_ManObj(
p, Gia_ManPo(
p->pGia, 0)->Value );
1075 Vec_IntPush(
p->vAbs, Gla_ObjId(
p, pGla) );
1099 if (
p->pPars->fVerbose )
1100 Abc_Print( 1,
"SAT solver: Var = %d Cla = %d Conf = %d Lrn = %d Reduce = %d Cex = %d Objs+ = %d\n",
1101 sat_solver2_nvars(
p->pSat), sat_solver2_nclauses(
p->pSat), sat_solver2_nconflicts(
p->pSat),
1102 sat_solver2_nlearnts(
p->pSat),
p->pSat->nDBreduces,
p->nCexes,
p->nObjAdded );
1109 for ( i = 0; i < Gia_ManObjNum(
p->pGia); i++ )
1114 if (
p->pGia0 != NULL )
1118 Vec_IntFreeP( &
p->vObjCounts );
1119 Vec_IntFreeP( &
p->vAddedNew );
1120 Vec_IntFreeP( &
p->vCoreCounts );
1121 Vec_IntFreeP( &
p->vProofIds );
1122 Vec_IntFreeP( &
p->vTemp );
1123 Vec_IntFreeP( &
p->vAbs );
1147 Counter += (pObj->
fRo && pObj->
fAbs);
1150 Counter += (pObj->
fAnd && pObj->
fAbs);
1153 Counter += (pObj->
fAbs);
1172 if ( Gia_ObjIsTravIdCurrent(
p, pObj) )
1174 Gia_ObjSetTravIdCurrent(
p, pObj);
1175 if ( Gia_ObjIsCi(pObj) )
1177 assert( Gia_ObjIsAnd(pObj) );
1180 if ( Value0 || Value1 )
1181 Vec_IntAddToEntry( vGla, Gia_ObjId(
p, pObj), nUsageCount );
1182 return Value0 || Value1;
1189 int i, k, nUsageCount;
1190 vGla = Vec_IntStart( Gia_ManObjNum(
p->pGia) );
1193 nUsageCount = Vec_IntEntry(
p->vCoreCounts, pObj->
iGiaObj);
1194 assert( nUsageCount >= 0 );
1195 if ( nUsageCount == 0 )
1197 pGiaObj = Gla_ManGiaObj(
p, pObj );
1198 if ( Gia_ObjIsConst0(pGiaObj) || Gia_ObjIsRo(
p->pGia, pGiaObj) )
1200 Vec_IntWriteEntry( vGla, pObj->
iGiaObj, nUsageCount );
1203 assert( Gia_ObjIsAnd(pGiaObj) );
1206 Gia_ObjSetTravIdCurrent(
p->pGia, Gla_ManGiaObj(
p, pFanin) );
1209 Vec_IntWriteEntry( vGla, 0,
p->pPars->iFrame+1 );
1210 if (
p->pGia->vLutConfigs )
1212 vGla2 = Vec_IntStart( Gia_ManObjNum(
p->pGia0) );
1213 for ( i = 0; i < Gia_ManObjNum(
p->pGia); i++ )
1214 if ( Vec_IntEntry(vGla, i) )
1215 Vec_IntWriteEntry( vGla2, Vec_IntEntry(
p->pGia->vLutConfigs, i), Vec_IntEntry(vGla, i) );
1216 Vec_IntFree( vGla );
1239 vPPis = Vec_IntAlloc( 1000 );
1241 Vec_IntClear( vPis );
1246 if ( !pFanin->
fPi && !pFanin->
fAbs )
1247 Vec_IntPush( vPPis, pObj->
Fanins[k] );
1248 else if ( vPis && pFanin->
fPi && !pFanin->
fAbs )
1249 Vec_IntPush( vPis, pObj->
Fanins[k] );
1251 Vec_IntUniqify( vPPis );
1252 Vec_IntReverseOrder( vPPis );
1254 Vec_IntUniqify( vPis );
1259 Vec_Int_t * vPPis = Gla_ManCollectPPis(
p, NULL );
1260 int RetValue = Vec_IntSize( vPPis );
1261 Vec_IntFree( vPPis );
1266 static int Round = 0;
1269 if ( (Round++ % 5) == 0 )
1277 Count += pFanin->
fAbs;
1278 if ( Count == 0 || ((Round & 1) && Count == 1) )
1280 Vec_IntWriteEntry( vPPis, j++, Gla_ObjId(
p, pObj) );
1283 Vec_IntShrink( vPPis, j );
1298int Gla_ManCheckVar(
Gla_Man_t *
p,
int iObj,
int iFrame )
1301 int iVar = Vec_IntGetEntry( &pGla->
vFrames, iFrame );
1305int Gla_ManGetVar(
Gla_Man_t *
p,
int iObj,
int iFrame )
1308 int iVar = Vec_IntGetEntry( &pGla->
vFrames, iFrame );
1312 Vec_IntSetEntry( &pGla->
vFrames, iFrame, (iVar =
p->nSatVars++) );
1314 Vec_IntPush(
p->vAddedNew, iObj );
1315 Vec_IntPush(
p->vAddedNew, iFrame );
1322 int iVar, iVar1, iVar2;
1325 iVar = Gla_ManGetVar(
p, iObj, iFrame );
1326 sat_solver2_add_const(
p->pSat, iVar, 1, 0, iObj );
1328 else if ( pGlaObj->
fRo )
1333 iVar = Gla_ManGetVar(
p, iObj, iFrame );
1334 sat_solver2_add_const(
p->pSat, iVar, 1, 0, iObj );
1338 iVar1 = Gla_ManGetVar(
p, iObj, iFrame );
1339 iVar2 = Gla_ManGetVar(
p, pGlaObj->
Fanins[0], iFrame-1 );
1340 sat_solver2_add_buffer(
p->pSat, iVar1, iVar2, pGlaObj->
fCompl0, 0, iObj );
1343 else if ( pGlaObj->
fAnd )
1345 int i, RetValue, nClauses, iFirstClause, * pLit;
1346 nClauses =
p->pCnf->pObj2Count[pGlaObj->
iGiaObj];
1347 iFirstClause =
p->pCnf->pObj2Clause[pGlaObj->
iGiaObj];
1348 for ( i = iFirstClause; i < iFirstClause + nClauses; i++ )
1350 Vec_IntClear( vLits );
1351 for ( pLit =
p->pCnf->pClauses[i]; pLit < p->pCnf->pClauses[i+1]; pLit++ )
1353 iVar = Gla_ManGetVar(
p, lit_var(*pLit), iFrame );
1354 Vec_IntPush( vLits, toLitCond( iVar, lit_sign(*pLit) ) );
1356 RetValue =
sat_solver2_addclause(
p->pSat, Vec_IntArray(vLits), Vec_IntArray(vLits)+Vec_IntSize(vLits), iObj );
1366 Vec_IntAddToEntry(
p->vCoreCounts, pGla->
iGiaObj, 1 );
1377 if (
p->pSat->pPrf2 )
1378 Vec_IntWriteEntry(
p->vProofIds, Gla_ObjId(
p, pGla),
p->nProofIds++ );
1383 Vec_IntPush(
p->vAbs, Gla_ObjId(
p, pGla) );
1385 Vec_IntWriteEntry( vAbsAdd, k++, Gla_ObjId(
p, pGla) );
1387 Vec_IntShrink( vAbsAdd, k );
1400 for ( f = fCur; f >= 0; f-- )
1407 int i, iObj, iFrame;
1410 assert( Vec_IntEntry( &Gla_ManObj(
p, iObj)->vFrames, iFrame ) > 0 );
1411 Vec_IntWriteEntry( &Gla_ManObj(
p, iObj)->vFrames, iFrame, 0 );
1415 assert( Gla_ManObj(
p, iObj )->fAbs == 1 );
1416 Gla_ManObj(
p, iObj )->fAbs = 0;
1418 Vec_IntShrink(
p->vAbs,
p->nAbsOld );
1438 Gla_Obj_t * pFanin = Gla_ManObj(
p,
p->pObjRoot->Fanins[0] );
1439 int iSat = Vec_IntEntry( &pFanin->
vFrames, f );
1441 if ( f == 0 && pFanin->
fRo && !
p->pObjRoot->fCompl0 )
1443 return Abc_Var2Lit( iSat,
p->pObjRoot->fCompl0 );
1457 vCore = Vec_IntAlloc( 1 );
1458 Vec_IntPush( vCore,
p->pObjRoot->Fanins[0] );
1462 RetValue =
sat_solver2_solve( pSat, &iLit, &iLit+1, (ABC_INT64_T)nConfMax, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
1471 if ( RetValue ==
l_True )
1488 Vec_IntSort( vCore, 1 );
1513 Abc_Print( 1,
"%4d :", nFrames-1 );
1514 Abc_Print( 1,
"%4d", Abc_MinInt(100, 100 *
Gia_GlaAbsCount(
p, 0, 0) / (
p->nObjs - Gia_ManPoNum(
p->pGia) + Gia_ManCoNum(
p->pGia) + 1)) );
1519 Abc_Print( 1,
"%8d", nConfls );
1521 Abc_Print( 1,
"%5c",
'-' );
1523 Abc_Print( 1,
"%5d", nCexes );
1525 Abc_PrintInt( sat_solver2_nvars(
p->pSat) );
1526 Abc_PrintInt( sat_solver2_nclauses(
p->pSat) );
1527 Abc_PrintInt( sat_solver2_nlearnts(
p->pSat) );
1529 Abc_Print( 1,
"%9.2f sec", 1.0*Time/CLOCKS_PER_SEC );
1534 Abc_Print( 1,
"%s", (nCoreSize > 0 && nCexes > 0) ?
"\n" :
"\r" );
1541 double memAig = Gia_ManObjNum(
p->pGia) *
sizeof(
Gia_Obj_t);
1544 double memMap =
p->nObjs *
sizeof(
Gla_Obj_t) + Gia_ManObjNum(
p->pGia) *
sizeof(int);
1547 for ( pGla =
p->pObjs; pGla < p->pObjs +
p->nObjs; pGla++ )
1548 memMap += Vec_IntCap(&pGla->
vFrames) *
sizeof(int);
1549 memOth += Vec_IntCap(
p->vAddedNew) *
sizeof(int);
1550 memOth += Vec_IntCap(
p->vTemp) *
sizeof(int);
1551 memOth += Vec_IntCap(
p->vAbs) *
sizeof(int);
1552 memTot = memAig + memSat + memPro + memMap + memRef + memOth;
1553 ABC_PRMP(
"Memory: AIG ", memAig, memTot );
1554 ABC_PRMP(
"Memory: SAT ", memSat, memTot );
1555 ABC_PRMP(
"Memory: Proof ", memPro, memTot );
1556 ABC_PRMP(
"Memory: Map ", memMap, memTot );
1557 ABC_PRMP(
"Memory: Refine ", memRef, memTot );
1558 ABC_PRMP(
"Memory: Other ", memOth, memTot );
1559 ABC_PRMP(
"Memory: TOTAL ", memTot, memTot );
1584 Vec_IntFreeP( &vGateClasses );
1611 char * pFileNameDef =
"glabs.aig";
1612 char * pFileName =
p->pPars->pFileVabs ?
p->pPars->pFileVabs : pFileNameDef;
1616 Abc_Print( 1,
"Dumping abstracted model into file \"%s\"...\n", pFileName );
1620 Vec_IntFreeP( &vGateClasses );
1645 int f, i, iPrev, nConfls, Status, nVarsOld = 0, nCoreSize, fOneIsSent = 0, RetValue = -1;
1646 abctime clk2, clk = Abc_Clock();
1648 assert( Gia_ManPoNum(pAig) == 1 );
1649 assert( pPars->nFramesMax == 0 || pPars->nFramesStart <= pPars->nFramesMax );
1650 if ( Gia_ObjIsConst0(Gia_ObjFanin0(Gia_ManPo(pAig,0))) )
1652 if ( !Gia_ObjFaninC0(Gia_ManPo(pAig,0)) )
1654 printf(
"Sequential miter is trivially UNSAT.\n" );
1659 printf(
"Sequential miter is trivially SAT.\n" );
1668 int nFramesMaxOld = pPars->nFramesMax;
1669 int nFramesStartOld = pPars->nFramesStart;
1670 int nTimeOutOld = pPars->nTimeOut;
1671 int nDumpOld = pPars->fDumpVabs;
1672 pPars->nFramesMax = pPars->nFramesStart;
1673 pPars->nFramesStart = Abc_MinInt( pPars->nFramesStart/2 + 1, 3 );
1674 pPars->nTimeOut = 20;
1675 pPars->fDumpVabs = 0;
1677 pPars->nFramesMax = nFramesMaxOld;
1678 pPars->nFramesStart = nFramesStartOld;
1679 pPars->nTimeOut = nTimeOutOld;
1680 pPars->fDumpVabs = nDumpOld;
1692 pAig->
vGateClasses = Vec_IntStart( Gia_ManObjNum(pAig) );
1694 Vec_IntWriteEntry( pAig->
vGateClasses, Gia_ObjFaninId0p(pAig, Gia_ManPo(pAig, 0)), 1 );
1699 p->timeInit = Abc_Clock() - clk;
1701 if (
p->pPars->nTimeOut )
1702 sat_solver2_set_runtime_limit(
p->pSat,
p->pPars->nTimeOut * CLOCKS_PER_SEC + Abc_Clock() );
1704 if (
p->pPars->fVerbose )
1706 Abc_Print( 1,
"Running gate-level abstraction (GLA) with the following parameters:\n" );
1707 Abc_Print( 1,
"FrameMax = %d ConfMax = %d Timeout = %d RatioMin = %d %%.\n",
1708 pPars->nFramesMax, pPars->nConfLimit, pPars->nTimeOut, pPars->nRatioMin );
1709 Abc_Print( 1,
"LearnStart = %d LearnDelta = %d LearnRatio = %d %%.\n",
1710 pPars->nLearnedStart, pPars->nLearnedDelta, pPars->nLearnedPerce );
1711 Abc_Print( 1,
" Frame %% Abs PPI FF LUT Confl Cex Vars Clas Lrns Time Mem\n" );
1713 for ( f = i = iPrev = 0; !
p->pPars->nFramesMax || f <
p->pPars->nFramesMax; f++, iPrev = i )
1715 int nConflsBeg = sat_solver2_nconflicts(
p->pSat);
1716 p->pPars->iFrame = f;
1722 for ( i = 0; ; i++ )
1725 vCore =
Gla_ManUnsatCore(
p, f,
p->pSat, pPars->nConfLimit, pPars->fVerbose, &Status, &nConfls );
1727 if ( Status == -1 || (
p->pSat->nRuntimeLimit && Abc_Clock() >
p->pSat->nRuntimeLimit) )
1729 Prf_ManStopP( &
p->pSat->pPrf2 );
1736 Prf_ManStopP( &
p->pSat->pPrf2 );
1737 p->timeUnsat += Abc_Clock() - clk2;
1740 p->timeSat += Abc_Clock() - clk2;
1753 if ( pPars->fAddLayer )
1755 vPPis = Gla_ManCollectPPis(
p, NULL );
1761 if ( vPPis == NULL )
1763 Prf_ManStopP( &
p->pSat->pPrf2 );
1764 pCex =
p->pGia->pCexSeq;
p->pGia->pCexSeq = NULL;
1774 sat_solver2_bookmark(
p->pSat );
1775 Vec_IntClear(
p->vAddedNew );
1776 p->nAbsOld = Vec_IntSize(
p->vAbs );
1777 nVarsOld =
p->nSatVars;
1783 assert(
p->pSat->pPrf2 == NULL );
1784 if (
p->pSat->pPrf1 == NULL )
1785 p->pSat->pPrf2 = Prf_ManAlloc();
1786 if (
p->pSat->pPrf2 )
1789 Vec_IntFill(
p->vProofIds, Gia_ManObjNum(
p->pGia), -1 );
1790 Prf_ManRestart(
p->pSat->pPrf2,
p->vProofIds, sat_solver2_nlearnts(
p->pSat), Vec_IntSize(vPPis) );
1796 if (
p->pSat->pPrf2 )
1797 Prf_ManGrow(
p->pSat->pPrf2,
p->nProofIds + Vec_IntSize(vPPis) );
1802 Vec_IntFree( vPPis );
1805 if (
p->pPars->fVerbose )
1816 nCoreSize += Vec_IntSize( vCore );
1821 p->pPars->nFramesNoChange++;
1822 Vec_IntFreeP( &vCore );
1826 p->pPars->nFramesNoChange = 0;
1833 p->nSatVars = nVarsOld;
1837 Vec_IntFree( vCore );
1840 vCore =
Gla_ManUnsatCore(
p, f,
p->pSat, pPars->nConfLimit,
p->pPars->fVerbose, &Status, &nConfls );
1841 p->timeUnsat += Abc_Clock() - clk2;
1843 Vec_IntFreeP( &vCore );
1857 if (
p->pPars->fVerbose )
1858 Gla_ManAbsPrintFrame(
p, nCoreSize, f+1, sat_solver2_nconflicts(
p->pSat)-nConflsBeg, i, Abc_Clock() - clk );
1860 if ( f > 2 && iPrev > 0 && i == 0 )
1873 if (
p->pPars->fDumpVabs )
1886 if (
Gia_GlaAbsCount(
p,0,0) >= (
p->nObjs - 1) * (100 - pPars->nRatioMin) / 100 )
1896 if (
p->pPars->fVerbose && Status == -1 )
1904 if (
p->pPars->nTimeOut && Abc_Clock() >=
p->pSat->nRuntimeLimit )
1905 Abc_Print( 1,
"Timeout %d sec in frame %d with a %d-stable abstraction. ",
p->pPars->nTimeOut, f,
p->pPars->nFramesNoChange );
1906 else if ( pPars->nConfLimit && sat_solver2_nconflicts(
p->pSat) >= pPars->nConfLimit )
1907 Abc_Print( 1,
"Exceeded %d conflicts in frame %d with a %d-stable abstraction. ", pPars->nConfLimit, f,
p->pPars->nFramesNoChange );
1908 else if (
Gia_GlaAbsCount(
p,0,0) >= (
p->nObjs - 1) * (100 - pPars->nRatioMin) / 100 )
1909 Abc_Print( 1,
"The ratio of abstracted objects is less than %d %% in frame %d. ", pPars->nRatioMin, f );
1911 Abc_Print( 1,
"Abstraction stopped for unknown reason in frame %d. ", f );
1916 Abc_Print( 1,
"GLA completed %d frames with a %d-stable abstraction. ", f,
p->pPars->nFramesNoChange );
1921 if (
p->pPars->fVerbose )
1926 Abc_Print( 1,
" Gia_ManPerformGlaOld(): CEX verification has failed!\n" );
1927 Abc_Print( 1,
"Counter-example detected in frame %d. ", f );
1928 p->pPars->iFrame = pCex->iFrame - 1;
1932 Abc_PrintTime( 1,
"Time", Abc_Clock() - clk );
1933 if (
p->pPars->fVerbose )
1935 p->timeOther = (Abc_Clock() - clk) -
p->timeUnsat -
p->timeSat -
p->timeCex -
p->timeInit;
1936 ABC_PRTP(
"Runtime: Initializing",
p->timeInit, Abc_Clock() - clk );
1937 ABC_PRTP(
"Runtime: Solver UNSAT",
p->timeUnsat, Abc_Clock() - clk );
1938 ABC_PRTP(
"Runtime: Solver SAT ",
p->timeSat, Abc_Clock() - clk );
1939 ABC_PRTP(
"Runtime: Refinement ",
p->timeCex, Abc_Clock() - clk );
1940 ABC_PRTP(
"Runtime: Other ",
p->timeOther, Abc_Clock() - clk );
1941 ABC_PRTP(
"Runtime: TOTAL ", Abc_Clock() - clk, Abc_Clock() - clk );
#define ABC_FALLOC(type, num)
#define ABC_PRTP(a, t, T)
int Gia_ManToBridgeAbsNetlist(FILE *pFile, void *p, int pkg_type)
#define ABC_PRMP(a, f, F)
#define BRIDGE_ABS_NETLIST
#define ABC_CALLOC(type, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
ABC_DLL Abc_Frame_t * Abc_FrameGetGlobalFrame()
int Gia_GlaAbsCount(Gla_Man_t *p, int fRo, int fAnd)
Gia_Man_t * Gia_ManDupMapped(Gia_Man_t *p, Vec_Int_t *vMapping)
void Gia_GlaSendAbsracted(Gla_Man_t *p, int fVerbose)
void Gla_ManRefSelect_rec(Gla_Man_t *p, Gia_Obj_t *pObj, int f, Vec_Int_t *vSelect, int Sign)
void Gia_GlaAddToCounters(Gla_Man_t *p, Vec_Int_t *vCore)
int Gla_ManGetOutLit(Gla_Man_t *p, int f)
void Gla_ManReportMemory(Gla_Man_t *p)
void Gia_GlaPrepareCexAndMap(Gla_Man_t *p, Abc_Cex_t **ppCex, Vec_Int_t **pvMap)
FUNCTION DEFINITIONS ///.
void Gla_ManCollectFanins(Gla_Man_t *p, Gla_Obj_t *pGla, int iObj, Vec_Int_t *vFanins)
void Gla_ManAddClauses(Gla_Man_t *p, int iObj, int iFrame, Vec_Int_t *vLits)
void Gia_GlaSendCancel(Gla_Man_t *p, int fVerbose)
void Gia_ManRefSetAndPropFanout_rec(Gla_Man_t *p, Gia_Obj_t *pObj, int f, Vec_Int_t *vSelect, int Sign)
typedefABC_NAMESPACE_IMPL_START struct Rfn_Obj_t_ Rfn_Obj_t
DECLARATIONS ///.
void Gla_ManStop(Gla_Man_t *p)
#define Gla_ManForEachObjAbsVec(vVec, p, pObj, i)
void Gia_GlaAddTimeFrame(Gla_Man_t *p, int f)
void Gia_GlaAddOneSlice(Gla_Man_t *p, int fCur, Vec_Int_t *vCore)
void Gla_ManVerifyUsingTerSim(Gla_Man_t *p, Vec_Int_t *vPis, Vec_Int_t *vPPis, Vec_Int_t *vRoAnds, Vec_Int_t *vCos, Vec_Int_t *vRes)
Vec_Int_t * Gla_ManRefinement2(Gla_Man_t *p)
void Gia_GlaDumpAbsracted(Gla_Man_t *p, int fVerbose)
void Gia_GlaAddToAbs(Gla_Man_t *p, Vec_Int_t *vAbsAdd, int fCheck)
struct Gla_Obj_t_ Gla_Obj_t
int Gia_ManPerformGlaOld(Gia_Man_t *pAig, Abs_Par_t *pPars, int fStartVta)
int Gla_ManCountPPis(Gla_Man_t *p)
#define Gla_ManForEachObjAbs(p, pObj, i)
Vec_Int_t * Gla_ManTranslate(Gla_Man_t *p)
Gla_Man_t * Gla_ManStart2(Gia_Man_t *pGia, Abs_Par_t *pPars)
Gla_Man_t * Gla_ManStart(Gia_Man_t *pGia0, Abs_Par_t *pPars)
Vec_Int_t * Gla_ManRefinement(Gla_Man_t *p)
void Gla_ManRollBack(Gla_Man_t *p)
void Gla_ManExplorePPis(Gla_Man_t *p, Vec_Int_t *vPPis)
struct Gla_Man_t_ Gla_Man_t
void Gla_ManCollect(Gla_Man_t *p, Vec_Int_t *vPis, Vec_Int_t *vPPis, Vec_Int_t *vCos, Vec_Int_t *vRoAnds)
Abc_Cex_t * Gla_ManDeriveCex(Gla_Man_t *p, Vec_Int_t *vPis)
void Gla_ManCollectInternal_rec(Gia_Man_t *p, Gia_Obj_t *pGiaObj, Vec_Int_t *vRoAnds)
#define Gla_ObjForEachFanin(p, pObj, pFanin, i)
#define Gla_ManForEachObj(p, pObj)
void Gla_ManAbsPrintFrame(Gla_Man_t *p, int nCoreSize, int nFrames, int nConfls, int nCexes, abctime Time)
Vec_Int_t * Gla_ManUnsatCore(Gla_Man_t *p, int f, sat_solver2 *pSat, int nConfMax, int fVerbose, int *piRetValue, int *pnConfls)
void Gia_ManDupMapped_rec(Gia_Man_t *p, Gia_Obj_t *pObj, Gia_Man_t *pNew)
int Gla_ManTranslate_rec(Gia_Man_t *p, Gia_Obj_t *pObj, Vec_Int_t *vGla, int nUsageCount)
void Ga2_ManDumpStats(Gia_Man_t *pGia, Abs_Par_t *pPars, sat_solver2 *pSat, int iFrame, int fUseN)
void Rnm_ManStop(Rnm_Man_t *p, int fProfile)
double Rnm_ManMemoryUsage(Rnm_Man_t *p)
Vec_Int_t * Rnm_ManRefine(Rnm_Man_t *p, Abc_Cex_t *pCex, Vec_Int_t *vMap, int fPropFanout, int fNewRefinement, int fVerbose)
Rnm_Man_t * Rnm_ManStart(Gia_Man_t *pGia)
FUNCTION DEFINITIONS ///.
struct Rnm_Man_t_ Rnm_Man_t
int Gia_VtaPerformInt(Gia_Man_t *pAig, Abs_Par_t *pPars)
Gia_Man_t * Gia_ManDupAbsGates(Gia_Man_t *p, Vec_Int_t *vGateClasses)
Vec_Int_t * Gia_VtaConvertToGla(Gia_Man_t *p, Vec_Int_t *vVta)
typedefABC_NAMESPACE_HEADER_START struct Abs_Par_t_ Abs_Par_t
INCLUDES ///.
void Aig_ManStop(Aig_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
ABC_DLL void Abc_FrameSetNFrames(int nFrames)
ABC_DLL void Abc_FrameSetStatus(int Status)
ABC_DLL void Abc_FrameSetCex(Abc_Cex_t *pCex)
ABC_DLL int Abc_FrameIsBridgeMode()
ABC_DLL int Abc_FrameIsBatchMode()
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
ABC_DLL int Cmd_CommandExecute(Abc_Frame_t *pAbc, const char *sCommand)
Cnf_Dat_t * Cnf_DeriveOther(Aig_Man_t *pAig, int fSkipTtMin)
struct Cnf_Dat_t_ Cnf_Dat_t
void Cnf_DataFree(Cnf_Dat_t *p)
Aig_Man_t * Gia_ManToAigSimple(Gia_Man_t *p)
#define Gia_ObjForEachFanoutStatic(p, pObj, pFanout, i)
void Gia_ManStop(Gia_Man_t *p)
void Gia_ManStaticFanoutStart(Gia_Man_t *p)
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
Gia_Man_t * Gia_ManStart(int nObjsMax)
FUNCTION DEFINITIONS ///.
struct Gia_Obj_t_ Gia_Obj_t
void Gia_ObjPrint(Gia_Man_t *p, Gia_Obj_t *pObj)
void Gia_ManFillValue(Gia_Man_t *p)
struct Gia_Man_t_ Gia_Man_t
#define Gia_ManForEachObj1(p, pObj, i)
#define Gia_ManForEachObjVec(vVec, p, pObj, i)
int Gia_ManVerifyCex(Gia_Man_t *pAig, Abc_Cex_t *p, int fDualOut)
DECLARATIONS ///.
void Gia_ManIncrementTravId(Gia_Man_t *p)
#define Gia_ManForEachObj(p, pObj, i)
MACRO DEFINITIONS ///.
void Gia_AigerWrite(Gia_Man_t *p, char *pFileName, int fWriteSymbols, int fCompact, int fWriteNewLine)
double sat_solver2_memory_proof(sat_solver2 *s)
void sat_solver2_delete(sat_solver2 *s)
double sat_solver2_memory(sat_solver2 *s, int fAll)
int sat_solver2_simplify(sat_solver2 *s)
sat_solver2 * sat_solver2_new(void)
void sat_solver2_rollback(sat_solver2 *s)
int sat_solver2_solve(sat_solver2 *s, lit *begin, lit *end, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal)
void * Sat_ProofCore(sat_solver2 *s)
int sat_solver2_addclause(sat_solver2 *s, lit *begin, lit *end, int Id)
struct sat_solver2_t sat_solver2
int Gia_ManToBridgeBadAbs(FILE *pFile)
void Abc_CexFreeP(Abc_Cex_t **p)
Abc_Cex_t * Abc_CexMakeTriv(int nRegs, int nTruePis, int nTruePos, int iFrameOut)
void Abc_CexFree(Abc_Cex_t *p)
ABC_NAMESPACE_IMPL_START Abc_Cex_t * Abc_CexAlloc(int nRegs, int nRealPis, int nFrames)
DECLARATIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
#define Vec_IntForEachEntryStart(vVec, Entry, i, Start)