abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
aigJust.c File Reference
#include "aig.h"

Go to the source code of this file.

Macros

#define AIG_VAL0   1
 DECLARATIONS ///. More...
 
#define AIG_VAL1   2
 
#define AIG_VALX   3
 

Typedefs

typedef struct Aig_ManPack_t_ Aig_ManPack_t
 

Functions

static int Aig_ObjSetTerValue (Aig_Obj_t *pNode, int Value)
 
static int Aig_ObjGetTerValue (Aig_Obj_t *pNode)
 
static int Aig_ObjNotTerValue (int Value)
 
static int Aig_ObjAndTerValue (int Value0, int Value1)
 
static int Aig_ObjNotCondTerValue (int Value, int Cond)
 
static int Aig_ObjSatValue (Aig_Man_t *pAig, Aig_Obj_t *pNode, int fCompl)
 FUNCTION DEFINITIONS ///. More...
 
int Aig_NtkFindSatAssign_rec (Aig_Man_t *pAig, Aig_Obj_t *pNode, int Value, Vec_Int_t *vSuppLits, int Heur)
 
int Aig_ObjFindSatAssign (Aig_Man_t *pAig, Aig_Obj_t *pNode, int Value, Vec_Int_t *vSuppLits)
 
int Aig_ObjTerSimulate_rec (Aig_Man_t *pAig, Aig_Obj_t *pNode)
 
int Aig_ObjTerSimulate (Aig_Man_t *pAig, Aig_Obj_t *pNode, Vec_Int_t *vSuppLits)
 
Aig_ManPack_tAig_ManPackStart (Aig_Man_t *pAig)
 
void Aig_ManPackStop (Aig_ManPack_t *p)
 
void Aig_ManPackAddPattern (Aig_ManPack_t *p, Vec_Int_t *vLits)
 
Vec_Int_tAig_ManPackConstNodes (Aig_ManPack_t *p)
 
void Aig_ManJustExperiment (Aig_Man_t *pAig)
 

Macro Definition Documentation

#define AIG_VAL0   1

DECLARATIONS ///.

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

FileName [aigJust.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [AIG package.]

Synopsis [Justification of node values.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - April 28, 2007.]

Revision [

Id:
aigJust.c,v 1.00 2007/04/28 00:00:00 alanmi Exp

]

Definition at line 30 of file aigJust.c.

#define AIG_VAL1   2

Definition at line 31 of file aigJust.c.

#define AIG_VALX   3

Definition at line 32 of file aigJust.c.

Typedef Documentation

typedef struct Aig_ManPack_t_ Aig_ManPack_t

Definition at line 234 of file aigJust.c.

Function Documentation

void Aig_ManJustExperiment ( Aig_Man_t pAig)

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

Synopsis [Testing of the framework.]

Description []

SideEffects []

SeeAlso []

Definition at line 251 of file aigJust.c.

252 {
253  Aig_ManPack_t * pPack;
254  Vec_Int_t * vSuppLits, * vNodes;
255  Aig_Obj_t * pObj;
256  int i;
257  abctime clk = Abc_Clock();
258  int Count0 = 0, Count0f = 0, Count1 = 0, Count1f = 0;
259  int nTotalLits = 0;
260  vSuppLits = Vec_IntAlloc( 100 );
261  pPack = Aig_ManPackStart( pAig );
262  vNodes = Aig_ManPackConstNodes( pPack );
263 // Aig_ManForEachCo( pAig, pObj, i )
264  Aig_ManForEachObjVec( vNodes, pAig, pObj, i )
265  {
266  if ( pObj->fPhase ) // const 1
267  {
268  if ( Aig_ObjFindSatAssign(pAig, pObj, 0, vSuppLits) )
269  {
270 // assert( Aig_ObjTerSimulate(pAig, pObj, vSuppLits) == AIG_VAL0 );
271 // if ( Aig_ObjTerSimulate(pAig, pObj, vSuppLits) != AIG_VAL0 )
272 // printf( "Justification error!\n" );
273  Count0++;
274  nTotalLits += Vec_IntSize(vSuppLits);
275  Aig_ManPackAddPattern( pPack, vSuppLits );
276  }
277  else
278  Count0f++;
279  }
280  else
281  {
282  if ( Aig_ObjFindSatAssign(pAig, pObj, 1, vSuppLits) )
283  {
284 // assert( Aig_ObjTerSimulate(pAig, pObj, vSuppLits) == AIG_VAL1 );
285 // if ( Aig_ObjTerSimulate(pAig, pObj, vSuppLits) != AIG_VAL1 )
286 // printf( "Justification error!\n" );
287  Count1++;
288  nTotalLits += Vec_IntSize(vSuppLits);
289  Aig_ManPackAddPattern( pPack, vSuppLits );
290  }
291  else
292  Count1f++;
293  }
294  }
295  Vec_IntFree( vSuppLits );
296  printf( "PO =%6d. C0 =%6d. C0f =%6d. C1 =%6d. C1f =%6d. (%6.2f %%) Ave =%4.1f ",
297  Aig_ManCoNum(pAig), Count0, Count0f, Count1, Count1f, 100.0*(Count0+Count1)/Aig_ManCoNum(pAig), 1.0*nTotalLits/(Count0+Count1) );
298  Abc_PrintTime( 1, "T", Abc_Clock() - clk );
299  Aig_ManCleanMarkAB( pAig );
300  Aig_ManPackStop( pPack );
301  Vec_IntFree( vNodes );
302 }
#define Aig_ManForEachObjVec(vIds, p, pObj, i)
Definition: aig.h:408
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
int Aig_ObjFindSatAssign(Aig_Man_t *pAig, Aig_Obj_t *pNode, int Value, Vec_Int_t *vSuppLits)
Definition: aigJust.c:162
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 int Aig_ManCoNum(Aig_Man_t *p)
Definition: aig.h:252
void Aig_ManPackStop(Aig_ManPack_t *p)
Definition: aigPack.c:391
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
Definition: aig.h:69
void Aig_ManPackAddPattern(Aig_ManPack_t *p, Vec_Int_t *vLits)
Definition: aigPack.c:326
Vec_Int_t * Aig_ManPackConstNodes(Aig_ManPack_t *p)
Definition: aigPack.c:264
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
unsigned int fPhase
Definition: aig.h:78
void Aig_ManCleanMarkAB(Aig_Man_t *p)
Definition: aigUtil.c:186
Aig_ManPack_t * Aig_ManPackStart(Aig_Man_t *pAig)
Definition: aigPack.c:370
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
ABC_INT64_T abctime
Definition: abc_global.h:278
void Aig_ManPackAddPattern ( Aig_ManPack_t p,
Vec_Int_t vLits 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 326 of file aigPack.c.

327 {
328  int k;
329  for ( k = 1; k < 64; k++ )
330  if ( Aig_ManPackAddPatternTry( p, k, vLits ) )
331  break;
332  if ( k == 64 )
333  {
334 /*
335  word * pInfo, * pPres;
336  int i, Lit;
337  Vec_IntForEachEntry( vLits, Lit, i )
338  printf( "%d", Abc_LitIsCompl(Lit) );
339  printf( "\n\n" );
340  for ( k = 1; k < 64; k++ )
341  {
342  Vec_IntForEachEntry( vLits, Lit, i )
343  {
344  pInfo = Vec_WrdEntryP( p->vPiPats, Abc_Lit2Var(Lit) );
345  pPres = Vec_WrdEntryP( p->vPiCare, Abc_Lit2Var(Lit) );
346  if ( Abc_InfoHasBit( (unsigned *)pPres, k ) )
347  printf( "%d", Abc_InfoHasBit( (unsigned *)pInfo, k ) );
348  else
349  printf( "-" );
350  }
351  printf( "\n" );
352  }
353 */
354  p->nPatSkip++;
355  }
356  p->nPatTotal++;
357 }
int nPatTotal
Definition: aigPack.c:41
int nPatSkip
Definition: aigPack.c:42
int Aig_ManPackAddPatternTry(Aig_ManPack_t *p, int iBit, Vec_Int_t *vLits)
Definition: aigPack.c:292
Vec_Int_t* Aig_ManPackConstNodes ( Aig_ManPack_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 264 of file aigPack.c.

265 {
266  Vec_Int_t * vNodes;
267  Aig_Obj_t * pObj;
268  word Sign;
269  int i;
270  vNodes = Vec_IntAlloc( 1000 );
271  Aig_ManForEachNode( p->pAig, pObj, i )
272  {
273  Sign = Vec_WrdEntry( p->vSigns, Aig_ObjId(pObj) );
274  if ( Sign == 0 || ~Sign == 0 || Aig_Word6HasOneBit(Sign) || Aig_Word6HasOneBit(~Sign) )
275  Vec_IntPush( vNodes, Aig_ObjId(pObj) );
276  }
277  return vNodes;
278 }
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
Aig_Man_t * pAig
Definition: aigPack.c:34
#define Aig_ManForEachNode(p, pObj, i)
Definition: aig.h:413
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
Vec_Wrd_t * vSigns
Definition: aigPack.c:35
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
Definition: aig.h:69
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static word Vec_WrdEntry(Vec_Wrd_t *p, int i)
Definition: vecWrd.h:384
static int Aig_Word6HasOneBit(word t)
Definition: aigPack.c:47
static int Aig_ObjId(Aig_Obj_t *pObj)
Definition: aig.h:286
Aig_ManPack_t* Aig_ManPackStart ( Aig_Man_t pAig)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 370 of file aigPack.c.

371 {
372  Aig_ManPack_t * p;
373  p = Aig_ManPackAlloc( pAig );
375  Aig_ManPackSimulate( p );
377  return p;
378 }
Aig_ManPack_t * Aig_ManPackAlloc(Aig_Man_t *pAig)
FUNCTION DEFINITIONS ///.
Definition: aigPack.c:65
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Aig_ManPackPrintStats(Aig_ManPack_t *p)
Definition: aigPack.c:227
void Aig_ManPackSetRandom(Aig_ManPack_t *p)
Definition: aigPack.c:159
void Aig_ManPackSimulate(Aig_ManPack_t *p)
Definition: aigPack.c:182
void Aig_ManPackStop ( Aig_ManPack_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 391 of file aigPack.c.

392 {
393  Aig_ManPackSimulate( p );
395  Aig_ManPackFree( p );
396 }
void Aig_ManPackPrintStats(Aig_ManPack_t *p)
Definition: aigPack.c:227
void Aig_ManPackFree(Aig_ManPack_t *p)
Definition: aigPack.c:134
void Aig_ManPackSimulate(Aig_ManPack_t *p)
Definition: aigPack.c:182
int Aig_NtkFindSatAssign_rec ( Aig_Man_t pAig,
Aig_Obj_t pNode,
int  Value,
Vec_Int_t vSuppLits,
int  Heur 
)

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

Synopsis [Recursively searched for a satisfying assignment.]

Description []

SideEffects []

SeeAlso []

Definition at line 102 of file aigJust.c.

103 {
104  int Value0, Value1;
105 // ++Heur;
106  if ( Aig_ObjIsConst1(pNode) )
107  return 1;
108  if ( Aig_ObjIsTravIdCurrent(pAig, pNode) )
109  return ((int)pNode->fMarkA == Value);
110  Aig_ObjSetTravIdCurrent(pAig, pNode);
111  pNode->fMarkA = Value;
112  if ( Aig_ObjIsCi(pNode) )
113  {
114 // if ( Aig_ObjId(pNode) % 1000 == 0 )
115 // Value ^= 1;
116  if ( vSuppLits )
117  Vec_IntPush( vSuppLits, Abc_Var2Lit( Aig_ObjCioId(pNode), !Value ) );
118  return 1;
119  }
120  assert( Aig_ObjIsNode(pNode) );
121  // propagation
122  if ( Value )
123  {
124  if ( !Aig_NtkFindSatAssign_rec(pAig, Aig_ObjFanin0(pNode), !Aig_ObjFaninC0(pNode), vSuppLits, Heur) )
125  return 0;
126  return Aig_NtkFindSatAssign_rec(pAig, Aig_ObjFanin1(pNode), !Aig_ObjFaninC1(pNode), vSuppLits, Heur);
127  }
128  // justification
129  Value0 = Aig_ObjSatValue( pAig, Aig_ObjFanin0(pNode), Aig_ObjFaninC0(pNode) );
130  if ( Value0 == AIG_VAL0 )
131  return 1;
132  Value1 = Aig_ObjSatValue( pAig, Aig_ObjFanin1(pNode), Aig_ObjFaninC1(pNode) );
133  if ( Value1 == AIG_VAL0 )
134  return 1;
135  if ( Value0 == AIG_VAL1 && Value1 == AIG_VAL1 )
136  return 0;
137  if ( Value0 == AIG_VAL1 )
138  return Aig_NtkFindSatAssign_rec(pAig, Aig_ObjFanin1(pNode), Aig_ObjFaninC1(pNode), vSuppLits, Heur);
139  if ( Value1 == AIG_VAL1 )
140  return Aig_NtkFindSatAssign_rec(pAig, Aig_ObjFanin0(pNode), Aig_ObjFaninC0(pNode), vSuppLits, Heur);
141  assert( Value0 == AIG_VALX && Value1 == AIG_VALX );
142  // decision making
143 // if ( rand() % 10 == Heur )
144 // if ( Aig_ObjId(pNode) % 8 == Heur )
145  if ( ++Heur % 8 == 0 )
146  return Aig_NtkFindSatAssign_rec(pAig, Aig_ObjFanin1(pNode), Aig_ObjFaninC1(pNode), vSuppLits, Heur);
147  else
148  return Aig_NtkFindSatAssign_rec(pAig, Aig_ObjFanin0(pNode), Aig_ObjFaninC0(pNode), vSuppLits, Heur);
149 }
#define AIG_VAL1
Definition: aigJust.c:31
static int Aig_ObjSatValue(Aig_Man_t *pAig, Aig_Obj_t *pNode, int fCompl)
FUNCTION DEFINITIONS ///.
Definition: aigJust.c:84
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 Abc_Var2Lit(int Var, int fCompl)
Definition: abc_global.h:263
unsigned int fMarkA
Definition: aig.h:79
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
#define AIG_VAL0
DECLARATIONS ///.
Definition: aigJust.c:30
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
Definition: aig.h:280
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
#define AIG_VALX
Definition: aigJust.c:32
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
Definition: aig.h:307
#define assert(ex)
Definition: util_old.h:213
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
Definition: aig.h:275
int Aig_NtkFindSatAssign_rec(Aig_Man_t *pAig, Aig_Obj_t *pNode, int Value, Vec_Int_t *vSuppLits, int Heur)
Definition: aigJust.c:102
static int Aig_ObjCioId(Aig_Obj_t *pObj)
Definition: aig.h:285
static int Aig_ObjAndTerValue ( int  Value0,
int  Value1 
)
inlinestatic

Definition at line 56 of file aigJust.c.

57 {
58  if ( Value0 == AIG_VAL0 || Value1 == AIG_VAL0 )
59  return AIG_VAL0;
60  if ( Value0 == AIG_VAL1 && Value1 == AIG_VAL1 )
61  return AIG_VAL1;
62  return AIG_VALX;
63 }
#define AIG_VAL1
Definition: aigJust.c:31
#define AIG_VAL0
DECLARATIONS ///.
Definition: aigJust.c:30
#define AIG_VALX
Definition: aigJust.c:32
int Aig_ObjFindSatAssign ( Aig_Man_t pAig,
Aig_Obj_t pNode,
int  Value,
Vec_Int_t vSuppLits 
)

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

Synopsis [Returns 1 if SAT assignment is found; 0 otherwise.]

Description []

SideEffects []

SeeAlso []

Definition at line 162 of file aigJust.c.

163 {
164  int i;
165  if ( Aig_ObjIsCo(pNode) )
166  return Aig_ObjFindSatAssign( pAig, Aig_ObjFanin0(pNode), Value ^ Aig_ObjFaninC0(pNode), vSuppLits );
167  for ( i = 0; i < 8; i++ )
168  {
169  Vec_IntClear( vSuppLits );
170  Aig_ManIncrementTravId( pAig );
171  if ( Aig_NtkFindSatAssign_rec( pAig, pNode, Value, vSuppLits, i ) )
172  return 1;
173  }
174  return 0;
175 }
int Aig_ObjFindSatAssign(Aig_Man_t *pAig, Aig_Obj_t *pNode, int Value, Vec_Int_t *vSuppLits)
Definition: aigJust.c:162
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Definition: aig.h:308
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigUtil.c:44
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
Definition: aig.h:306
static void Vec_IntClear(Vec_Int_t *p)
Definition: bblif.c:452
int Aig_NtkFindSatAssign_rec(Aig_Man_t *pAig, Aig_Obj_t *pNode, int Value, Vec_Int_t *vSuppLits, int Heur)
Definition: aigJust.c:102
static int Aig_ObjIsCo(Aig_Obj_t *pObj)
Definition: aig.h:276
static int Aig_ObjGetTerValue ( Aig_Obj_t pNode)
inlinestatic

Definition at line 42 of file aigJust.c.

43 {
44  return (pNode->fMarkB << 1) | pNode->fMarkA;
45 }
unsigned int fMarkB
Definition: aig.h:80
unsigned int fMarkA
Definition: aig.h:79
static int Aig_ObjNotCondTerValue ( int  Value,
int  Cond 
)
inlinestatic

Definition at line 64 of file aigJust.c.

65 {
66  return Cond ? Aig_ObjNotTerValue( Value ) : Value;
67 }
static int Aig_ObjNotTerValue(int Value)
Definition: aigJust.c:48
static int Aig_ObjNotTerValue ( int  Value)
inlinestatic

Definition at line 48 of file aigJust.c.

49 {
50  if ( Value == AIG_VAL1 )
51  return AIG_VAL0;
52  if ( Value == AIG_VAL0 )
53  return AIG_VAL1;
54  return AIG_VALX;
55 }
#define AIG_VAL1
Definition: aigJust.c:31
#define AIG_VAL0
DECLARATIONS ///.
Definition: aigJust.c:30
#define AIG_VALX
Definition: aigJust.c:32
static int Aig_ObjSatValue ( Aig_Man_t pAig,
Aig_Obj_t pNode,
int  fCompl 
)
inlinestatic

FUNCTION DEFINITIONS ///.

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

Synopsis [Returns value (0 or 1) or X if unassigned.]

Description []

SideEffects []

SeeAlso []

Definition at line 84 of file aigJust.c.

85 {
86  if ( Aig_ObjIsTravIdCurrent(pAig, pNode) )
87  return (pNode->fMarkA ^ fCompl) ? AIG_VAL1 : AIG_VAL0;
88  return AIG_VALX;
89 }
#define AIG_VAL1
Definition: aigJust.c:31
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:295
unsigned int fMarkA
Definition: aig.h:79
#define AIG_VAL0
DECLARATIONS ///.
Definition: aigJust.c:30
#define AIG_VALX
Definition: aigJust.c:32
static int Aig_ObjSetTerValue ( Aig_Obj_t pNode,
int  Value 
)
inlinestatic

Definition at line 35 of file aigJust.c.

36 {
37  assert( Value );
38  pNode->fMarkA = (Value & 1);
39  pNode->fMarkB = ((Value >> 1) & 1);
40  return Value;
41 }
unsigned int fMarkB
Definition: aig.h:80
unsigned int fMarkA
Definition: aig.h:79
#define assert(ex)
Definition: util_old.h:213
int Aig_ObjTerSimulate ( Aig_Man_t pAig,
Aig_Obj_t pNode,
Vec_Int_t vSuppLits 
)

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

Synopsis [Returns value of the object under input assignment.]

Description []

SideEffects []

SeeAlso []

Definition at line 217 of file aigJust.c.

218 {
219  Aig_Obj_t * pObj;
220  int i, Entry;
221  Aig_ManIncrementTravId( pAig );
222  Vec_IntForEachEntry( vSuppLits, Entry, i )
223  {
224  pObj = Aig_ManCi( pAig, Abc_Lit2Var(Entry) );
226  Aig_ObjSetTravIdCurrent( pAig, pObj );
227 //printf( "%d ", Entry );
228  }
229 //printf( "\n" );
230  return Aig_ObjTerSimulate_rec( pAig, pNode );
231 }
#define AIG_VAL1
Definition: aigJust.c:31
int Aig_ObjTerSimulate_rec(Aig_Man_t *pAig, Aig_Obj_t *pNode)
Definition: aigJust.c:188
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
Definition: aig.h:293
#define AIG_VAL0
DECLARATIONS ///.
Definition: aigJust.c:30
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
Definition: aigUtil.c:44
static int Abc_LitIsCompl(int Lit)
Definition: abc_global.h:265
static Aig_Obj_t * Aig_ManCi(Aig_Man_t *p, int i)
Definition: aig.h:266
Definition: aig.h:69
static int Aig_ObjSetTerValue(Aig_Obj_t *pNode, int Value)
Definition: aigJust.c:35
static int Abc_Lit2Var(int Lit)
Definition: abc_global.h:264
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition: vecInt.h:54
int Aig_ObjTerSimulate_rec ( Aig_Man_t pAig,
Aig_Obj_t pNode 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 188 of file aigJust.c.

189 {
190  int Value0, Value1;
191  if ( Aig_ObjIsConst1(pNode) )
192  return AIG_VAL1;
193  if ( Aig_ObjIsTravIdCurrent(pAig, pNode) )
194  return Aig_ObjGetTerValue( pNode );
195  Aig_ObjSetTravIdCurrent( pAig, pNode );
196  if ( Aig_ObjIsCi(pNode) )
197  return Aig_ObjSetTerValue( pNode, AIG_VALX );
199  if ( Aig_ObjIsCo(pNode) || Value0 == AIG_VAL0 )
200  return Aig_ObjSetTerValue( pNode, Value0 );
201  assert( Aig_ObjIsNode(pNode) );
203  return Aig_ObjSetTerValue( pNode, Aig_ObjAndTerValue(Value0, Value1) );
204 }
#define AIG_VAL1
Definition: aigJust.c:31
static int Aig_ObjAndTerValue(int Value0, int Value1)
Definition: aigJust.c:56
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_ObjNotCondTerValue(int Value, int Cond)
Definition: aigJust.c:64
int Aig_ObjTerSimulate_rec(Aig_Man_t *pAig, Aig_Obj_t *pNode)
Definition: aigJust.c:188
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
#define AIG_VAL0
DECLARATIONS ///.
Definition: aigJust.c:30
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
Definition: aig.h:280
static int Aig_ObjIsConst1(Aig_Obj_t *pObj)
Definition: aig.h:274
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
Definition: aig.h:306
#define AIG_VALX
Definition: aigJust.c:32
static int Aig_ObjSetTerValue(Aig_Obj_t *pNode, int Value)
Definition: aigJust.c:35
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
Definition: aig.h:307
#define assert(ex)
Definition: util_old.h:213
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
Definition: aig.h:275
static int Aig_ObjIsCo(Aig_Obj_t *pObj)
Definition: aig.h:276
static int Aig_ObjGetTerValue(Aig_Obj_t *pNode)
Definition: aigJust.c:42