abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
absOldCex.c File Reference
#include "abs.h"
#include "sat/bmc/bmc.h"

Go to the source code of this file.

Data Structures

struct  Saig_ManCba_t_
 

Typedefs

typedef
typedefABC_NAMESPACE_IMPL_START
struct Saig_ManCba_t_ 
Saig_ManCba_t
 DECLARATIONS ///. More...
 

Functions

Vec_Int_tSaig_ManCbaFilterFlops (Aig_Man_t *pAig, Abc_Cex_t *pAbsCex, Vec_Int_t *vFlopClasses, Vec_Int_t *vAbsFfsToAdd, int nFfsToSelect)
 FUNCTION DEFINITIONS ///. More...
 
Aig_Man_tSaig_ManDupWithCubes (Aig_Man_t *pAig, Vec_Vec_t *vReg2Value)
 
Vec_Int_tSaig_ManCbaReason2Inputs (Saig_ManCba_t *p, Vec_Int_t *vReasons)
 
Abc_Cex_tSaig_ManCbaReason2Cex (Saig_ManCba_t *p, Vec_Int_t *vReasons)
 
void Saig_ManCbaFindReason_rec (Aig_Man_t *p, Aig_Obj_t *pObj, Vec_Int_t *vPrios, Vec_Int_t *vReasons)
 
Vec_Int_tSaig_ManCbaFindReason (Saig_ManCba_t *p)
 
void Saig_ManCbaUnrollCollect_rec (Aig_Man_t *pAig, Aig_Obj_t *pObj, Vec_Int_t *vObjs, Vec_Int_t *vRoots)
 
Aig_Man_tSaig_ManCbaUnrollWithCex (Aig_Man_t *pAig, Abc_Cex_t *pCex, int nInputs, Vec_Int_t **pvMapPiF2A, Vec_Vec_t **pvReg2Frame)
 
Saig_ManCba_tSaig_ManCbaStart (Aig_Man_t *pAig, Abc_Cex_t *pCex, int nInputs, int fVerbose)
 
void Saig_ManCbaStop (Saig_ManCba_t *p)
 
void Saig_ManCbaShrink (Saig_ManCba_t *p)
 
static void Saig_ObjCexMinSet0 (Aig_Obj_t *pObj)
 
static void Saig_ObjCexMinSet1 (Aig_Obj_t *pObj)
 
static void Saig_ObjCexMinSetX (Aig_Obj_t *pObj)
 
static int Saig_ObjCexMinGet0 (Aig_Obj_t *pObj)
 
static int Saig_ObjCexMinGet1 (Aig_Obj_t *pObj)
 
static int Saig_ObjCexMinGetX (Aig_Obj_t *pObj)
 
static int Saig_ObjCexMinGet0Fanin0 (Aig_Obj_t *pObj)
 
static int Saig_ObjCexMinGet1Fanin0 (Aig_Obj_t *pObj)
 
static int Saig_ObjCexMinGet0Fanin1 (Aig_Obj_t *pObj)
 
static int Saig_ObjCexMinGet1Fanin1 (Aig_Obj_t *pObj)
 
static void Saig_ObjCexMinSim (Aig_Obj_t *pObj)
 
static void Saig_ObjCexMinPrint (Aig_Obj_t *pObj)
 
int Saig_ManCexVerifyUsingTernary (Aig_Man_t *pAig, Abc_Cex_t *pCex, Abc_Cex_t *pCare)
 
Abc_Cex_tSaig_ManCbaFindCexCareBits (Aig_Man_t *pAig, Abc_Cex_t *pCex, int nInputs, int fVerbose)
 
Vec_Int_tSaig_ManCbaFilterInputs (Aig_Man_t *pAig, int iFirstFlopPi, Abc_Cex_t *pCex, int fVerbose)
 
Vec_Int_tSaig_ManCbaPerform (Aig_Man_t *pAbs, int nInputs, Saig_ParBmc_t *pPars)
 

Typedef Documentation

typedef typedefABC_NAMESPACE_IMPL_START struct Saig_ManCba_t_ Saig_ManCba_t

DECLARATIONS ///.

CFile****************************************************************

FileName [saigAbsCba.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Sequential AIG package.]

Synopsis [CEX-based abstraction.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id:
saigAbsCba.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

]

Definition at line 31 of file absOldCex.c.

Function Documentation

Vec_Int_t* Saig_ManCbaFilterFlops ( Aig_Man_t pAig,
Abc_Cex_t pAbsCex,
Vec_Int_t vFlopClasses,
Vec_Int_t vAbsFfsToAdd,
int  nFfsToSelect 
)

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis [Selects the best flops from the given array.]

Description [Selects the best 'nFfsToSelect' flops among the array 'vAbsFfsToAdd' of flops that should be added to the abstraction. To this end, this procedure simulates the original AIG (pAig) using the given CEX (pAbsCex), which was detected for the abstraction.]

SideEffects []

SeeAlso []

Definition at line 66 of file absOldCex.c.

67 {
68  Aig_Obj_t * pObj, * pObjRi, * pObjRo;
69  Vec_Int_t * vMapEntries, * vFlopCosts, * vFlopAddCosts, * vFfsToAddBest;
70  int i, k, f, Entry, iBit, * pPerm;
71  assert( Aig_ManRegNum(pAig) == Vec_IntSize(vFlopClasses) );
72  assert( Vec_IntSize(vAbsFfsToAdd) > nFfsToSelect );
73  // map previously abstracted flops into their original numbers
74  vMapEntries = Vec_IntAlloc( Vec_IntSize(vFlopClasses) );
75  Vec_IntForEachEntry( vFlopClasses, Entry, i )
76  if ( Entry == 0 )
77  Vec_IntPush( vMapEntries, i );
78  // simulate one frame at a time
79  assert( Saig_ManPiNum(pAig) + Vec_IntSize(vMapEntries) == pAbsCex->nPis );
80  vFlopCosts = Vec_IntStart( Vec_IntSize(vMapEntries) );
81  // initialize the flops
82  Aig_ManCleanMarkB(pAig);
83  Aig_ManConst1(pAig)->fMarkB = 1;
84  Saig_ManForEachLo( pAig, pObj, i )
85  pObj->fMarkB = 0;
86  for ( f = 0; f < pAbsCex->iFrame; f++ )
87  {
88  // override the flop values according to the cex
89  iBit = pAbsCex->nRegs + f * pAbsCex->nPis + Saig_ManPiNum(pAig);
90  Vec_IntForEachEntry( vMapEntries, Entry, k )
91  Saig_ManLo(pAig, Entry)->fMarkB = Abc_InfoHasBit(pAbsCex->pData, iBit + k);
92  // simulate
93  Aig_ManForEachNode( pAig, pObj, k )
94  pObj->fMarkB = (Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj)) &
95  (Aig_ObjFanin1(pObj)->fMarkB ^ Aig_ObjFaninC1(pObj));
96  Aig_ManForEachCo( pAig, pObj, k )
97  pObj->fMarkB = Aig_ObjFanin0(pObj)->fMarkB ^ Aig_ObjFaninC0(pObj);
98  // transfer
99  Saig_ManForEachLiLo( pAig, pObjRi, pObjRo, k )
100  pObjRo->fMarkB = pObjRi->fMarkB;
101  // compare
102  iBit = pAbsCex->nRegs + (f + 1) * pAbsCex->nPis + Saig_ManPiNum(pAig);
103  Vec_IntForEachEntry( vMapEntries, Entry, k )
104  if ( Saig_ManLi(pAig, Entry)->fMarkB != (unsigned)Abc_InfoHasBit(pAbsCex->pData, iBit + k) )
105  Vec_IntAddToEntry( vFlopCosts, k, 1 );
106  }
107 // Vec_IntForEachEntry( vFlopCosts, Entry, i )
108 // printf( "%d ", Entry );
109 // printf( "\n" );
110  // remap the cost
111  vFlopAddCosts = Vec_IntAlloc( Vec_IntSize(vAbsFfsToAdd) );
112  Vec_IntForEachEntry( vAbsFfsToAdd, Entry, i )
113  Vec_IntPush( vFlopAddCosts, -Vec_IntEntry(vFlopCosts, Entry) );
114  // sort the flops
115  pPerm = Abc_MergeSortCost( Vec_IntArray(vFlopAddCosts), Vec_IntSize(vFlopAddCosts) );
116  // shrink the array
117  vFfsToAddBest = Vec_IntAlloc( nFfsToSelect );
118  for ( i = 0; i < nFfsToSelect; i++ )
119  {
120 // printf( "%d ", Vec_IntEntry(vFlopAddCosts, pPerm[i]) );
121  Vec_IntPush( vFfsToAddBest, Vec_IntEntry(vAbsFfsToAdd, pPerm[i]) );
122  }
123 // printf( "\n" );
124  // cleanup
125  ABC_FREE( pPerm );
126  Vec_IntFree( vMapEntries );
127  Vec_IntFree( vFlopCosts );
128  Vec_IntFree( vFlopAddCosts );
129  Aig_ManCleanMarkB(pAig);
130  // return the computed flops
131  return vFfsToAddBest;
132 }
static int * Vec_IntArray(Vec_Int_t *p)
Definition: vecInt.h:328
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static int Abc_InfoHasBit(unsigned *p, int i)
Definition: abc_global.h:258
#define Saig_ManForEachLiLo(p, pObjLi, pObjLo, i)
Definition: saig.h:101
static Aig_Obj_t * Saig_ManLo(Aig_Man_t *p, int i)
Definition: saig.h:79
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Definition: aig.h:308
void Aig_ManCleanMarkB(Aig_Man_t *p)
Definition: aigUtil.c:167
#define Aig_ManForEachCo(p, pObj, i)
Definition: aig.h:398
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
Definition: aig.h:309
for(p=first;p->value< newval;p=p->next)
int * Abc_MergeSortCost(int *pCosts, int nSize)
Definition: utilSort.c:238
static Vec_Int_t * Vec_IntStart(int nSize)
Definition: bblif.c:172
#define Aig_ManForEachNode(p, pObj, i)
Definition: aig.h:413
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
static void Vec_IntAddToEntry(Vec_Int_t *p, int i, int Addition)
Definition: bblif.c:302
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
if(last==0)
Definition: sparse_int.h:34
static Aig_Obj_t * Saig_ManLi(Aig_Man_t *p, int i)
Definition: saig.h:80
Definition: aig.h:69
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
#define Saig_ManForEachLo(p, pObj, i)
Definition: saig.h:96
static int pPerm[13719]
Definition: rwrTemp.c:32
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
Definition: aig.h:306
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
Definition: aig.h:264
static int Aig_ManRegNum(Aig_Man_t *p)
Definition: aig.h:260
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static int Saig_ManPiNum(Aig_Man_t *p)
MACRO DEFINITIONS ///.
Definition: saig.h:73
#define ABC_FREE(obj)
Definition: abc_global.h:232
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
Definition: aig.h:307
#define assert(ex)
Definition: util_old.h:213
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
Vec_Int_t* Saig_ManCbaFilterInputs ( Aig_Man_t pAig,
int  iFirstFlopPi,
Abc_Cex_t pCex,
int  fVerbose 
)

Function*************************************************************

Synopsis [Returns the array of PIs for flops that should not be absracted.]

Description []

SideEffects []

SeeAlso []

Definition at line 785 of file absOldCex.c.

786 {
787  Saig_ManCba_t * p;
788  Vec_Int_t * vRes, * vReasons;
789  abctime clk;
790  if ( Saig_ManPiNum(pAig) != pCex->nPis )
791  {
792  printf( "Saig_ManCbaFilterInputs(): The PI count of AIG (%d) does not match that of cex (%d).\n",
793  Aig_ManCiNum(pAig), pCex->nPis );
794  return NULL;
795  }
796 
797 clk = Abc_Clock();
798  p = Saig_ManCbaStart( pAig, pCex, iFirstFlopPi, fVerbose );
799  p->pFrames = Saig_ManCbaUnrollWithCex( pAig, pCex, iFirstFlopPi, &p->vMapPiF2A, &p->vReg2Frame );
800  vReasons = Saig_ManCbaFindReason( p );
801  vRes = Saig_ManCbaReason2Inputs( p, vReasons );
802  if ( fVerbose )
803  {
804  printf( "Frame PIs = %4d (essential = %4d) AIG PIs = %4d (essential = %4d) ",
805  Aig_ManCiNum(p->pFrames), Vec_IntSize(vReasons),
806  Saig_ManPiNum(p->pAig) - p->nInputs, Vec_IntSize(vRes) );
807 ABC_PRT( "Time", Abc_Clock() - clk );
808  }
809 
810  Vec_IntFree( vReasons );
811  Saig_ManCbaStop( p );
812  return vRes;
813 }
Saig_ManCba_t * Saig_ManCbaStart(Aig_Man_t *pAig, Abc_Cex_t *pCex, int nInputs, int fVerbose)
Definition: absOldCex.c:513
Aig_Man_t * Saig_ManCbaUnrollWithCex(Aig_Man_t *pAig, Abc_Cex_t *pCex, int nInputs, Vec_Int_t **pvMapPiF2A, Vec_Vec_t **pvReg2Frame)
Definition: absOldCex.c:399
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
void Saig_ManCbaStop(Saig_ManCba_t *p)
Definition: absOldCex.c:535
static abctime Abc_Clock()
Definition: abc_global.h:279
static int Aig_ManCiNum(Aig_Man_t *p)
Definition: aig.h:251
typedefABC_NAMESPACE_IMPL_START struct Saig_ManCba_t_ Saig_ManCba_t
DECLARATIONS ///.
Definition: absOldCex.c:31
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static int Saig_ManPiNum(Aig_Man_t *p)
MACRO DEFINITIONS ///.
Definition: saig.h:73
#define ABC_PRT(a, t)
Definition: abc_global.h:220
Vec_Int_t * Saig_ManCbaFindReason(Saig_ManCba_t *p)
Definition: absOldCex.c:311
Vec_Int_t * Saig_ManCbaReason2Inputs(Saig_ManCba_t *p, Vec_Int_t *vReasons)
Definition: absOldCex.c:195
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
ABC_INT64_T abctime
Definition: abc_global.h:278
Abc_Cex_t* Saig_ManCbaFindCexCareBits ( Aig_Man_t pAig,
Abc_Cex_t pCex,
int  nInputs,
int  fVerbose 
)

Function*************************************************************

Synopsis [SAT-based refinement of the counter-example.]

Description [The first parameter (nInputs) indicates how many first primary inputs to skip without considering as care candidates.]

SideEffects []

SeeAlso []

Definition at line 718 of file absOldCex.c.

719 {
720  Saig_ManCba_t * p;
721  Vec_Int_t * vReasons;
722  Abc_Cex_t * pCare;
723  abctime clk = Abc_Clock();
724 
725  clk = Abc_Clock();
726  p = Saig_ManCbaStart( pAig, pCex, nInputs, fVerbose );
727 
728 // p->vReg2Frame = Vec_VecStart( pCex->iFrame );
729 // p->vReg2Value = Vec_VecStart( pCex->iFrame );
730  p->pFrames = Saig_ManCbaUnrollWithCex( pAig, pCex, nInputs, &p->vMapPiF2A, &p->vReg2Frame );
731  vReasons = Saig_ManCbaFindReason( p );
732  if ( p->vReg2Frame )
733  Saig_ManCbaShrink( p );
734 
735 
736 //if ( fVerbose )
737 //Aig_ManPrintStats( p->pFrames );
738 
739  if ( fVerbose )
740  {
741  Vec_Int_t * vRes = Saig_ManCbaReason2Inputs( p, vReasons );
742  printf( "Frame PIs = %4d (essential = %4d) AIG PIs = %4d (essential = %4d) ",
743  Aig_ManCiNum(p->pFrames), Vec_IntSize(vReasons),
744  Saig_ManPiNum(p->pAig) - p->nInputs, Vec_IntSize(vRes) );
745  Vec_IntFree( vRes );
746 ABC_PRT( "Time", Abc_Clock() - clk );
747  }
748 
749  pCare = Saig_ManCbaReason2Cex( p, vReasons );
750  Vec_IntFree( vReasons );
751  Saig_ManCbaStop( p );
752 
753 if ( fVerbose )
754 {
755 printf( "Real " );
756 Abc_CexPrintStats( pCex );
757 }
758 if ( fVerbose )
759 {
760 printf( "Care " );
761 Abc_CexPrintStats( pCare );
762 }
763 /*
764  // verify the reduced counter-example using ternary simulation
765  if ( !Saig_ManCexVerifyUsingTernary( pAig, pCex, pCare ) )
766  printf( "Saig_ManCbaFindCexCareBits(): Minimized counter-example verification has failed!!!\n" );
767  else if ( fVerbose )
768  printf( "Saig_ManCbaFindCexCareBits(): Minimized counter-example verification is successful.\n" );
769 */
770  Aig_ManCleanMarkAB( pAig );
771  return pCare;
772 }
Saig_ManCba_t * Saig_ManCbaStart(Aig_Man_t *pAig, Abc_Cex_t *pCex, int nInputs, int fVerbose)
Definition: absOldCex.c:513
Aig_Man_t * Saig_ManCbaUnrollWithCex(Aig_Man_t *pAig, Abc_Cex_t *pCex, int nInputs, Vec_Int_t **pvMapPiF2A, Vec_Vec_t **pvReg2Frame)
Definition: absOldCex.c:399
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
void Saig_ManCbaStop(Saig_ManCba_t *p)
Definition: absOldCex.c:535
static abctime Abc_Clock()
Definition: abc_global.h:279
Abc_Cex_t * Saig_ManCbaReason2Cex(Saig_ManCba_t *p, Vec_Int_t *vReasons)
Definition: absOldCex.c:224
static int Aig_ManCiNum(Aig_Man_t *p)
Definition: aig.h:251
void Abc_CexPrintStats(Abc_Cex_t *p)
Definition: utilCex.c:256
typedefABC_NAMESPACE_IMPL_START struct Saig_ManCba_t_ Saig_ManCba_t
DECLARATIONS ///.
Definition: absOldCex.c:31
void Saig_ManCbaShrink(Saig_ManCba_t *p)
Definition: absOldCex.c:555
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static int Saig_ManPiNum(Aig_Man_t *p)
MACRO DEFINITIONS ///.
Definition: saig.h:73
void Aig_ManCleanMarkAB(Aig_Man_t *p)
Definition: aigUtil.c:186
#define ABC_PRT(a, t)
Definition: abc_global.h:220
Vec_Int_t * Saig_ManCbaFindReason(Saig_ManCba_t *p)
Definition: absOldCex.c:311
Vec_Int_t * Saig_ManCbaReason2Inputs(Saig_ManCba_t *p, Vec_Int_t *vReasons)
Definition: absOldCex.c:195
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
Definition: utilCex.h:39
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
ABC_INT64_T abctime
Definition: abc_global.h:278
Vec_Int_t* Saig_ManCbaFindReason ( Saig_ManCba_t p)

Function*************************************************************

Synopsis [Returns reasons for the property to fail.]

Description []

SideEffects []

SeeAlso []

Definition at line 311 of file absOldCex.c.

312 {
313  Aig_Obj_t * pObj;
314  Vec_Int_t * vPrios, * vReasons;
315  int i;
316 
317  // set PI values according to CEX
318  vPrios = Vec_IntStartFull( Aig_ManObjNumMax(p->pFrames) );
319  Aig_ManConst1(p->pFrames)->fPhase = 1;
320  Aig_ManForEachCi( p->pFrames, pObj, i )
321  {
322  int iInput = Vec_IntEntry( p->vMapPiF2A, 2*i );
323  int iFrame = Vec_IntEntry( p->vMapPiF2A, 2*i+1 );
324  pObj->fPhase = Abc_InfoHasBit( p->pCex->pData, p->pCex->nRegs + p->pCex->nPis * iFrame + iInput );
325  Vec_IntWriteEntry( vPrios, Aig_ObjId(pObj), i );
326  }
327 
328  // traverse and set the priority
329  Aig_ManForEachNode( p->pFrames, pObj, i )
330  {
331  int fPhase0 = Aig_ObjFaninC0(pObj) ^ Aig_ObjFanin0(pObj)->fPhase;
332  int fPhase1 = Aig_ObjFaninC1(pObj) ^ Aig_ObjFanin1(pObj)->fPhase;
333  int iPrio0 = Vec_IntEntry( vPrios, Aig_ObjFaninId0(pObj) );
334  int iPrio1 = Vec_IntEntry( vPrios, Aig_ObjFaninId1(pObj) );
335  pObj->fPhase = fPhase0 && fPhase1;
336  if ( fPhase0 && fPhase1 ) // both are one
337  Vec_IntWriteEntry( vPrios, Aig_ObjId(pObj), Abc_MaxInt(iPrio0, iPrio1) );
338  else if ( !fPhase0 && fPhase1 )
339  Vec_IntWriteEntry( vPrios, Aig_ObjId(pObj), iPrio0 );
340  else if ( fPhase0 && !fPhase1 )
341  Vec_IntWriteEntry( vPrios, Aig_ObjId(pObj), iPrio1 );
342  else // both are zero
343  Vec_IntWriteEntry( vPrios, Aig_ObjId(pObj), Abc_MinInt(iPrio0, iPrio1) );
344  }
345  // check the property output
346  pObj = Aig_ManCo( p->pFrames, 0 );
347  pObj->fPhase = Aig_ObjFaninC0(pObj) ^ Aig_ObjFanin0(pObj)->fPhase;
348  assert( !pObj->fPhase );
349 
350  // select the reason
351  vReasons = Vec_IntAlloc( 100 );
352  Aig_ManIncrementTravId( p->pFrames );
353  Saig_ManCbaFindReason_rec( p->pFrames, Aig_ObjFanin0(pObj), vPrios, vReasons );
354  Vec_IntFree( vPrios );
355 // assert( !Aig_ObjIsTravIdCurrent(p->pFrames, Aig_ManConst1(p->pFrames)) );
356  return vReasons;
357 }
static int Aig_ObjFaninId0(Aig_Obj_t *pObj)
Definition: aig.h:304
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static int Abc_InfoHasBit(unsigned *p, int i)
Definition: abc_global.h:258
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Definition: aig.h:308
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition: aig.h:393
static int Aig_ObjFaninId1(Aig_Obj_t *pObj)
Definition: aig.h:305
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
Definition: aig.h:309
static Vec_Int_t * Vec_IntStartFull(int nSize)
Definition: vecInt.h:119
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigUtil.c:44
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
Definition: bblif.c:285
static int Abc_MinInt(int a, int b)
Definition: abc_global.h:239
#define Aig_ManForEachNode(p, pObj, i)
Definition: aig.h:413
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
Definition: aig.h:69
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
Definition: aig.h:306
static int Aig_ManObjNumMax(Aig_Man_t *p)
Definition: aig.h:259
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
Definition: aig.h:264
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
Definition: aig.h:267
unsigned int fPhase
Definition: aig.h:78
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
Definition: aig.h:307
void Saig_ManCbaFindReason_rec(Aig_Man_t *p, Aig_Obj_t *pObj, Vec_Int_t *vPrios, Vec_Int_t *vReasons)
Definition: absOldCex.c:261
static int Aig_ObjId(Aig_Obj_t *pObj)
Definition: aig.h:286
#define assert(ex)
Definition: util_old.h:213
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
void Saig_ManCbaFindReason_rec ( Aig_Man_t p,
Aig_Obj_t pObj,
Vec_Int_t vPrios,
Vec_Int_t vReasons 
)

Function*************************************************************

Synopsis [Returns reasons for the property to fail.]

Description []

SideEffects []

SeeAlso []

Definition at line 261 of file absOldCex.c.

262 {
263  if ( Aig_ObjIsTravIdCurrent(p, pObj) )
264  return;
265  Aig_ObjSetTravIdCurrent(p, pObj);
266  if ( Aig_ObjIsConst1(pObj) )
267  return;
268  if ( Aig_ObjIsCi(pObj) )
269  {
270  Vec_IntPush( vReasons, Aig_ObjCioId(pObj) );
271  return;
272  }
273  assert( Aig_ObjIsNode(pObj) );
274  if ( pObj->fPhase )
275  {
276  Saig_ManCbaFindReason_rec( p, Aig_ObjFanin0(pObj), vPrios, vReasons );
277  Saig_ManCbaFindReason_rec( p, Aig_ObjFanin1(pObj), vPrios, vReasons );
278  }
279  else
280  {
281  int fPhase0 = Aig_ObjFaninC0(pObj) ^ Aig_ObjFanin0(pObj)->fPhase;
282  int fPhase1 = Aig_ObjFaninC1(pObj) ^ Aig_ObjFanin1(pObj)->fPhase;
283  assert( !fPhase0 || !fPhase1 );
284  if ( !fPhase0 && fPhase1 )
285  Saig_ManCbaFindReason_rec( p, Aig_ObjFanin0(pObj), vPrios, vReasons );
286  else if ( fPhase0 && !fPhase1 )
287  Saig_ManCbaFindReason_rec( p, Aig_ObjFanin1(pObj), vPrios, vReasons );
288  else
289  {
290  int iPrio0 = Vec_IntEntry( vPrios, Aig_ObjFaninId0(pObj) );
291  int iPrio1 = Vec_IntEntry( vPrios, Aig_ObjFaninId1(pObj) );
292  if ( iPrio0 <= iPrio1 )
293  Saig_ManCbaFindReason_rec( p, Aig_ObjFanin0(pObj), vPrios, vReasons );
294  else
295  Saig_ManCbaFindReason_rec( p, Aig_ObjFanin1(pObj), vPrios, vReasons );
296  }
297  }
298 }
static int Aig_ObjFaninId0(Aig_Obj_t *pObj)
Definition: aig.h:304
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:295
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Definition: aig.h:308
static int Aig_ObjFaninId1(Aig_Obj_t *pObj)
Definition: aig.h:305
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
Definition: aig.h:309
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:293
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
Definition: aig.h:280
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
Definition: aig.h:274
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
Definition: aig.h:306
unsigned int fPhase
Definition: aig.h:78
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
Definition: aig.h:307
void Saig_ManCbaFindReason_rec(Aig_Man_t *p, Aig_Obj_t *pObj, Vec_Int_t *vPrios, Vec_Int_t *vReasons)
Definition: absOldCex.c:261
#define assert(ex)
Definition: util_old.h:213
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
Definition: aig.h:275
static int Aig_ObjCioId(Aig_Obj_t *pObj)
Definition: aig.h:285
Vec_Int_t* Saig_ManCbaPerform ( Aig_Man_t pAbs,
int  nInputs,
Saig_ParBmc_t pPars 
)

Function*************************************************************

Synopsis [Checks the abstracted model for a counter-example.]

Description [Returns the array of abstracted flops that should be added to the abstraction.]

SideEffects []

SeeAlso []

Definition at line 830 of file absOldCex.c.

831 {
832  Vec_Int_t * vAbsFfsToAdd;
833  int RetValue;
834  abctime clk = Abc_Clock();
835 // assert( pAbs->nRegs > 0 );
836  // perform BMC
837  RetValue = Saig_ManBmcScalable( pAbs, pPars );
838  if ( RetValue == -1 ) // time out - nothing to add
839  {
840  printf( "Resource limit is reached during BMC.\n" );
841  assert( pAbs->pSeqModel == NULL );
842  return Vec_IntAlloc( 0 );
843  }
844  if ( pAbs->pSeqModel == NULL )
845  {
846  printf( "BMC did not detect a CEX with the given depth.\n" );
847  return Vec_IntAlloc( 0 );
848  }
849  if ( pPars->fVerbose )
850  Abc_CexPrintStats( pAbs->pSeqModel );
851  // CEX is detected - refine the flops
852  vAbsFfsToAdd = Saig_ManCbaFilterInputs( pAbs, nInputs, pAbs->pSeqModel, pPars->fVerbose );
853  if ( Vec_IntSize(vAbsFfsToAdd) == 0 )
854  {
855  Vec_IntFree( vAbsFfsToAdd );
856  return NULL;
857  }
858  if ( pPars->fVerbose )
859  {
860  printf( "Adding %d registers to the abstraction (total = %d). ",
861  Vec_IntSize(vAbsFfsToAdd), Aig_ManRegNum(pAbs)+Vec_IntSize(vAbsFfsToAdd) );
862  Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
863  }
864  return vAbsFfsToAdd;
865 }
int Saig_ManBmcScalable(Aig_Man_t *pAig, Saig_ParBmc_t *pPars)
Definition: bmcBmc3.c:1390
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
int fVerbose
Definition: bmc.h:66
static abctime Abc_Clock()
Definition: abc_global.h:279
static void Abc_PrintTime(int level, const char *pStr, abctime time)
Definition: abc_global.h:367
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
void Abc_CexPrintStats(Abc_Cex_t *p)
Definition: utilCex.c:256
static int Aig_ManRegNum(Aig_Man_t *p)
Definition: aig.h:260
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
Vec_Int_t * Saig_ManCbaFilterInputs(Aig_Man_t *pAig, int iFirstFlopPi, Abc_Cex_t *pCex, int fVerbose)
Definition: absOldCex.c:785
#define assert(ex)
Definition: util_old.h:213
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
ABC_INT64_T abctime
Definition: abc_global.h:278
Abc_Cex_t* Saig_ManCbaReason2Cex ( Saig_ManCba_t p,
Vec_Int_t vReasons 
)

Function*************************************************************

Synopsis [Creates the counter-example.]

Description []

SideEffects []

SeeAlso []

Definition at line 224 of file absOldCex.c.

225 {
226  Abc_Cex_t * pCare;
227  int i, Entry, iInput, iFrame;
228  pCare = Abc_CexDup( p->pCex, p->pCex->nRegs );
229  memset( pCare->pData, 0, sizeof(unsigned) * Abc_BitWordNum(pCare->nBits) );
230  Vec_IntForEachEntry( vReasons, Entry, i )
231  {
232  assert( Entry >= 0 && Entry < Aig_ManCiNum(p->pFrames) );
233  iInput = Vec_IntEntry( p->vMapPiF2A, 2*Entry );
234  iFrame = Vec_IntEntry( p->vMapPiF2A, 2*Entry+1 );
235  Abc_InfoSetBit( pCare->pData, pCare->nRegs + pCare->nPis * iFrame + iInput );
236  }
237 /*
238  for ( iFrame = 0; iFrame <= pCare->iFrame; iFrame++ )
239  {
240  int Count = 0;
241  for ( i = 0; i < pCare->nPis; i++ )
242  Count += Abc_InfoHasBit(pCare->pData, pCare->nRegs + pCare->nPis * iFrame + i);
243  printf( "%d ", Count );
244  }
245 printf( "\n" );
246 */
247  return pCare;
248 }
char * memset()
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
static int Aig_ManCiNum(Aig_Man_t *p)
Definition: aig.h:251
static void Abc_InfoSetBit(unsigned *p, int i)
Definition: abc_global.h:259
Abc_Cex_t * Abc_CexDup(Abc_Cex_t *p, int nRegsNew)
Definition: utilCex.c:145
static int Abc_BitWordNum(int nBits)
Definition: abc_global.h:255
#define assert(ex)
Definition: util_old.h:213
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
Definition: utilCex.h:39
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
Vec_Int_t* Saig_ManCbaReason2Inputs ( Saig_ManCba_t p,
Vec_Int_t vReasons 
)

Function*************************************************************

Synopsis [Maps array of frame PI IDs into array of additional PI IDs.]

Description []

SideEffects []

SeeAlso []

Definition at line 195 of file absOldCex.c.

196 {
197  Vec_Int_t * vOriginal, * vVisited;
198  int i, Entry;
199  vOriginal = Vec_IntAlloc( Saig_ManPiNum(p->pAig) );
200  vVisited = Vec_IntStart( Saig_ManPiNum(p->pAig) );
201  Vec_IntForEachEntry( vReasons, Entry, i )
202  {
203  int iInput = Vec_IntEntry( p->vMapPiF2A, 2*Entry );
204  assert( iInput >= p->nInputs && iInput < Aig_ManCiNum(p->pAig) );
205  if ( Vec_IntEntry(vVisited, iInput) == 0 )
206  Vec_IntPush( vOriginal, iInput - p->nInputs );
207  Vec_IntAddToEntry( vVisited, iInput, 1 );
208  }
209  Vec_IntFree( vVisited );
210  return vOriginal;
211 }
Aig_Man_t * pAig
Definition: llb3Image.c:49
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static Vec_Int_t * Vec_IntStart(int nSize)
Definition: bblif.c:172
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
static void Vec_IntAddToEntry(Vec_Int_t *p, int i, int Addition)
Definition: bblif.c:302
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
static int Aig_ManCiNum(Aig_Man_t *p)
Definition: aig.h:251
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static int Saig_ManPiNum(Aig_Man_t *p)
MACRO DEFINITIONS ///.
Definition: saig.h:73
#define assert(ex)
Definition: util_old.h:213
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
void Saig_ManCbaShrink ( Saig_ManCba_t p)

Function*************************************************************

Synopsis [Destroys refinement manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 555 of file absOldCex.c.

556 {
557  Aig_Man_t * pManNew;
558  Aig_Obj_t * pObjLi, * pObjFrame;
559  Vec_Int_t * vLevel, * vLevel2;
560  int f, k, ObjId, Lit;
561  // assuming that important objects are labeled in Saig_ManCbaFindReason()
562  Vec_VecForEachLevelInt( p->vReg2Frame, vLevel, f )
563  {
564  Vec_IntForEachEntryDouble( vLevel, ObjId, Lit, k )
565  {
566  pObjFrame = Aig_ManObj( p->pFrames, Abc_Lit2Var(Lit) );
567  if ( pObjFrame == NULL || (!Aig_ObjIsConst1(pObjFrame) && !Aig_ObjIsTravIdCurrent(p->pFrames, pObjFrame)) )
568  continue;
569  pObjLi = Aig_ManObj( p->pAig, ObjId );
570  assert( Saig_ObjIsLi(p->pAig, pObjLi) );
571  Vec_VecPushInt( p->vReg2Value, f, Abc_Var2Lit( Aig_ObjCioId(pObjLi) - Saig_ManPoNum(p->pAig), Abc_LitIsCompl(Lit) ^ !pObjFrame->fPhase ) );
572  }
573  }
574  // print statistics
575  Vec_VecForEachLevelInt( p->vReg2Frame, vLevel, k )
576  {
577  vLevel2 = Vec_VecEntryInt( p->vReg2Value, k );
578  printf( "Level = %4d StateBits = %4d (%6.2f %%) CareBits = %4d (%6.2f %%)\n", k,
579  Vec_IntSize(vLevel)/2, 100.0 * (Vec_IntSize(vLevel)/2) / Aig_ManRegNum(p->pAig),
580  Vec_IntSize(vLevel2), 100.0 * Vec_IntSize(vLevel2) / Aig_ManRegNum(p->pAig) );
581  }
582  // try reducing the frames
583  pManNew = Saig_ManDupWithCubes( p->pAig, p->vReg2Value );
584 // Ioa_WriteAiger( pManNew, "aigcube.aig", 0, 0 );
585  Aig_ManStop( pManNew );
586 }
Aig_Man_t * pAig
Definition: llb3Image.c:49
static int Saig_ManPoNum(Aig_Man_t *p)
Definition: saig.h:74
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:295
#define Vec_VecForEachLevelInt(vGlob, vVec, i)
Definition: vecVec.h:71
static int Abc_Var2Lit(int Var, int fCompl)
Definition: abc_global.h:263
static Aig_Obj_t * Aig_ManObj(Aig_Man_t *p, int i)
Definition: aig.h:270
static int Saig_ObjIsLi(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: saig.h:85
static int Abc_LitIsCompl(int Lit)
Definition: abc_global.h:265
static void Vec_VecPushInt(Vec_Vec_t *p, int Level, int Entry)
Definition: vecVec.h:468
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
Definition: aig.h:274
Definition: aig.h:69
#define Vec_IntForEachEntryDouble(vVec, Entry1, Entry2, i)
Definition: vecInt.h:66
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
Definition: vecVec.h:276
static int Aig_ManRegNum(Aig_Man_t *p)
Definition: aig.h:260
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
unsigned int fPhase
Definition: aig.h:78
Aig_Man_t * Saig_ManDupWithCubes(Aig_Man_t *pAig, Vec_Vec_t *vReg2Value)
Definition: absOldCex.c:146
static int Abc_Lit2Var(int Lit)
Definition: abc_global.h:264
#define assert(ex)
Definition: util_old.h:213
static int Aig_ObjCioId(Aig_Obj_t *pObj)
Definition: aig.h:285
Saig_ManCba_t* Saig_ManCbaStart ( Aig_Man_t pAig,
Abc_Cex_t pCex,
int  nInputs,
int  fVerbose 
)

Function*************************************************************

Synopsis [Creates refinement manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 513 of file absOldCex.c.

514 {
515  Saig_ManCba_t * p;
516  p = ABC_CALLOC( Saig_ManCba_t, 1 );
517  p->pAig = pAig;
518  p->pCex = pCex;
519  p->nInputs = nInputs;
520  p->fVerbose = fVerbose;
521  return p;
522 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Saig_ManCba_t_ Saig_ManCba_t
DECLARATIONS ///.
Definition: absOldCex.c:31
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
void Saig_ManCbaStop ( Saig_ManCba_t p)

Function*************************************************************

Synopsis [Destroys refinement manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 535 of file absOldCex.c.

536 {
537  Vec_VecFreeP( &p->vReg2Frame );
538  Vec_VecFreeP( &p->vReg2Value );
539  Aig_ManStopP( &p->pFrames );
540  Vec_IntFreeP( &p->vMapPiF2A );
541  ABC_FREE( p );
542 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Aig_ManStopP(Aig_Man_t **p)
Definition: aigMan.c:246
static void Vec_IntFreeP(Vec_Int_t **p)
Definition: vecInt.h:289
#define ABC_FREE(obj)
Definition: abc_global.h:232
static void Vec_VecFreeP(Vec_Vec_t **p)
Definition: vecVec.h:367
void Saig_ManCbaUnrollCollect_rec ( Aig_Man_t pAig,
Aig_Obj_t pObj,
Vec_Int_t vObjs,
Vec_Int_t vRoots 
)

Function*************************************************************

Synopsis [Collect nodes in the unrolled timeframes.]

Description []

SideEffects []

SeeAlso []

Definition at line 371 of file absOldCex.c.

372 {
373  if ( Aig_ObjIsTravIdCurrent(pAig, pObj) )
374  return;
375  Aig_ObjSetTravIdCurrent(pAig, pObj);
376  if ( Aig_ObjIsCo(pObj) )
377  Saig_ManCbaUnrollCollect_rec( pAig, Aig_ObjFanin0(pObj), vObjs, vRoots );
378  else if ( Aig_ObjIsNode(pObj) )
379  {
380  Saig_ManCbaUnrollCollect_rec( pAig, Aig_ObjFanin0(pObj), vObjs, vRoots );
381  Saig_ManCbaUnrollCollect_rec( pAig, Aig_ObjFanin1(pObj), vObjs, vRoots );
382  }
383  if ( vRoots && Saig_ObjIsLo( pAig, pObj ) )
384  Vec_IntPush( vRoots, Aig_ObjId( Saig_ObjLoToLi(pAig, pObj) ) );
385  Vec_IntPush( vObjs, Aig_ObjId(pObj) );
386 }
static int Saig_ObjIsLo(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: saig.h:84
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:295
static Aig_Obj_t * Saig_ObjLoToLi(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: saig.h:86
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Definition: aig.h:308
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
Definition: aig.h:309
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:293
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
Definition: aig.h:280
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static int Aig_ObjId(Aig_Obj_t *pObj)
Definition: aig.h:286
void Saig_ManCbaUnrollCollect_rec(Aig_Man_t *pAig, Aig_Obj_t *pObj, Vec_Int_t *vObjs, Vec_Int_t *vRoots)
Definition: absOldCex.c:371
static int Aig_ObjIsCo(Aig_Obj_t *pObj)
Definition: aig.h:276
Aig_Man_t* Saig_ManCbaUnrollWithCex ( Aig_Man_t pAig,
Abc_Cex_t pCex,
int  nInputs,
Vec_Int_t **  pvMapPiF2A,
Vec_Vec_t **  pvReg2Frame 
)

Function*************************************************************

Synopsis [Derive unrolled timeframes.]

Description []

SideEffects []

SeeAlso []

Definition at line 399 of file absOldCex.c.

400 {
401  Aig_Man_t * pFrames; // unrolled timeframes
402  Vec_Vec_t * vFrameCos; // the list of COs per frame
403  Vec_Vec_t * vFrameObjs; // the list of objects per frame
404  Vec_Int_t * vRoots, * vObjs;
405  Aig_Obj_t * pObj;
406  int i, f;
407  // sanity checks
408  assert( Saig_ManPiNum(pAig) == pCex->nPis );
409 // assert( Saig_ManRegNum(pAig) == pCex->nRegs );
410  assert( pCex->iPo >= 0 && pCex->iPo < Saig_ManPoNum(pAig) );
411 
412  // map PIs of the unrolled frames into PIs of the original design
413  *pvMapPiF2A = Vec_IntAlloc( 1000 );
414 
415  // collect COs and Objs visited in each frame
416  vFrameCos = Vec_VecStart( pCex->iFrame+1 );
417  vFrameObjs = Vec_VecStart( pCex->iFrame+1 );
418  // initialized the topmost frame
419  pObj = Aig_ManCo( pAig, pCex->iPo );
420  Vec_VecPushInt( vFrameCos, pCex->iFrame, Aig_ObjId(pObj) );
421  for ( f = pCex->iFrame; f >= 0; f-- )
422  {
423  // collect nodes starting from the roots
424  Aig_ManIncrementTravId( pAig );
425  vRoots = Vec_VecEntryInt( vFrameCos, f );
426  Aig_ManForEachObjVec( vRoots, pAig, pObj, i )
427  Saig_ManCbaUnrollCollect_rec( pAig, pObj,
428  Vec_VecEntryInt(vFrameObjs, f),
429  (Vec_Int_t *)(f ? Vec_VecEntry(vFrameCos, f-1) : NULL) );
430  }
431 
432  // derive unrolled timeframes
433  pFrames = Aig_ManStart( 10000 );
434  pFrames->pName = Abc_UtilStrsav( pAig->pName );
435  pFrames->pSpec = Abc_UtilStrsav( pAig->pSpec );
436  // initialize the flops
437  if ( Saig_ManRegNum(pAig) == pCex->nRegs )
438  {
439  Saig_ManForEachLo( pAig, pObj, i )
440  pObj->pData = Aig_NotCond( Aig_ManConst1(pFrames), !Abc_InfoHasBit(pCex->pData, i) );
441  }
442  else // this is the case when synthesis was applied, assume all-0 init state
443  {
444  Saig_ManForEachLo( pAig, pObj, i )
445  pObj->pData = Aig_NotCond( Aig_ManConst1(pFrames), 1 );
446  }
447  // iterate through the frames
448  for ( f = 0; f <= pCex->iFrame; f++ )
449  {
450  // construct
451  vObjs = Vec_VecEntryInt( vFrameObjs, f );
452  Aig_ManForEachObjVec( vObjs, pAig, pObj, i )
453  {
454  if ( Aig_ObjIsNode(pObj) )
455  pObj->pData = Aig_And( pFrames, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) );
456  else if ( Aig_ObjIsCo(pObj) )
457  pObj->pData = Aig_ObjChild0Copy(pObj);
458  else if ( Aig_ObjIsConst1(pObj) )
459  pObj->pData = Aig_ManConst1(pFrames);
460  else if ( Saig_ObjIsPi(pAig, pObj) )
461  {
462  if ( Aig_ObjCioId(pObj) < nInputs )
463  {
464  int iBit = pCex->nRegs + f * pCex->nPis + Aig_ObjCioId(pObj);
465  pObj->pData = Aig_NotCond( Aig_ManConst1(pFrames), !Abc_InfoHasBit(pCex->pData, iBit) );
466  }
467  else
468  {
469  pObj->pData = Aig_ObjCreateCi( pFrames );
470  Vec_IntPush( *pvMapPiF2A, Aig_ObjCioId(pObj) );
471  Vec_IntPush( *pvMapPiF2A, f );
472  }
473  }
474  }
475  if ( f == pCex->iFrame )
476  break;
477  // transfer
478  vRoots = Vec_VecEntryInt( vFrameCos, f );
479  Aig_ManForEachObjVec( vRoots, pAig, pObj, i )
480  {
481  Saig_ObjLiToLo( pAig, pObj )->pData = pObj->pData;
482  if ( *pvReg2Frame )
483  {
484  Vec_VecPushInt( *pvReg2Frame, f, Aig_ObjId(pObj) ); // record LO
485  Vec_VecPushInt( *pvReg2Frame, f, Aig_ObjToLit((Aig_Obj_t *)pObj->pData) ); // record its literal
486  }
487  }
488  }
489  // create output
490  pObj = Aig_ManCo( pAig, pCex->iPo );
491  Aig_ObjCreateCo( pFrames, Aig_Not((Aig_Obj_t *)pObj->pData) );
492  Aig_ManSetRegNum( pFrames, 0 );
493  // cleanup
494  Vec_VecFree( vFrameCos );
495  Vec_VecFree( vFrameObjs );
496  // finallize
497  Aig_ManCleanup( pFrames );
498  // return
499  return pFrames;
500 }
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
Definition: aigObj.c:66
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition: vecVec.h:42
static int Saig_ManPoNum(Aig_Man_t *p)
Definition: saig.h:74
#define Aig_ManForEachObjVec(vIds, p, pObj, i)
Definition: aig.h:408
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static int Abc_InfoHasBit(unsigned *p, int i)
Definition: abc_global.h:258
void * pData
Definition: aig.h:87
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
Definition: aigMan.c:47
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigObj.c:45
static Aig_Obj_t * Aig_Not(Aig_Obj_t *p)
Definition: aig.h:247
static void Vec_VecFree(Vec_Vec_t *p)
Definition: vecVec.h:347
for(p=first;p->value< newval;p=p->next)
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
Definition: aigOper.c:104
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigUtil.c:44
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
Definition: aig.h:280
static void Vec_VecPushInt(Vec_Vec_t *p, int Level, int Entry)
Definition: vecVec.h:468
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
void Aig_ManSetRegNum(Aig_Man_t *p, int nRegs)
Definition: aigMan.c:438
static Aig_Obj_t * Saig_ObjLiToLo(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: saig.h:87
if(last==0)
Definition: sparse_int.h:34
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
Definition: aig.h:274
else
Definition: sparse_int.h:55
static Aig_Obj_t * Aig_ObjChild1Copy(Aig_Obj_t *pObj)
Definition: aig.h:313
Definition: aig.h:69
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
#define Saig_ManForEachLo(p, pObj, i)
Definition: saig.h:96
static Aig_Obj_t * Aig_ObjChild0Copy(Aig_Obj_t *pObj)
Definition: aig.h:312
static Vec_Vec_t * Vec_VecStart(int nSize)
Definition: vecVec.h:168
static int Saig_ManRegNum(Aig_Man_t *p)
Definition: saig.h:77
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
Definition: aig.h:264
static Vec_Int_t * Vec_VecEntryInt(Vec_Vec_t *p, int i)
Definition: vecVec.h:276
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
Definition: aig.h:267
static int Aig_ObjToLit(Aig_Obj_t *pObj)
Definition: aig.h:321
static int Saig_ManPiNum(Aig_Man_t *p)
MACRO DEFINITIONS ///.
Definition: saig.h:73
static int Aig_ObjId(Aig_Obj_t *pObj)
Definition: aig.h:286
#define assert(ex)
Definition: util_old.h:213
static Vec_Ptr_t * Vec_VecEntry(Vec_Vec_t *p, int i)
Definition: vecVec.h:271
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
Definition: aig.h:248
char * Abc_UtilStrsav(char *s)
Definition: starter.c:47
void Saig_ManCbaUnrollCollect_rec(Aig_Man_t *pAig, Aig_Obj_t *pObj, Vec_Int_t *vObjs, Vec_Int_t *vRoots)
Definition: absOldCex.c:371
static int Saig_ObjIsPi(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: saig.h:82
int Aig_ManCleanup(Aig_Man_t *p)
Definition: aigMan.c:265
static int Aig_ObjIsCo(Aig_Obj_t *pObj)
Definition: aig.h:276
static int Aig_ObjCioId(Aig_Obj_t *pObj)
Definition: aig.h:285
int Saig_ManCexVerifyUsingTernary ( Aig_Man_t pAig,
Abc_Cex_t pCex,
Abc_Cex_t pCare 
)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 647 of file absOldCex.c.

648 {
649  Aig_Obj_t * pObj, * pObjRi, * pObjRo;
650  int i, f, iBit = 0;
651  assert( pCex->iFrame == pCare->iFrame );
652  assert( pCex->nBits == pCare->nBits );
653  assert( pCex->iPo < Saig_ManPoNum(pAig) );
655  // set flops to the init state
656  Saig_ManForEachLo( pAig, pObj, i )
657  {
658  assert( !Abc_InfoHasBit(pCex->pData, iBit) );
659  assert( !Abc_InfoHasBit(pCare->pData, iBit) );
660 // if ( Abc_InfoHasBit(pCare->pData, iBit++) )
661  Saig_ObjCexMinSet0( pObj );
662 // else
663 // Saig_ObjCexMinSetX( pObj );
664  }
665  iBit = pCex->nRegs;
666  for ( f = 0; f <= pCex->iFrame; f++ )
667  {
668  // init inputs
669  Saig_ManForEachPi( pAig, pObj, i )
670  {
671  if ( Abc_InfoHasBit(pCare->pData, iBit++) )
672  {
673  if ( Abc_InfoHasBit(pCex->pData, iBit-1) )
674  Saig_ObjCexMinSet1( pObj );
675  else
676  Saig_ObjCexMinSet0( pObj );
677  }
678  else
679  Saig_ObjCexMinSetX( pObj );
680  }
681  // simulate internal nodes
682  Aig_ManForEachNode( pAig, pObj, i )
683  Saig_ObjCexMinSim( pObj );
684  // simulate COs
685  Aig_ManForEachCo( pAig, pObj, i )
686  Saig_ObjCexMinSim( pObj );
687 /*
688  Aig_ManForEachObj( pAig, pObj, i )
689  {
690  Aig_ObjPrint(pAig, pObj);
691  printf( " Value = " );
692  Saig_ObjCexMinPrint( pObj );
693  printf( "\n" );
694  }
695 */
696  // transfer
697  Saig_ManForEachLiLo( pAig, pObjRi, pObjRo, i )
698  pObjRo->fMarkA = pObjRi->fMarkA,
699  pObjRo->fMarkB = pObjRi->fMarkB;
700  }
701  assert( iBit == pCex->nBits );
702  return Saig_ObjCexMinGet1( Aig_ManCo( pAig, pCex->iPo ) );
703 }
static int Saig_ManPoNum(Aig_Man_t *p)
Definition: saig.h:74
static int Abc_InfoHasBit(unsigned *p, int i)
Definition: abc_global.h:258
#define Saig_ManForEachLiLo(p, pObjLi, pObjLo, i)
Definition: saig.h:101
#define Aig_ManForEachCo(p, pObj, i)
Definition: aig.h:398
#define Aig_ManForEachNode(p, pObj, i)
Definition: aig.h:413
static void Saig_ObjCexMinSet1(Aig_Obj_t *pObj)
Definition: absOldCex.c:589
Definition: aig.h:69
#define Saig_ManForEachLo(p, pObj, i)
Definition: saig.h:96
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
Definition: aig.h:264
static Aig_Obj_t * Aig_ManCo(Aig_Man_t *p, int i)
Definition: aig.h:267
static int Saig_ObjCexMinGet1(Aig_Obj_t *pObj)
Definition: absOldCex.c:593
static void Saig_ObjCexMinSet0(Aig_Obj_t *pObj)
Definition: absOldCex.c:588
static void Saig_ObjCexMinSetX(Aig_Obj_t *pObj)
Definition: absOldCex.c:590
static void Saig_ObjCexMinSim(Aig_Obj_t *pObj)
Definition: absOldCex.c:602
#define assert(ex)
Definition: util_old.h:213
#define Saig_ManForEachPi(p, pObj, i)
Definition: saig.h:91
Aig_Man_t* Saig_ManDupWithCubes ( Aig_Man_t pAig,
Vec_Vec_t vReg2Value 
)

Function*************************************************************

Synopsis [Duplicate with literals.]

Description []

SideEffects []

SeeAlso []

Definition at line 146 of file absOldCex.c.

147 {
148  Vec_Int_t * vLevel;
149  Aig_Man_t * pAigNew;
150  Aig_Obj_t * pObj, * pMiter;
151  int i, k, Lit;
152  assert( pAig->nConstrs == 0 );
153  // start the new manager
154  pAigNew = Aig_ManStart( Aig_ManNodeNum(pAig) + Vec_VecSizeSize(vReg2Value) );
155  pAigNew->pName = Abc_UtilStrsav( pAig->pName );
156  // map the constant node
157  Aig_ManConst1(pAig)->pData = Aig_ManConst1( pAigNew );
158  // create variables for PIs
159  Aig_ManForEachCi( pAig, pObj, i )
160  pObj->pData = Aig_ObjCreateCi( pAigNew );
161  // add internal nodes of this frame
162  Aig_ManForEachNode( pAig, pObj, i )
163  pObj->pData = Aig_And( pAigNew, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) );
164  // create POs for cubes
165  Vec_VecForEachLevelInt( vReg2Value, vLevel, i )
166  {
167  pMiter = Aig_ManConst1( pAigNew );
168  Vec_IntForEachEntry( vLevel, Lit, k )
169  {
170  pObj = Saig_ManLi( pAig, Abc_Lit2Var(Lit) );
171  pMiter = Aig_And( pAigNew, pMiter, Aig_NotCond(Aig_ObjChild0Copy(pObj), Abc_LitIsCompl(Lit)) );
172  }
173  Aig_ObjCreateCo( pAigNew, pMiter );
174  }
175  // transfer to register outputs
176  Saig_ManForEachLi( pAig, pObj, i )
177  Aig_ObjCreateCo( pAigNew, Aig_ObjChild0Copy(pObj) );
178  // finalize
179  Aig_ManCleanup( pAigNew );
180  Aig_ManSetRegNum( pAigNew, Aig_ManRegNum(pAig) );
181  return pAigNew;
182 }
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
Definition: aigObj.c:66
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
void * pData
Definition: aig.h:87
#define Vec_VecForEachLevelInt(vGlob, vVec, i)
Definition: vecVec.h:71
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
Definition: aigMan.c:47
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Definition: aig.h:393
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigObj.c:45
static int Aig_ManNodeNum(Aig_Man_t *p)
Definition: aig.h:256
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
Definition: aigOper.c:104
static int Abc_LitIsCompl(int Lit)
Definition: abc_global.h:265
#define Aig_ManForEachNode(p, pObj, i)
Definition: aig.h:413
void Aig_ManSetRegNum(Aig_Man_t *p, int nRegs)
Definition: aigMan.c:438
#define Saig_ManForEachLi(p, pObj, i)
Definition: saig.h:98
static Aig_Obj_t * Aig_ObjChild1Copy(Aig_Obj_t *pObj)
Definition: aig.h:313
static Aig_Obj_t * Saig_ManLi(Aig_Man_t *p, int i)
Definition: saig.h:80
Definition: aig.h:69
static Aig_Obj_t * Aig_ObjChild0Copy(Aig_Obj_t *pObj)
Definition: aig.h:312
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
Definition: aig.h:264
static int Aig_ManRegNum(Aig_Man_t *p)
Definition: aig.h:260
static int Vec_VecSizeSize(Vec_Vec_t *p)
Definition: vecVec.h:417
static int Abc_Lit2Var(int Lit)
Definition: abc_global.h:264
#define assert(ex)
Definition: util_old.h:213
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
Definition: aig.h:248
char * Abc_UtilStrsav(char *s)
Definition: starter.c:47
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
int Aig_ManCleanup(Aig_Man_t *p)
Definition: aigMan.c:265
static int Saig_ObjCexMinGet0 ( Aig_Obj_t pObj)
inlinestatic

Definition at line 592 of file absOldCex.c.

592 { return pObj->fMarkA && !pObj->fMarkB; }
unsigned int fMarkB
Definition: aig.h:80
unsigned int fMarkA
Definition: aig.h:79
static int Saig_ObjCexMinGet0Fanin0 ( Aig_Obj_t pObj)
inlinestatic

Definition at line 596 of file absOldCex.c.

596 { return (Saig_ObjCexMinGet1(Aig_ObjFanin0(pObj)) && Aig_ObjFaninC0(pObj)) || (Saig_ObjCexMinGet0(Aig_ObjFanin0(pObj)) && !Aig_ObjFaninC0(pObj)); }
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Definition: aig.h:308
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
Definition: aig.h:306
static int Saig_ObjCexMinGet1(Aig_Obj_t *pObj)
Definition: absOldCex.c:593
static int Saig_ObjCexMinGet0(Aig_Obj_t *pObj)
Definition: absOldCex.c:592
static int Saig_ObjCexMinGet0Fanin1 ( Aig_Obj_t pObj)
inlinestatic

Definition at line 599 of file absOldCex.c.

599 { return (Saig_ObjCexMinGet1(Aig_ObjFanin1(pObj)) && Aig_ObjFaninC1(pObj)) || (Saig_ObjCexMinGet0(Aig_ObjFanin1(pObj)) && !Aig_ObjFaninC1(pObj)); }
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
Definition: aig.h:309
static int Saig_ObjCexMinGet1(Aig_Obj_t *pObj)
Definition: absOldCex.c:593
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
Definition: aig.h:307
static int Saig_ObjCexMinGet0(Aig_Obj_t *pObj)
Definition: absOldCex.c:592
static int Saig_ObjCexMinGet1 ( Aig_Obj_t pObj)
inlinestatic

Definition at line 593 of file absOldCex.c.

593 { return !pObj->fMarkA && pObj->fMarkB; }
unsigned int fMarkB
Definition: aig.h:80
unsigned int fMarkA
Definition: aig.h:79
static int Saig_ObjCexMinGet1Fanin0 ( Aig_Obj_t pObj)
inlinestatic

Definition at line 597 of file absOldCex.c.

597 { return (Saig_ObjCexMinGet0(Aig_ObjFanin0(pObj)) && Aig_ObjFaninC0(pObj)) || (Saig_ObjCexMinGet1(Aig_ObjFanin0(pObj)) && !Aig_ObjFaninC0(pObj)); }
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Definition: aig.h:308
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
Definition: aig.h:306
static int Saig_ObjCexMinGet1(Aig_Obj_t *pObj)
Definition: absOldCex.c:593
static int Saig_ObjCexMinGet0(Aig_Obj_t *pObj)
Definition: absOldCex.c:592
static int Saig_ObjCexMinGet1Fanin1 ( Aig_Obj_t pObj)
inlinestatic

Definition at line 600 of file absOldCex.c.

600 { return (Saig_ObjCexMinGet0(Aig_ObjFanin1(pObj)) && Aig_ObjFaninC1(pObj)) || (Saig_ObjCexMinGet1(Aig_ObjFanin1(pObj)) && !Aig_ObjFaninC1(pObj)); }
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
Definition: aig.h:309
static int Saig_ObjCexMinGet1(Aig_Obj_t *pObj)
Definition: absOldCex.c:593
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
Definition: aig.h:307
static int Saig_ObjCexMinGet0(Aig_Obj_t *pObj)
Definition: absOldCex.c:592
static int Saig_ObjCexMinGetX ( Aig_Obj_t pObj)
inlinestatic

Definition at line 594 of file absOldCex.c.

594 { return pObj->fMarkA && pObj->fMarkB; }
unsigned int fMarkB
Definition: aig.h:80
unsigned int fMarkA
Definition: aig.h:79
static void Saig_ObjCexMinPrint ( Aig_Obj_t pObj)
inlinestatic

Definition at line 625 of file absOldCex.c.

626 {
627  if ( Saig_ObjCexMinGet0(pObj) )
628  printf( "0" );
629  else if ( Saig_ObjCexMinGet1(pObj) )
630  printf( "1" );
631  else if ( Saig_ObjCexMinGetX(pObj) )
632  printf( "X" );
633 }
static int Saig_ObjCexMinGetX(Aig_Obj_t *pObj)
Definition: absOldCex.c:594
static int Saig_ObjCexMinGet1(Aig_Obj_t *pObj)
Definition: absOldCex.c:593
static int Saig_ObjCexMinGet0(Aig_Obj_t *pObj)
Definition: absOldCex.c:592
static void Saig_ObjCexMinSet0 ( Aig_Obj_t pObj)
inlinestatic

Definition at line 588 of file absOldCex.c.

588 { pObj->fMarkA = 1; pObj->fMarkB = 0; }
unsigned int fMarkB
Definition: aig.h:80
unsigned int fMarkA
Definition: aig.h:79
static void Saig_ObjCexMinSet1 ( Aig_Obj_t pObj)
inlinestatic

Definition at line 589 of file absOldCex.c.

589 { pObj->fMarkA = 0; pObj->fMarkB = 1; }
unsigned int fMarkB
Definition: aig.h:80
unsigned int fMarkA
Definition: aig.h:79
static void Saig_ObjCexMinSetX ( Aig_Obj_t pObj)
inlinestatic

Definition at line 590 of file absOldCex.c.

590 { pObj->fMarkA = 1; pObj->fMarkB = 1; }
unsigned int fMarkB
Definition: aig.h:80
unsigned int fMarkA
Definition: aig.h:79
static void Saig_ObjCexMinSim ( Aig_Obj_t pObj)
inlinestatic

Definition at line 602 of file absOldCex.c.

603 {
604  if ( Aig_ObjIsAnd(pObj) )
605  {
607  Saig_ObjCexMinSet0( pObj );
608  else if ( Saig_ObjCexMinGet1Fanin0(pObj) && Saig_ObjCexMinGet1Fanin1(pObj) )
609  Saig_ObjCexMinSet1( pObj );
610  else
611  Saig_ObjCexMinSetX( pObj );
612  }
613  else if ( Aig_ObjIsCo(pObj) )
614  {
615  if ( Saig_ObjCexMinGet0Fanin0(pObj) )
616  Saig_ObjCexMinSet0( pObj );
617  else if ( Saig_ObjCexMinGet1Fanin0(pObj) )
618  Saig_ObjCexMinSet1( pObj );
619  else
620  Saig_ObjCexMinSetX( pObj );
621  }
622  else assert( 0 );
623 }
static int Saig_ObjCexMinGet0Fanin0(Aig_Obj_t *pObj)
Definition: absOldCex.c:596
static int Saig_ObjCexMinGet0Fanin1(Aig_Obj_t *pObj)
Definition: absOldCex.c:599
static int Saig_ObjCexMinGet1Fanin1(Aig_Obj_t *pObj)
Definition: absOldCex.c:600
static void Saig_ObjCexMinSet1(Aig_Obj_t *pObj)
Definition: absOldCex.c:589
static void Saig_ObjCexMinSet0(Aig_Obj_t *pObj)
Definition: absOldCex.c:588
static void Saig_ObjCexMinSetX(Aig_Obj_t *pObj)
Definition: absOldCex.c:590
#define assert(ex)
Definition: util_old.h:213
static int Saig_ObjCexMinGet1Fanin0(Aig_Obj_t *pObj)
Definition: absOldCex.c:597
static int Aig_ObjIsCo(Aig_Obj_t *pObj)
Definition: aig.h:276
static int Aig_ObjIsAnd(Aig_Obj_t *pObj)
Definition: aig.h:278