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

Go to the source code of this file.

Data Structures

struct  Cbs0_Par_t_
 
struct  Cbs0_Que_t_
 
struct  Cbs0_Man_t_
 

Macros

#define Cbs0_QueForEachEntry(Que, pObj, i)   for ( i = (Que).iHead; (i < (Que).iTail) && ((pObj) = (Que).pData[i]); i++ )
 

Typedefs

typedef
typedefABC_NAMESPACE_IMPL_START
struct Cbs0_Par_t_ 
Cbs0_Par_t
 DECLARATIONS ///. More...
 
typedef struct Cbs0_Que_t_ Cbs0_Que_t
 
typedef struct Cbs0_Man_t_ Cbs0_Man_t
 

Functions

static int Cbs0_VarIsAssigned (Gia_Obj_t *pVar)
 
static void Cbs0_VarAssign (Gia_Obj_t *pVar)
 
static void Cbs0_VarUnassign (Gia_Obj_t *pVar)
 
static int Cbs0_VarValue (Gia_Obj_t *pVar)
 
static void Cbs0_VarSetValue (Gia_Obj_t *pVar, int v)
 
static int Cbs0_VarIsJust (Gia_Obj_t *pVar)
 
static int Cbs0_VarFanin0Value (Gia_Obj_t *pVar)
 
static int Cbs0_VarFanin1Value (Gia_Obj_t *pVar)
 
void Cbs0_SetDefaultParams (Cbs0_Par_t *pPars)
 FUNCTION DEFINITIONS ///. More...
 
Cbs0_Man_tCbs0_ManAlloc ()
 
void Cbs0_ManStop (Cbs0_Man_t *p)
 
Vec_Int_tCbs0_ReadModel (Cbs0_Man_t *p)
 
static int Cbs0_ManCheckLimits (Cbs0_Man_t *p)
 
static void Cbs0_ManSaveModel (Cbs0_Man_t *p, Vec_Int_t *vCex)
 
static int Cbs0_QueIsEmpty (Cbs0_Que_t *p)
 
static void Cbs0_QuePush (Cbs0_Que_t *p, Gia_Obj_t *pObj)
 
static int Cbs0_QueHasNode (Cbs0_Que_t *p, Gia_Obj_t *pObj)
 
static void Cbs0_QueStore (Cbs0_Que_t *p, int *piHeadOld, int *piTailOld)
 
static void Cbs0_QueRestore (Cbs0_Que_t *p, int iHeadOld, int iTailOld)
 
static int Cbs0_VarFaninFanoutMax (Cbs0_Man_t *p, Gia_Obj_t *pObj)
 
static Gia_Obj_tCbs0_ManDecideHighest (Cbs0_Man_t *p)
 
static Gia_Obj_tCbs0_ManDecideLowest (Cbs0_Man_t *p)
 
static Gia_Obj_tCbs0_ManDecideMaxFF (Cbs0_Man_t *p)
 
static void Cbs0_ManCancelUntil (Cbs0_Man_t *p, int iBound)
 
static void Cbs0_ManAssign (Cbs0_Man_t *p, Gia_Obj_t *pObj)
 
static int Cbs0_ManPropagateOne (Cbs0_Man_t *p, Gia_Obj_t *pVar)
 
static int Cbs0_ManPropagateTwo (Cbs0_Man_t *p, Gia_Obj_t *pVar)
 
int Cbs0_ManPropagate (Cbs0_Man_t *p)
 
int Cbs0_ManSolve_rec (Cbs0_Man_t *p)
 
int Cbs0_ManSolve (Cbs0_Man_t *p, Gia_Obj_t *pObj)
 
void Cbs0_ManSatPrintStats (Cbs0_Man_t *p)
 
Vec_Int_tCbs_ManSolveMiter (Gia_Man_t *pAig, int nConfs, Vec_Str_t **pvStatus, int fVerbose)
 

Macro Definition Documentation

#define Cbs0_QueForEachEntry (   Que,
  pObj,
 
)    for ( i = (Que).iHead; (i < (Que).iTail) && ((pObj) = (Que).pData[i]); i++ )

Definition at line 91 of file giaCSatOld.c.

Typedef Documentation

typedef struct Cbs0_Man_t_ Cbs0_Man_t

Definition at line 58 of file giaCSatOld.c.

typedef typedefABC_NAMESPACE_IMPL_START struct Cbs0_Par_t_ Cbs0_Par_t

DECLARATIONS ///.

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

FileName [giaCSat.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Scalable AIG package.]

Synopsis [A simple circuit-based solver.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

]

Definition at line 30 of file giaCSatOld.c.

typedef struct Cbs0_Que_t_ Cbs0_Que_t

Definition at line 49 of file giaCSatOld.c.

Function Documentation

Cbs0_Man_t* Cbs0_ManAlloc ( )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 131 of file giaCSatOld.c.

132 {
133  Cbs0_Man_t * p;
134  p = ABC_CALLOC( Cbs0_Man_t, 1 );
135  p->pProp.nSize = p->pJust.nSize = 10000;
136  p->pProp.pData = ABC_ALLOC( Gia_Obj_t *, p->pProp.nSize );
137  p->pJust.pData = ABC_ALLOC( Gia_Obj_t *, p->pJust.nSize );
138  p->vModel = Vec_IntAlloc( 1000 );
140  return p;
141 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
Gia_Obj_t ** pData
Definition: giaCSatOld.c:55
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
Definition: gia.h:75
void Cbs0_SetDefaultParams(Cbs0_Par_t *pPars)
FUNCTION DEFINITIONS ///.
Definition: giaCSatOld.c:109
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
Cbs0_Que_t pJust
Definition: giaCSatOld.c:64
Cbs0_Par_t Pars
Definition: giaCSatOld.c:61
Cbs0_Que_t pProp
Definition: giaCSatOld.c:63
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
Vec_Int_t * vModel
Definition: giaCSatOld.c:65
static void Cbs0_ManAssign ( Cbs0_Man_t p,
Gia_Obj_t pObj 
)
inlinestatic

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

Synopsis [Assigns the variables a value.]

Description [Returns 1 if conflict; 0 if no conflict.]

SideEffects []

SeeAlso []

Definition at line 444 of file giaCSatOld.c.

445 {
446  Gia_Obj_t * pObjR = Gia_Regular(pObj);
447  assert( Gia_ObjIsCand(pObjR) );
448  assert( !Cbs0_VarIsAssigned(pObjR) );
449  Cbs0_VarAssign( pObjR );
450  Cbs0_VarSetValue( pObjR, !Gia_IsComplement(pObj) );
451  Cbs0_QuePush( &p->pProp, pObjR );
452 }
static Gia_Obj_t * Gia_Regular(Gia_Obj_t *p)
Definition: gia.h:377
static int Gia_ObjIsCand(Gia_Obj_t *pObj)
Definition: gia.h:429
static void Cbs0_VarSetValue(Gia_Obj_t *pVar, int v)
Definition: giaCSatOld.c:86
Definition: gia.h:75
static void Cbs0_QuePush(Cbs0_Que_t *p, Gia_Obj_t *pObj)
Definition: giaCSatOld.c:247
static int Gia_IsComplement(Gia_Obj_t *p)
Definition: gia.h:380
Cbs0_Que_t pProp
Definition: giaCSatOld.c:63
#define assert(ex)
Definition: util_old.h:213
static int Cbs0_VarIsAssigned(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:82
static void Cbs0_VarAssign(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:83
static void Cbs0_ManCancelUntil ( Cbs0_Man_t p,
int  iBound 
)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 422 of file giaCSatOld.c.

423 {
424  Gia_Obj_t * pVar;
425  int i;
426  assert( iBound <= p->pProp.iTail );
427  p->pProp.iHead = iBound;
428  Cbs0_QueForEachEntry( p->pProp, pVar, i )
429  Cbs0_VarUnassign( pVar );
430  p->pProp.iTail = iBound;
431 }
#define Cbs0_QueForEachEntry(Que, pObj, i)
Definition: giaCSatOld.c:91
Definition: gia.h:75
static void Cbs0_VarUnassign(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:84
Cbs0_Que_t pProp
Definition: giaCSatOld.c:63
#define assert(ex)
Definition: util_old.h:213
static int Cbs0_ManCheckLimits ( Cbs0_Man_t p)
inlinestatic

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

Synopsis [Returns 1 if the solver is out of limits.]

Description []

SideEffects []

SeeAlso []

Definition at line 192 of file giaCSatOld.c.

193 {
194  return p->Pars.nJustThis > p->Pars.nJustLimit || p->Pars.nBTThis > p->Pars.nBTLimit;
195 }
Cbs0_Par_t Pars
Definition: giaCSatOld.c:61
static Gia_Obj_t* Cbs0_ManDecideHighest ( Cbs0_Man_t p)
inlinestatic

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

Synopsis [Find variable with the highest ID.]

Description []

SideEffects []

SeeAlso []

Definition at line 349 of file giaCSatOld.c.

350 {
351  Gia_Obj_t * pObj, * pObjMax = NULL;
352  int i;
353  Cbs0_QueForEachEntry( p->pJust, pObj, i )
354  if ( pObjMax == NULL || pObjMax < pObj )
355  pObjMax = pObj;
356  return pObjMax;
357 }
#define Cbs0_QueForEachEntry(Que, pObj, i)
Definition: giaCSatOld.c:91
Definition: gia.h:75
Cbs0_Que_t pJust
Definition: giaCSatOld.c:64
if(last==0)
Definition: sparse_int.h:34
static Gia_Obj_t* Cbs0_ManDecideLowest ( Cbs0_Man_t p)
inlinestatic

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

Synopsis [Find variable with the lowest ID.]

Description []

SideEffects []

SeeAlso []

Definition at line 370 of file giaCSatOld.c.

371 {
372  Gia_Obj_t * pObj, * pObjMin = NULL;
373  int i;
374  Cbs0_QueForEachEntry( p->pJust, pObj, i )
375  if ( pObjMin == NULL || pObjMin > pObj )
376  pObjMin = pObj;
377  return pObjMin;
378 }
#define Cbs0_QueForEachEntry(Que, pObj, i)
Definition: giaCSatOld.c:91
Definition: gia.h:75
Cbs0_Que_t pJust
Definition: giaCSatOld.c:64
if(last==0)
Definition: sparse_int.h:34
static Gia_Obj_t* Cbs0_ManDecideMaxFF ( Cbs0_Man_t p)
inlinestatic

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

Synopsis [Find variable with the maximum number of fanin fanouts.]

Description []

SideEffects []

SeeAlso []

Definition at line 391 of file giaCSatOld.c.

392 {
393  Gia_Obj_t * pObj, * pObjMax = NULL;
394  int i, iMaxFF = 0, iCurFF;
395  assert( p->pAig->pRefs != NULL );
396  Cbs0_QueForEachEntry( p->pJust, pObj, i )
397  {
398  iCurFF = Cbs0_VarFaninFanoutMax( p, pObj );
399  assert( iCurFF > 0 );
400  if ( iMaxFF < iCurFF )
401  {
402  iMaxFF = iCurFF;
403  pObjMax = pObj;
404  }
405  }
406  return pObjMax;
407 }
#define Cbs0_QueForEachEntry(Que, pObj, i)
Definition: giaCSatOld.c:91
int * pRefs
Definition: gia.h:114
Definition: gia.h:75
Cbs0_Que_t pJust
Definition: giaCSatOld.c:64
#define assert(ex)
Definition: util_old.h:213
static int Cbs0_VarFaninFanoutMax(Cbs0_Man_t *p, Gia_Obj_t *pObj)
Definition: giaCSatOld.c:328
Gia_Man_t * pAig
Definition: giaCSatOld.c:62
int Cbs0_ManPropagate ( Cbs0_Man_t p)

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

Synopsis [Propagates all variables.]

Description [Returns 1 if conflict; 0 if no conflict.]

SideEffects []

SeeAlso []

Definition at line 548 of file giaCSatOld.c.

549 {
550  Gia_Obj_t * pVar;
551  int i, k;
552  while ( 1 )
553  {
554  Cbs0_QueForEachEntry( p->pProp, pVar, i )
555  {
556  if ( Cbs0_ManPropagateOne( p, pVar ) )
557  return 1;
558  }
559  p->pProp.iHead = p->pProp.iTail;
560  k = p->pJust.iHead;
561  Cbs0_QueForEachEntry( p->pJust, pVar, i )
562  {
563  if ( Cbs0_VarIsJust( pVar ) )
564  p->pJust.pData[k++] = pVar;
565  else if ( Cbs0_ManPropagateTwo( p, pVar ) )
566  return 1;
567  }
568  if ( k == p->pJust.iTail )
569  break;
570  p->pJust.iTail = k;
571  }
572  return 0;
573 }
static int Cbs0_VarIsJust(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:87
#define Cbs0_QueForEachEntry(Que, pObj, i)
Definition: giaCSatOld.c:91
Gia_Obj_t ** pData
Definition: giaCSatOld.c:55
Definition: gia.h:75
static int Cbs0_ManPropagateOne(Cbs0_Man_t *p, Gia_Obj_t *pVar)
Definition: giaCSatOld.c:465
Cbs0_Que_t pJust
Definition: giaCSatOld.c:64
static int Cbs0_ManPropagateTwo(Cbs0_Man_t *p, Gia_Obj_t *pVar)
Definition: giaCSatOld.c:515
Cbs0_Que_t pProp
Definition: giaCSatOld.c:63
static int Cbs0_ManPropagateOne ( Cbs0_Man_t p,
Gia_Obj_t pVar 
)
inlinestatic

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

Synopsis [Propagates a variable.]

Description [Returns 1 if conflict; 0 if no conflict.]

SideEffects []

SeeAlso []

Definition at line 465 of file giaCSatOld.c.

466 {
467  int Value0, Value1;
468  assert( !Gia_IsComplement(pVar) );
469  assert( Cbs0_VarIsAssigned(pVar) );
470  if ( Gia_ObjIsCi(pVar) )
471  return 0;
472  assert( Gia_ObjIsAnd(pVar) );
473  Value0 = Cbs0_VarFanin0Value(pVar);
474  Value1 = Cbs0_VarFanin1Value(pVar);
475  if ( Cbs0_VarValue(pVar) )
476  { // value is 1
477  if ( Value0 == 0 || Value1 == 0 ) // one is 0
478  return 1;
479  if ( Value0 == 2 ) // first is unassigned
480  Cbs0_ManAssign( p, Gia_ObjChild0(pVar) );
481  if ( Value1 == 2 ) // first is unassigned
482  Cbs0_ManAssign( p, Gia_ObjChild1(pVar) );
483  return 0;
484  }
485  // value is 0
486  if ( Value0 == 0 || Value1 == 0 ) // one is 0
487  return 0;
488  if ( Value0 == 1 && Value1 == 1 ) // both are 1
489  return 1;
490  if ( Value0 == 1 || Value1 == 1 ) // one is 1
491  {
492  if ( Value0 == 2 ) // first is unassigned
493  Cbs0_ManAssign( p, Gia_Not(Gia_ObjChild0(pVar)) );
494  if ( Value1 == 2 ) // first is unassigned
495  Cbs0_ManAssign( p, Gia_Not(Gia_ObjChild1(pVar)) );
496  return 0;
497  }
498  assert( Cbs0_VarIsJust(pVar) );
499  assert( !Cbs0_QueHasNode( &p->pJust, pVar ) );
500  Cbs0_QuePush( &p->pJust, pVar );
501  return 0;
502 }
static Gia_Obj_t * Gia_ObjChild0(Gia_Obj_t *pObj)
Definition: gia.h:457
static int Cbs0_VarIsJust(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:87
static int Cbs0_VarValue(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:85
static int Cbs0_VarFanin0Value(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:88
static Gia_Obj_t * Gia_ObjChild1(Gia_Obj_t *pObj)
Definition: gia.h:458
static Gia_Obj_t * Gia_Not(Gia_Obj_t *p)
Definition: gia.h:378
static void Cbs0_QuePush(Cbs0_Que_t *p, Gia_Obj_t *pObj)
Definition: giaCSatOld.c:247
Cbs0_Que_t pJust
Definition: giaCSatOld.c:64
static int Gia_IsComplement(Gia_Obj_t *p)
Definition: gia.h:380
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
Definition: gia.h:422
static void Cbs0_ManAssign(Cbs0_Man_t *p, Gia_Obj_t *pObj)
Definition: giaCSatOld.c:444
#define assert(ex)
Definition: util_old.h:213
static int Cbs0_QueHasNode(Cbs0_Que_t *p, Gia_Obj_t *pObj)
Definition: giaCSatOld.c:268
static int Cbs0_VarFanin1Value(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:89
static int Cbs0_VarIsAssigned(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:82
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
Definition: gia.h:420
static int Cbs0_ManPropagateTwo ( Cbs0_Man_t p,
Gia_Obj_t pVar 
)
inlinestatic

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

Synopsis [Propagates a variable.]

Description [Returns 1 if conflict; 0 if no conflict.]

SideEffects []

SeeAlso []

Definition at line 515 of file giaCSatOld.c.

516 {
517  int Value0, Value1;
518  assert( !Gia_IsComplement(pVar) );
519  assert( Gia_ObjIsAnd(pVar) );
520  assert( Cbs0_VarIsAssigned(pVar) );
521  assert( !Cbs0_VarValue(pVar) );
522  Value0 = Cbs0_VarFanin0Value(pVar);
523  Value1 = Cbs0_VarFanin1Value(pVar);
524  // value is 0
525  if ( Value0 == 0 || Value1 == 0 ) // one is 0
526  return 0;
527  if ( Value0 == 1 && Value1 == 1 ) // both are 1
528  return 1;
529  assert( Value0 == 1 || Value1 == 1 );
530  if ( Value0 == 2 ) // first is unassigned
531  Cbs0_ManAssign( p, Gia_Not(Gia_ObjChild0(pVar)) );
532  if ( Value1 == 2 ) // first is unassigned
533  Cbs0_ManAssign( p, Gia_Not(Gia_ObjChild1(pVar)) );
534  return 0;
535 }
static Gia_Obj_t * Gia_ObjChild0(Gia_Obj_t *pObj)
Definition: gia.h:457
static int Cbs0_VarValue(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:85
static int Cbs0_VarFanin0Value(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:88
static Gia_Obj_t * Gia_ObjChild1(Gia_Obj_t *pObj)
Definition: gia.h:458
static Gia_Obj_t * Gia_Not(Gia_Obj_t *p)
Definition: gia.h:378
static int Gia_IsComplement(Gia_Obj_t *p)
Definition: gia.h:380
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
Definition: gia.h:422
static void Cbs0_ManAssign(Cbs0_Man_t *p, Gia_Obj_t *pObj)
Definition: giaCSatOld.c:444
#define assert(ex)
Definition: util_old.h:213
static int Cbs0_VarFanin1Value(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:89
static int Cbs0_VarIsAssigned(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:82
void Cbs0_ManSatPrintStats ( Cbs0_Man_t p)

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

Synopsis [Prints statistics of the manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 678 of file giaCSatOld.c.

679 {
680  printf( "CO = %8d ", Gia_ManCoNum(p->pAig) );
681  printf( "AND = %8d ", Gia_ManAndNum(p->pAig) );
682  printf( "Conf = %6d ", p->Pars.nBTLimit );
683  printf( "JustMax = %5d ", p->Pars.nJustLimit );
684  printf( "\n" );
685  printf( "Unsat calls %6d (%6.2f %%) Ave conf = %8.1f ",
686  p->nSatUnsat, p->nSatTotal? 100.0*p->nSatUnsat/p->nSatTotal :0.0, p->nSatUnsat? 1.0*p->nConfUnsat/p->nSatUnsat :0.0 );
687  ABC_PRTP( "Time", p->timeSatUnsat, p->timeTotal );
688  printf( "Sat calls %6d (%6.2f %%) Ave conf = %8.1f ",
689  p->nSatSat, p->nSatTotal? 100.0*p->nSatSat/p->nSatTotal :0.0, p->nSatSat? 1.0*p->nConfSat/p->nSatSat : 0.0 );
690  ABC_PRTP( "Time", p->timeSatSat, p->timeTotal );
691  printf( "Undef calls %6d (%6.2f %%) Ave conf = %8.1f ",
692  p->nSatUndec, p->nSatTotal? 100.0*p->nSatUndec/p->nSatTotal :0.0, p->nSatUndec? 1.0*p->nConfUndec/p->nSatUndec : 0.0 );
693  ABC_PRTP( "Time", p->timeSatUndec, p->timeTotal );
694  ABC_PRT( "Total time", p->timeTotal );
695 }
int nConfSat
Definition: giaCSatOld.c:73
int nSatUnsat
Definition: giaCSatOld.c:67
int nConfUnsat
Definition: giaCSatOld.c:72
abctime timeSatUndec
Definition: giaCSatOld.c:78
abctime timeSatUnsat
Definition: giaCSatOld.c:76
#define ABC_PRTP(a, t, T)
Definition: abc_global.h:223
int nSatTotal
Definition: giaCSatOld.c:70
static int Gia_ManAndNum(Gia_Man_t *p)
Definition: gia.h:389
int nSatUndec
Definition: giaCSatOld.c:69
int nConfUndec
Definition: giaCSatOld.c:74
Cbs0_Par_t Pars
Definition: giaCSatOld.c:61
#define ABC_PRT(a, t)
Definition: abc_global.h:220
abctime timeTotal
Definition: giaCSatOld.c:79
Gia_Man_t * pAig
Definition: giaCSatOld.c:62
abctime timeSatSat
Definition: giaCSatOld.c:77
static int Gia_ManCoNum(Gia_Man_t *p)
Definition: gia.h:384
static void Cbs0_ManSaveModel ( Cbs0_Man_t p,
Vec_Int_t vCex 
)
inlinestatic

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

Synopsis [Saves the satisfying assignment as an array of literals.]

Description []

SideEffects []

SeeAlso []

Definition at line 208 of file giaCSatOld.c.

209 {
210  Gia_Obj_t * pVar;
211  int i;
212  Vec_IntClear( vCex );
213  p->pProp.iHead = 0;
214  Cbs0_QueForEachEntry( p->pProp, pVar, i )
215  if ( Gia_ObjIsCi(pVar) )
216 // Vec_IntPush( vCex, Abc_Var2Lit(Gia_ObjId(p->pAig,pVar), !Cbs0_VarValue(pVar)) );
217  Vec_IntPush( vCex, Abc_Var2Lit(Gia_ObjCioId(pVar), !Cbs0_VarValue(pVar)) );
218 }
#define Cbs0_QueForEachEntry(Que, pObj, i)
Definition: giaCSatOld.c:91
static int Cbs0_VarValue(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:85
static int Abc_Var2Lit(int Var, int fCompl)
Definition: abc_global.h:263
Definition: gia.h:75
if(last==0)
Definition: sparse_int.h:34
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
Cbs0_Que_t pProp
Definition: giaCSatOld.c:63
static void Vec_IntClear(Vec_Int_t *p)
Definition: bblif.c:452
static int Gia_ObjIsCi(Gia_Obj_t *pObj)
Definition: gia.h:420
static int Gia_ObjCioId(Gia_Obj_t *pObj)
Definition: gia.h:411
int Cbs0_ManSolve ( Cbs0_Man_t p,
Gia_Obj_t pObj 
)

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

Synopsis [Looking for a satisfying assignment of the node.]

Description [Assumes that each node has flag pObj->fMark0 set to 0. Returns 1 if unsatisfiable, 0 if satisfiable, and -1 if undecided. The node may be complemented. ]

SideEffects []

SeeAlso []

Definition at line 646 of file giaCSatOld.c.

647 {
648  int RetValue;
649  assert( !p->pProp.iHead && !p->pProp.iTail );
650  assert( !p->pJust.iHead && !p->pJust.iTail );
651  p->Pars.nBTThis = p->Pars.nJustThis = 0;
652  Cbs0_ManAssign( p, pObj );
653  RetValue = Cbs0_ManSolve_rec( p );
654  if ( RetValue == 0 && !Cbs0_ManCheckLimits(p) )
655  Cbs0_ManSaveModel( p, p->vModel );
656  Cbs0_ManCancelUntil( p, 0 );
657  p->pJust.iHead = p->pJust.iTail = 0;
658  p->Pars.nBTTotal += p->Pars.nBTThis;
659  p->Pars.nJustTotal = Abc_MaxInt( p->Pars.nJustTotal, p->Pars.nJustThis );
660  if ( Cbs0_ManCheckLimits( p ) )
661  RetValue = -1;
662 // printf( "Outcome = %2d. Confs = %6d. Decision level max = %3d.\n",
663 // RetValue, p->Pars.nBTThis, p->DecLevelMax );
664  return RetValue;
665 }
static int Cbs0_ManCheckLimits(Cbs0_Man_t *p)
Definition: giaCSatOld.c:192
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
static void Cbs0_ManCancelUntil(Cbs0_Man_t *p, int iBound)
Definition: giaCSatOld.c:422
static void Cbs0_ManSaveModel(Cbs0_Man_t *p, Vec_Int_t *vCex)
Definition: giaCSatOld.c:208
int Cbs0_ManSolve_rec(Cbs0_Man_t *p)
Definition: giaCSatOld.c:586
Cbs0_Que_t pJust
Definition: giaCSatOld.c:64
Cbs0_Par_t Pars
Definition: giaCSatOld.c:61
Cbs0_Que_t pProp
Definition: giaCSatOld.c:63
static void Cbs0_ManAssign(Cbs0_Man_t *p, Gia_Obj_t *pObj)
Definition: giaCSatOld.c:444
#define assert(ex)
Definition: util_old.h:213
Vec_Int_t * vModel
Definition: giaCSatOld.c:65
int Cbs0_ManSolve_rec ( Cbs0_Man_t p)

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

Synopsis [Solve the problem recursively.]

Description [Returns 1 if unsat or undecided; 0 if satisfiable.]

SideEffects []

SeeAlso []

Definition at line 586 of file giaCSatOld.c.

587 {
588  Gia_Obj_t * pVar, * pDecVar;
589  int iPropHead, iJustHead, iJustTail;
590  // propagate assignments
591  assert( !Cbs0_QueIsEmpty(&p->pProp) );
592  if ( Cbs0_ManPropagate( p ) )
593  return 1;
594  // check for satisfying assignment
595  assert( Cbs0_QueIsEmpty(&p->pProp) );
596  if ( Cbs0_QueIsEmpty(&p->pJust) )
597  return 0;
598  // quit using resource limits
599  p->Pars.nJustThis = Abc_MaxInt( p->Pars.nJustThis, p->pJust.iTail - p->pJust.iHead );
600  if ( Cbs0_ManCheckLimits( p ) )
601  return 0;
602  // remember the state before branching
603  iPropHead = p->pProp.iHead;
604  Cbs0_QueStore( &p->pJust, &iJustHead, &iJustTail );
605  // find the decision variable
606  if ( p->Pars.fUseHighest )
607  pVar = Cbs0_ManDecideHighest( p );
608  else if ( p->Pars.fUseLowest )
609  pVar = Cbs0_ManDecideLowest( p );
610  else if ( p->Pars.fUseMaxFF )
611  pVar = Cbs0_ManDecideMaxFF( p );
612  else assert( 0 );
613  assert( Cbs0_VarIsJust( pVar ) );
614  // chose decision variable using fanout count
615  if ( Gia_ObjRefNum(p->pAig, Gia_ObjFanin0(pVar)) > Gia_ObjRefNum(p->pAig, Gia_ObjFanin1(pVar)) )
616  pDecVar = Gia_Not(Gia_ObjChild0(pVar));
617  else
618  pDecVar = Gia_Not(Gia_ObjChild1(pVar));
619  // decide on first fanin
620  Cbs0_ManAssign( p, pDecVar );
621  if ( !Cbs0_ManSolve_rec( p ) )
622  return 0;
623  Cbs0_ManCancelUntil( p, iPropHead );
624  Cbs0_QueRestore( &p->pJust, iJustHead, iJustTail );
625  // decide on second fanin
626  Cbs0_ManAssign( p, Gia_Not(pDecVar) );
627  if ( !Cbs0_ManSolve_rec( p ) )
628  return 0;
629  p->Pars.nBTThis++;
630  return 1;
631 }
static Gia_Obj_t * Gia_ObjChild0(Gia_Obj_t *pObj)
Definition: gia.h:457
static int Cbs0_VarIsJust(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:87
static int Cbs0_ManCheckLimits(Cbs0_Man_t *p)
Definition: giaCSatOld.c:192
static int Gia_ObjRefNum(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:521
static Gia_Obj_t * Cbs0_ManDecideHighest(Cbs0_Man_t *p)
Definition: giaCSatOld.c:349
static void Cbs0_QueRestore(Cbs0_Que_t *p, int iHeadOld, int iTailOld)
Definition: giaCSatOld.c:310
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
Definition: gia.h:75
static void Cbs0_ManCancelUntil(Cbs0_Man_t *p, int iBound)
Definition: giaCSatOld.c:422
static Gia_Obj_t * Gia_ObjChild1(Gia_Obj_t *pObj)
Definition: gia.h:458
int Cbs0_ManSolve_rec(Cbs0_Man_t *p)
Definition: giaCSatOld.c:586
static Gia_Obj_t * Gia_Not(Gia_Obj_t *p)
Definition: gia.h:378
static Gia_Obj_t * Cbs0_ManDecideMaxFF(Cbs0_Man_t *p)
Definition: giaCSatOld.c:391
static int Cbs0_QueIsEmpty(Cbs0_Que_t *p)
Definition: giaCSatOld.c:231
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
Definition: gia.h:454
Cbs0_Que_t pJust
Definition: giaCSatOld.c:64
static Gia_Obj_t * Cbs0_ManDecideLowest(Cbs0_Man_t *p)
Definition: giaCSatOld.c:370
int Cbs0_ManPropagate(Cbs0_Man_t *p)
Definition: giaCSatOld.c:548
Cbs0_Par_t Pars
Definition: giaCSatOld.c:61
Cbs0_Que_t pProp
Definition: giaCSatOld.c:63
static void Cbs0_ManAssign(Cbs0_Man_t *p, Gia_Obj_t *pObj)
Definition: giaCSatOld.c:444
static void Cbs0_QueStore(Cbs0_Que_t *p, int *piHeadOld, int *piTailOld)
Definition: giaCSatOld.c:289
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
Definition: gia.h:455
#define assert(ex)
Definition: util_old.h:213
Gia_Man_t * pAig
Definition: giaCSatOld.c:62
void Cbs0_ManStop ( Cbs0_Man_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 154 of file giaCSatOld.c.

155 {
156  Vec_IntFree( p->vModel );
157  ABC_FREE( p->pProp.pData );
158  ABC_FREE( p->pJust.pData );
159  ABC_FREE( p );
160 }
Gia_Obj_t ** pData
Definition: giaCSatOld.c:55
Cbs0_Que_t pJust
Definition: giaCSatOld.c:64
Cbs0_Que_t pProp
Definition: giaCSatOld.c:63
#define ABC_FREE(obj)
Definition: abc_global.h:232
Vec_Int_t * vModel
Definition: giaCSatOld.c:65
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
static int Cbs0_QueHasNode ( Cbs0_Que_t p,
Gia_Obj_t pObj 
)
inlinestatic

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

Synopsis [Returns 1 if the object in the queue.]

Description []

SideEffects []

SeeAlso []

Definition at line 268 of file giaCSatOld.c.

269 {
270  Gia_Obj_t * pTemp;
271  int i;
272  Cbs0_QueForEachEntry( *p, pTemp, i )
273  if ( pTemp == pObj )
274  return 1;
275  return 0;
276 }
#define Cbs0_QueForEachEntry(Que, pObj, i)
Definition: giaCSatOld.c:91
Definition: gia.h:75
if(last==0)
Definition: sparse_int.h:34
static int Cbs0_QueIsEmpty ( Cbs0_Que_t p)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 231 of file giaCSatOld.c.

232 {
233  return p->iHead == p->iTail;
234 }
static void Cbs0_QuePush ( Cbs0_Que_t p,
Gia_Obj_t pObj 
)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 247 of file giaCSatOld.c.

248 {
249  if ( p->iTail == p->nSize )
250  {
251  p->nSize *= 2;
252  p->pData = ABC_REALLOC( Gia_Obj_t *, p->pData, p->nSize );
253  }
254  p->pData[p->iTail++] = pObj;
255 }
#define ABC_REALLOC(type, obj, num)
Definition: abc_global.h:233
Gia_Obj_t ** pData
Definition: giaCSatOld.c:55
Definition: gia.h:75
static void Cbs0_QueRestore ( Cbs0_Que_t p,
int  iHeadOld,
int  iTailOld 
)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 310 of file giaCSatOld.c.

311 {
312  p->iHead = iHeadOld;
313  p->iTail = iTailOld;
314 }
static void Cbs0_QueStore ( Cbs0_Que_t p,
int *  piHeadOld,
int *  piTailOld 
)
inlinestatic

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 289 of file giaCSatOld.c.

290 {
291  int i;
292  *piHeadOld = p->iHead;
293  *piTailOld = p->iTail;
294  for ( i = *piHeadOld; i < *piTailOld; i++ )
295  Cbs0_QuePush( p, p->pData[i] );
296  p->iHead = *piTailOld;
297 }
Gia_Obj_t ** pData
Definition: giaCSatOld.c:55
static void Cbs0_QuePush(Cbs0_Que_t *p, Gia_Obj_t *pObj)
Definition: giaCSatOld.c:247
Vec_Int_t* Cbs0_ReadModel ( Cbs0_Man_t p)

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

Synopsis [Returns satisfying assignment.]

Description []

SideEffects []

SeeAlso []

Definition at line 173 of file giaCSatOld.c.

174 {
175  return p->vModel;
176 }
Vec_Int_t * vModel
Definition: giaCSatOld.c:65
void Cbs0_SetDefaultParams ( Cbs0_Par_t pPars)

FUNCTION DEFINITIONS ///.

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

Synopsis [Sets default values of the parameters.]

Description []

SideEffects []

SeeAlso []

Definition at line 109 of file giaCSatOld.c.

110 {
111  memset( pPars, 0, sizeof(Cbs0_Par_t) );
112  pPars->nBTLimit = 1000; // limit on the number of conflicts
113  pPars->nJustLimit = 100; // limit on the size of justification queue
114  pPars->fUseHighest = 1; // use node with the highest ID
115  pPars->fUseLowest = 0; // use node with the highest ID
116  pPars->fUseMaxFF = 0; // use node with the largest fanin fanout
117  pPars->fVerbose = 1; // print detailed statistics
118 }
char * memset()
typedefABC_NAMESPACE_IMPL_START struct Cbs0_Par_t_ Cbs0_Par_t
DECLARATIONS ///.
Definition: giaCSatOld.c:30
static void Cbs0_VarAssign ( Gia_Obj_t pVar)
inlinestatic

Definition at line 83 of file giaCSatOld.c.

83 { assert(!pVar->fMark0); pVar->fMark0 = 1; }
unsigned fMark0
Definition: gia.h:79
#define assert(ex)
Definition: util_old.h:213
static int Cbs0_VarFanin0Value ( Gia_Obj_t pVar)
inlinestatic

Definition at line 88 of file giaCSatOld.c.

88 { return !Cbs0_VarIsAssigned(Gia_ObjFanin0(pVar)) ? 2 : (Cbs0_VarValue(Gia_ObjFanin0(pVar)) ^ Gia_ObjFaninC0(pVar)); }
static int Cbs0_VarValue(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:85
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
Definition: gia.h:454
static int Cbs0_VarIsAssigned(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:82
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
Definition: gia.h:451
static int Cbs0_VarFanin1Value ( Gia_Obj_t pVar)
inlinestatic

Definition at line 89 of file giaCSatOld.c.

89 { return !Cbs0_VarIsAssigned(Gia_ObjFanin1(pVar)) ? 2 : (Cbs0_VarValue(Gia_ObjFanin1(pVar)) ^ Gia_ObjFaninC1(pVar)); }
static int Gia_ObjFaninC1(Gia_Obj_t *pObj)
Definition: gia.h:452
static int Cbs0_VarValue(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:85
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
Definition: gia.h:455
static int Cbs0_VarIsAssigned(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:82
static int Cbs0_VarFaninFanoutMax ( Cbs0_Man_t p,
Gia_Obj_t pObj 
)
inlinestatic

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

Synopsis [Max number of fanins fanouts.]

Description []

SideEffects []

SeeAlso []

Definition at line 328 of file giaCSatOld.c.

329 {
330  int Count0, Count1;
331  assert( !Gia_IsComplement(pObj) );
332  assert( Gia_ObjIsAnd(pObj) );
333  Count0 = Gia_ObjRefNum( p->pAig, Gia_ObjFanin0(pObj) );
334  Count1 = Gia_ObjRefNum( p->pAig, Gia_ObjFanin1(pObj) );
335  return Abc_MaxInt( Count0, Count1 );
336 }
static int Gia_ObjRefNum(Gia_Man_t *p, Gia_Obj_t *pObj)
Definition: gia.h:521
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
Definition: gia.h:454
static int Gia_IsComplement(Gia_Obj_t *p)
Definition: gia.h:380
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
Definition: gia.h:422
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
Definition: gia.h:455
#define assert(ex)
Definition: util_old.h:213
Gia_Man_t * pAig
Definition: giaCSatOld.c:62
static int Cbs0_VarIsAssigned ( Gia_Obj_t pVar)
inlinestatic

Definition at line 82 of file giaCSatOld.c.

82 { return pVar->fMark0; }
unsigned fMark0
Definition: gia.h:79
static int Cbs0_VarIsJust ( Gia_Obj_t pVar)
inlinestatic

Definition at line 87 of file giaCSatOld.c.

87 { return Gia_ObjIsAnd(pVar) && !Cbs0_VarIsAssigned(Gia_ObjFanin0(pVar)) && !Cbs0_VarIsAssigned(Gia_ObjFanin1(pVar)); }
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
Definition: gia.h:454
static int Gia_ObjIsAnd(Gia_Obj_t *pObj)
Definition: gia.h:422
static Gia_Obj_t * Gia_ObjFanin1(Gia_Obj_t *pObj)
Definition: gia.h:455
static int Cbs0_VarIsAssigned(Gia_Obj_t *pVar)
Definition: giaCSatOld.c:82
static void Cbs0_VarSetValue ( Gia_Obj_t pVar,
int  v 
)
inlinestatic

Definition at line 86 of file giaCSatOld.c.

86 { assert(pVar->fMark0); pVar->fMark1 = v; }
unsigned fMark1
Definition: gia.h:84
unsigned fMark0
Definition: gia.h:79
#define assert(ex)
Definition: util_old.h:213
static void Cbs0_VarUnassign ( Gia_Obj_t pVar)
inlinestatic

Definition at line 84 of file giaCSatOld.c.

84 { assert(pVar->fMark0); pVar->fMark0 = 0; pVar->fMark1 = 0; }
unsigned fMark1
Definition: gia.h:84
unsigned fMark0
Definition: gia.h:79
#define assert(ex)
Definition: util_old.h:213
static int Cbs0_VarValue ( Gia_Obj_t pVar)
inlinestatic

Definition at line 85 of file giaCSatOld.c.

85 { assert(pVar->fMark0); return pVar->fMark1; }
unsigned fMark1
Definition: gia.h:84
unsigned fMark0
Definition: gia.h:79
#define assert(ex)
Definition: util_old.h:213
Vec_Int_t* Cbs_ManSolveMiter ( Gia_Man_t pAig,
int  nConfs,
Vec_Str_t **  pvStatus,
int  fVerbose 
)

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

Synopsis [Procedure to test the new SAT solver.]

Description []

SideEffects []

SeeAlso []

Definition at line 708 of file giaCSatOld.c.

709 {
710  extern void Cec_ManSatAddToStore( Vec_Int_t * vCexStore, Vec_Int_t * vCex, int Out );
711  Cbs0_Man_t * p;
712  Vec_Int_t * vCex, * vVisit, * vCexStore;
713  Vec_Str_t * vStatus;
714  Gia_Obj_t * pRoot;
715  int i, status;
716  abctime clk, clkTotal = Abc_Clock();
717  assert( Gia_ManRegNum(pAig) == 0 );
718  // prepare AIG
719  Gia_ManCreateRefs( pAig );
720  Gia_ManCleanMark0( pAig );
721  Gia_ManCleanMark1( pAig );
722  // create logic network
723  p = Cbs0_ManAlloc();
724  p->Pars.nBTLimit = nConfs;
725  p->pAig = pAig;
726  // create resulting data-structures
727  vStatus = Vec_StrAlloc( Gia_ManPoNum(pAig) );
728  vCexStore = Vec_IntAlloc( 10000 );
729  vVisit = Vec_IntAlloc( 100 );
730  vCex = Cbs0_ReadModel( p );
731  // solve for each output
732  Gia_ManForEachCo( pAig, pRoot, i )
733  {
734  Vec_IntClear( vCex );
735  if ( Gia_ObjIsConst0(Gia_ObjFanin0(pRoot)) )
736  {
737  if ( Gia_ObjFaninC0(pRoot) )
738  {
739  printf( "Constant 1 output of SRM!!!\n" );
740  Cec_ManSatAddToStore( vCexStore, vCex, i ); // trivial counter-example
741  Vec_StrPush( vStatus, 0 );
742  }
743  else
744  {
745 // printf( "Constant 0 output of SRM!!!\n" );
746  Vec_StrPush( vStatus, 1 );
747  }
748  continue;
749  }
750  clk = Abc_Clock();
751  p->Pars.fUseHighest = 1;
752  p->Pars.fUseLowest = 0;
753  status = Cbs0_ManSolve( p, Gia_ObjChild0(pRoot) );
754 /*
755  if ( status == -1 )
756  {
757  p->Pars.fUseHighest = 0;
758  p->Pars.fUseLowest = 1;
759  status = Cbs0_ManSolve( p, Gia_ObjChild0(pRoot) );
760  }
761 */
762  Vec_StrPush( vStatus, (char)status );
763  if ( status == -1 )
764  {
765  p->nSatUndec++;
766  p->nConfUndec += p->Pars.nBTThis;
767  Cec_ManSatAddToStore( vCexStore, NULL, i ); // timeout
768  p->timeSatUndec += Abc_Clock() - clk;
769  continue;
770  }
771  if ( status == 1 )
772  {
773  p->nSatUnsat++;
774  p->nConfUnsat += p->Pars.nBTThis;
775  p->timeSatUnsat += Abc_Clock() - clk;
776  continue;
777  }
778  p->nSatSat++;
779  p->nConfSat += p->Pars.nBTThis;
780 // Gia_SatVerifyPattern( pAig, pRoot, vCex, vVisit );
781  Cec_ManSatAddToStore( vCexStore, vCex, i );
782  p->timeSatSat += Abc_Clock() - clk;
783  }
784  Vec_IntFree( vVisit );
785  p->nSatTotal = Gia_ManPoNum(pAig);
786  p->timeTotal = Abc_Clock() - clkTotal;
787  if ( fVerbose )
789  Cbs0_ManStop( p );
790  *pvStatus = vStatus;
791 // printf( "Total number of cex literals = %d. (Ave = %d)\n",
792 // Vec_IntSize(vCexStore)-2*p->nSatUndec-2*p->nSatSat,
793 // (Vec_IntSize(vCexStore)-2*p->nSatUndec-2*p->nSatSat)/p->nSatSat );
794  return vCexStore;
795 }
int nConfSat
Definition: giaCSatOld.c:73
void Gia_ManCreateRefs(Gia_Man_t *p)
Definition: giaUtil.c:715
static Gia_Obj_t * Gia_ObjChild0(Gia_Obj_t *pObj)
Definition: gia.h:457
int nSatUnsat
Definition: giaCSatOld.c:67
int nConfUnsat
Definition: giaCSatOld.c:72
#define Gia_ManForEachCo(p, pObj, i)
Definition: gia.h:1022
abctime timeSatUndec
Definition: giaCSatOld.c:78
static int Gia_ManPoNum(Gia_Man_t *p)
Definition: gia.h:386
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 Gia_ManCleanMark0(Gia_Man_t *p)
Definition: giaUtil.c:215
static int Gia_ObjIsConst0(Gia_Obj_t *pObj)
Definition: gia.h:430
void Cbs0_ManStop(Cbs0_Man_t *p)
Definition: giaCSatOld.c:154
abctime timeSatUnsat
Definition: giaCSatOld.c:76
static Vec_Str_t * Vec_StrAlloc(int nCap)
Definition: bblif.c:495
static abctime Abc_Clock()
Definition: abc_global.h:279
static void Vec_StrPush(Vec_Str_t *p, char Entry)
Definition: vecStr.h:535
Definition: gia.h:75
void Gia_ManCleanMark1(Gia_Man_t *p)
Definition: giaUtil.c:272
int nSatTotal
Definition: giaCSatOld.c:70
int Cbs0_ManSolve(Cbs0_Man_t *p, Gia_Obj_t *pObj)
Definition: giaCSatOld.c:646
static Gia_Obj_t * Gia_ObjFanin0(Gia_Obj_t *pObj)
Definition: gia.h:454
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
int nSatUndec
Definition: giaCSatOld.c:69
int nConfUndec
Definition: giaCSatOld.c:74
void Cec_ManSatAddToStore(Vec_Int_t *vCexStore, Vec_Int_t *vCex, int Out)
Definition: cecSolve.c:952
Cbs0_Par_t Pars
Definition: giaCSatOld.c:61
Vec_Int_t * Cbs0_ReadModel(Cbs0_Man_t *p)
Definition: giaCSatOld.c:173
Cbs0_Man_t * Cbs0_ManAlloc()
Definition: giaCSatOld.c:131
abctime timeTotal
Definition: giaCSatOld.c:79
#define assert(ex)
Definition: util_old.h:213
static int Gia_ObjFaninC0(Gia_Obj_t *pObj)
Definition: gia.h:451
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
Gia_Man_t * pAig
Definition: giaCSatOld.c:62
static void Vec_IntClear(Vec_Int_t *p)
Definition: bblif.c:452
ABC_INT64_T abctime
Definition: abc_global.h:278
void Cbs0_ManSatPrintStats(Cbs0_Man_t *p)
Definition: giaCSatOld.c:678
abctime timeSatSat
Definition: giaCSatOld.c:77
static int Gia_ManRegNum(Gia_Man_t *p)
Definition: gia.h:387