ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
giaCSat3.c File Reference
#include "gia.h"
Include dependency graph for giaCSat3.c:

Go to the source code of this file.

Classes

struct  Cbs3_Par_t_
 
struct  Cbs3_Que_t_
 
struct  Cbs3_Man_t_
 

Macros

#define Cbs3_QueForEachEntry(Que, iObj, i)
 
#define Cbs3_ClauseForEachEntry(p, hClause, iObj, i)
 
#define Cbs3_ClauseForEachEntry1(p, hClause, iObj, i)
 

Typedefs

typedef typedefABC_NAMESPACE_IMPL_START struct Cbs3_Par_t_ Cbs3_Par_t
 DECLARATIONS ///.
 
typedef struct Cbs3_Que_t_ Cbs3_Que_t
 
typedef struct Cbs3_Man_t_ Cbs3_Man_t
 

Functions

void Cbs3_SetDefaultParams (Cbs3_Par_t *pPars)
 FUNCTION DEFINITIONS ///.
 
void Cbs3_ManSetConflictNum (Cbs3_Man_t *p, int Num)
 
Cbs3_Man_tCbs3_ManAlloc (Gia_Man_t *pGia)
 
void Cbs3_ManStop (Cbs3_Man_t *p)
 
int Cbs3_ManMemory (Cbs3_Man_t *p)
 
Vec_Int_tCbs3_ReadModel (Cbs3_Man_t *p)
 
void Cbs3_ManUpdateJFrontier (Cbs3_Man_t *p)
 
int Cbs3_ManPropagateNew (Cbs3_Man_t *p, int Level)
 
int Cbs3_ManSolve2_rec (Cbs3_Man_t *p, int Level)
 
int Cbs3_ManSolve (Cbs3_Man_t *p, int iLit, int nRestarts)
 
void Cbs3_ManSatPrintStats (Cbs3_Man_t *p)
 
Vec_Int_tCbs3_ManSolveMiterNc (Gia_Man_t *pAig, int nConfs, int nRestarts, Vec_Str_t **pvStatus, int fVerbose)
 

Macro Definition Documentation

◆ Cbs3_ClauseForEachEntry

#define Cbs3_ClauseForEachEntry ( p,
hClause,
iObj,
i )
Value:
for ( i = 1; i <= Cbs3_ClauseSize(p, hClause) && (iObj = (p)->pClauses.pData[hClause+i]); i++ )
Cube * p
Definition exorList.c:222

Definition at line 139 of file giaCSat3.c.

139#define Cbs3_ClauseForEachEntry( p, hClause, iObj, i ) \
140 for ( i = 1; i <= Cbs3_ClauseSize(p, hClause) && (iObj = (p)->pClauses.pData[hClause+i]); i++ )

◆ Cbs3_ClauseForEachEntry1

#define Cbs3_ClauseForEachEntry1 ( p,
hClause,
iObj,
i )
Value:
for ( i = 2; i <= Cbs3_ClauseSize(p, hClause) && (iObj = (p)->pClauses.pData[hClause+i]); i++ )

Definition at line 141 of file giaCSat3.c.

141#define Cbs3_ClauseForEachEntry1( p, hClause, iObj, i ) \
142 for ( i = 2; i <= Cbs3_ClauseSize(p, hClause) && (iObj = (p)->pClauses.pData[hClause+i]); i++ )

◆ Cbs3_QueForEachEntry

#define Cbs3_QueForEachEntry ( Que,
iObj,
i )
Value:
for ( i = (Que).iHead; (i < (Que).iTail) && ((iObj) = (Que).pData[i]); i++ )

Definition at line 136 of file giaCSat3.c.

136#define Cbs3_QueForEachEntry( Que, iObj, i ) \
137 for ( i = (Que).iHead; (i < (Que).iTail) && ((iObj) = (Que).pData[i]); i++ )

Typedef Documentation

◆ Cbs3_Man_t

typedef struct Cbs3_Man_t_ Cbs3_Man_t

Definition at line 55 of file giaCSat3.c.

◆ Cbs3_Par_t

typedef typedefABC_NAMESPACE_IMPL_START struct Cbs3_Par_t_ Cbs3_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 giaCSat3.c.

◆ Cbs3_Que_t

typedef struct Cbs3_Que_t_ Cbs3_Que_t

Definition at line 46 of file giaCSat3.c.

Function Documentation

◆ Cbs3_ManAlloc()

Cbs3_Man_t * Cbs3_ManAlloc ( Gia_Man_t * pGia)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 183 of file giaCSat3.c.

184{
185 Cbs3_Man_t * p;
186 p = ABC_CALLOC( Cbs3_Man_t, 1 );
187 p->pProp.nSize = p->pJust.nSize = p->pClauses.nSize = 10000;
188 p->pProp.pData = ABC_ALLOC( int, p->pProp.nSize );
189 p->pJust.pData = ABC_ALLOC( int, p->pJust.nSize );
190 p->pClauses.pData = ABC_ALLOC( int, p->pClauses.nSize );
191 p->pClauses.iHead = p->pClauses.iTail = 1;
192 p->vModel = Vec_IntAlloc( 1000 );
193 p->vTemp = Vec_IntAlloc( 1000 );
194 p->pAig = pGia;
195 Cbs3_SetDefaultParams( &p->Pars );
196 // circuit structure
197 Vec_IntPush( &p->vMap, -1 );
198 Vec_IntPush( &p->vRef, -1 );
199 Vec_IntPushTwo( &p->vFans, -1, -1 );
200 Vec_WecPushLevel( &p->vImps );
201 Vec_WecPushLevel( &p->vImps );
202 p->nVars = 1;
203 // internal data
204 p->nVarsAlloc = 1000;
205 Vec_StrFill( &p->vAssign, p->nVarsAlloc, 2 );
206 Vec_StrFill( &p->vMark, p->nVarsAlloc, 0 );
207 Vec_IntFill( &p->vLevReason, 3*p->nVarsAlloc, -1 );
208 Vec_IntFill( &p->vActs, p->nVarsAlloc, 0 );
209 Vec_IntFill( &p->vWatches, 2*p->nVarsAlloc, 0 );
210 Vec_IntGrow( &p->vWatchUpds, 1000 );
211 return p;
212}
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
#define ABC_CALLOC(type, num)
Definition abc_global.h:265
void Cbs3_SetDefaultParams(Cbs3_Par_t *pPars)
FUNCTION DEFINITIONS ///.
Definition giaCSat3.c:159
struct Cbs3_Man_t_ Cbs3_Man_t
Definition giaCSat3.c:55
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cbs3_ManMemory()

int Cbs3_ManMemory ( Cbs3_Man_t * p)

Definition at line 267 of file giaCSat3.c.

268{
269 int nMem = sizeof(Cbs3_Man_t);
270 nMem += (int)Vec_IntMemory( &p->vMap );
271 nMem += (int)Vec_IntMemory( &p->vRef );
272 nMem += (int)Vec_IntMemory( &p->vFans );
273 nMem += (int)Vec_WecMemory( &p->vImps );
274 nMem += (int)Vec_StrMemory( &p->vAssign );
275 nMem += (int)Vec_StrMemory( &p->vMark );
276 nMem += (int)Vec_IntMemory( &p->vActs );
277 nMem += (int)Vec_IntMemory( &p->vWatches );
278 nMem += (int)Vec_IntMemory( &p->vWatchUpds );
279 nMem += (int)Vec_IntMemory( p->vModel );
280 nMem += (int)Vec_IntMemory( p->vTemp );
281 nMem += 4*p->pClauses.nSize;
282 nMem += 4*p->pProp.nSize;
283 nMem += 4*p->pJust.nSize;
284 return nMem;
285}
Here is the caller graph for this function:

◆ Cbs3_ManPropagateNew()

int Cbs3_ManPropagateNew ( Cbs3_Man_t * p,
int Level )

Definition at line 978 of file giaCSat3.c.

979{
980 int i, k, iLit, hClause, nLits, * pLits;
981 p->nPropCalls[0]++;
982 Cbs3_QueForEachEntry( p->pProp, iLit, i )
983 {
984 if ( (hClause = Cbs3_ManPropagateClauses(p, Level, iLit)) )
985 return hClause;
986 p->nPropCalls[2]++;
987 nLits = Vec_IntSize(Vec_WecEntry(&p->vImps, iLit));
988 pLits = Vec_IntArray(Vec_WecEntry(&p->vImps, iLit));
989 for ( k = 0; k < nLits; k += 2 )
990 {
991 int Value0 = Cbs3_VarValue(p, Abc_Lit2Var(pLits[k]));
992 int Value1 = pLits[k+1] ? Cbs3_VarValue(p, Abc_Lit2Var(pLits[k+1])) : -1;
993 if ( Value1 == -1 || Value1 == Abc_LitIsCompl(pLits[k+1]) ) // pLits[k+1] is false
994 {
995 if ( Value0 >= 2 ) // pLits[k] is unassigned
996 Cbs3_ManAssign( p, pLits[k], Level, Abc_Lit2Var(iLit), Abc_Lit2Var(pLits[k+1]) );
997 else if ( Value0 == Abc_LitIsCompl(pLits[k]) ) // pLits[k] is false
998 return Cbs3_ManAnalyze( p, Level, Abc_Lit2Var(iLit), Abc_Lit2Var(pLits[k]), Abc_Lit2Var(pLits[k+1]) );
999 }
1000 if ( Value1 != -1 && Value0 == Abc_LitIsCompl(pLits[k]) ) // pLits[k] is false
1001 {
1002 if ( Value1 >= 2 ) // pLits[k+1] is unassigned
1003 Cbs3_ManAssign( p, pLits[k+1], Level, Abc_Lit2Var(iLit), Abc_Lit2Var(pLits[k]) );
1004 else if ( Value1 == Abc_LitIsCompl(pLits[k+1]) ) // pLits[k+1] is false
1005 return Cbs3_ManAnalyze( p, Level, Abc_Lit2Var(iLit), Abc_Lit2Var(pLits[k]), Abc_Lit2Var(pLits[k+1]) );
1006 }
1007 }
1008 }
1010 // finalize propagation queue
1011 p->pProp.iHead = p->pProp.iTail;
1012 return 0;
1013}
void Cbs3_ManUpdateJFrontier(Cbs3_Man_t *p)
Definition giaCSat3.c:963
#define Cbs3_QueForEachEntry(Que, iObj, i)
Definition giaCSat3.c:136
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cbs3_ManSatPrintStats()

void Cbs3_ManSatPrintStats ( Cbs3_Man_t * p)

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

Synopsis [Prints statistics of the manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 1134 of file giaCSat3.c.

1135{
1136 printf( "CO = %8d ", Gia_ManCoNum(p->pAig) );
1137 printf( "AND = %8d ", Gia_ManAndNum(p->pAig) );
1138 printf( "Conf = %6d ", p->Pars.nBTLimit );
1139 printf( "Restart = %2d ", p->Pars.nRestLimit );
1140 printf( "JustMax = %5d ", p->Pars.nJustLimit );
1141 printf( "\n" );
1142 printf( "Unsat calls %6d (%6.2f %%) Ave conf = %8.1f ",
1143 p->nSatUnsat, p->nSatTotal? 100.0*p->nSatUnsat/p->nSatTotal :0.0, p->nSatUnsat? 1.0*p->nConfUnsat/p->nSatUnsat :0.0 );
1144 ABC_PRTP( "Time", p->timeSatUnsat, p->timeTotal );
1145 printf( "Sat calls %6d (%6.2f %%) Ave conf = %8.1f ",
1146 p->nSatSat, p->nSatTotal? 100.0*p->nSatSat/p->nSatTotal :0.0, p->nSatSat? 1.0*p->nConfSat/p->nSatSat : 0.0 );
1147 ABC_PRTP( "Time", p->timeSatSat, p->timeTotal );
1148 printf( "Undef calls %6d (%6.2f %%) Ave conf = %8.1f ",
1149 p->nSatUndec, p->nSatTotal? 100.0*p->nSatUndec/p->nSatTotal :0.0, p->nSatUndec? 1.0*p->nConfUndec/p->nSatUndec : 0.0 );
1150 ABC_PRTP( "Time", p->timeSatUndec, p->timeTotal );
1151 ABC_PRT( "Total time", p->timeTotal );
1152}
#define ABC_PRT(a, t)
Definition abc_global.h:255
#define ABC_PRTP(a, t, T)
Definition abc_global.h:258
Here is the caller graph for this function:

◆ Cbs3_ManSetConflictNum()

void Cbs3_ManSetConflictNum ( Cbs3_Man_t * p,
int Num )

Definition at line 167 of file giaCSat3.c.

168{
169 p->Pars.nBTLimit = Num;
170}

◆ Cbs3_ManSolve()

int Cbs3_ManSolve ( Cbs3_Man_t * p,
int iLit,
int nRestarts )

Definition at line 1111 of file giaCSat3.c.

1112{
1113 int i, RetValue = -1;
1114 assert( p->pClauses.iHead == 1 && p->pClauses.iTail == 1 );
1115 for ( i = 0; i < nRestarts; i++ )
1116 if ( (RetValue = Cbs3_ManSolveInt(p, iLit)) != -1 )
1117 break;
1118 Cbs3_ManCleanWatch( p );
1119 p->pClauses.iHead = p->pClauses.iTail = 1;
1120 return RetValue;
1121}
#define assert(ex)
Definition util_old.h:213

◆ Cbs3_ManSolve2_rec()

int Cbs3_ManSolve2_rec ( Cbs3_Man_t * p,
int Level )

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

Synopsis [Solve the problem recursively.]

Description [Returns learnt clause if unsat, NULL if sat or undecided.]

SideEffects []

SeeAlso []

Definition at line 1026 of file giaCSat3.c.

1027{
1028 Cbs3_Que_t * pQue = &(p->pClauses);
1029 int iPropHead, iJustHead, iJustTail;
1030 int hClause, hLearn0, hLearn1, iVar, iDecLit;
1031 int nRef0, nRef1;
1032 // propagate assignments
1033 assert( !Cbs3_QueIsEmpty(&p->pProp) );
1034 //if ( (hClause = Cbs3_ManPropagate( p, Level )) )
1035 if ( (hClause = Cbs3_ManPropagateNew( p, Level )) )
1036 return hClause;
1037 // check for satisfying assignment
1038 assert( Cbs3_QueIsEmpty(&p->pProp) );
1039 if ( Cbs3_QueIsEmpty(&p->pJust) )
1040 return 0;
1041 // quit using resource limits
1042 p->Pars.nJustThis = Abc_MaxInt( p->Pars.nJustThis, p->pJust.iTail - p->pJust.iHead );
1043 if ( Cbs3_ManCheckLimits( p ) )
1044 return 0;
1045 // remember the state before branching
1046 iPropHead = p->pProp.iHead;
1047 iJustHead = p->pJust.iHead;
1048 iJustTail = p->pJust.iTail;
1049 // find the decision variable
1050 p->nDecs++;
1051 iVar = Cbs3_ManDecide( p );
1052 assert( !Cbs3_VarIsPi(p, iVar) );
1053 assert( Cbs3_VarIsJust(p, iVar) );
1054 // chose decision variable using fanout count
1055 nRef0 = Vec_IntEntry(&p->vRef, Abc_Lit2Var(Cbs3_VarLit0(p, iVar)));
1056 nRef1 = Vec_IntEntry(&p->vRef, Abc_Lit2Var(Cbs3_VarLit1(p, iVar)));
1057// if ( nRef0 >= nRef1 || (nRef0 == nRef1) && (Abc_Random(0) & 1) )
1058 if ( nRef0 >= nRef1 )
1059 iDecLit = Abc_LitNot(Cbs3_VarLit0(p, iVar));
1060 else
1061 iDecLit = Abc_LitNot(Cbs3_VarLit1(p, iVar));
1062 // decide on first fanin
1063 Cbs3_ManAssign( p, iDecLit, Level+1, 0, 0 );
1064 if ( !(hLearn0 = Cbs3_ManSolve2_rec( p, Level+1 )) )
1065 return 0;
1066 if ( pQue->pData[hLearn0+1] != Abc_Lit2Var(iDecLit) )
1067 return hLearn0;
1068 Cbs3_ManCancelUntil( p, iPropHead );
1069 Cbs3_QueRestore( &p->pJust, iJustHead, iJustTail );
1070 // decide on second fanin
1071 Cbs3_ManAssign( p, Abc_LitNot(iDecLit), Level+1, 0, 0 );
1072 if ( !(hLearn1 = Cbs3_ManSolve2_rec( p, Level+1 )) )
1073 return 0;
1074 if ( pQue->pData[hLearn1+1] != Abc_Lit2Var(iDecLit) )
1075 return hLearn1;
1076 hClause = Cbs3_ManResolve( p, Level, hLearn0, hLearn1 );
1077 p->Pars.nBTThis++;
1078 return hClause;
1079}
struct Cbs3_Que_t_ Cbs3_Que_t
Definition giaCSat3.c:46
int Cbs3_ManPropagateNew(Cbs3_Man_t *p, int Level)
Definition giaCSat3.c:978
int Cbs3_ManSolve2_rec(Cbs3_Man_t *p, int Level)
Definition giaCSat3.c:1026
int * pData
Definition giaCSat3.c:52
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cbs3_ManSolveMiterNc()

Vec_Int_t * Cbs3_ManSolveMiterNc ( Gia_Man_t * pAig,
int nConfs,
int nRestarts,
Vec_Str_t ** pvStatus,
int fVerbose )

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

Synopsis [Procedure to test the new SAT solver.]

Description []

SideEffects []

SeeAlso []

Definition at line 1284 of file giaCSat3.c.

1285{
1286 extern void Cec_ManSatAddToStore( Vec_Int_t * vCexStore, Vec_Int_t * vCex, int Out );
1287 Cbs3_Man_t * p;
1288 Vec_Int_t * vCex, * vVisit, * vCexStore;
1289 Vec_Str_t * vStatus;
1290 Gia_Obj_t * pRoot;
1291 int i, status; // 1 = unsat, 0 = sat, -1 = undec
1292 abctime clk, clkTotal = Abc_Clock();
1293 //assert( Gia_ManRegNum(pAig) == 0 );
1294 Gia_ManCreateRefs( pAig );
1295 //Gia_ManLevelNum( pAig );
1296 // create logic network
1297 p = Cbs3_ManAlloc( pAig );
1298 p->Pars.nBTLimit = nConfs;
1299 p->Pars.nRestLimit = nRestarts;
1300 // create resulting data-structures
1301 vStatus = Vec_StrAlloc( Gia_ManPoNum(pAig) );
1302 vCexStore = Vec_IntAlloc( 10000 );
1303 vVisit = Vec_IntAlloc( 100 );
1304 vCex = Cbs3_ReadModel( p );
1305 // solve for each output
1306 Gia_ManForEachCo( pAig, pRoot, i )
1307 {
1308 if ( Gia_ObjIsConst0(Gia_ObjFanin0(pRoot)) )
1309 {
1310 Vec_IntClear( vCex );
1311 Vec_StrPush( vStatus, (char)(!Gia_ObjFaninC0(pRoot)) );
1312 if ( Gia_ObjFaninC0(pRoot) ) // const1
1313 Cec_ManSatAddToStore( vCexStore, vCex, i ); // trivial counter-example
1314 continue;
1315 }
1316 clk = Abc_Clock();
1317 status = Cbs3_ManToSolver2( p, pAig, pRoot, p->Pars.nRestLimit, 10000 );
1318 Vec_StrPush( vStatus, (char)status );
1319 if ( status == -1 )
1320 {
1321 p->nSatUndec++;
1322 p->nConfUndec += p->Pars.nBTThis;
1323 Cec_ManSatAddToStore( vCexStore, NULL, i ); // timeout
1324 p->timeSatUndec += Abc_Clock() - clk;
1325 continue;
1326 }
1327 if ( status == 1 )
1328 {
1329 p->nSatUnsat++;
1330 p->nConfUnsat += p->Pars.nBTThis;
1331 p->timeSatUnsat += Abc_Clock() - clk;
1332 continue;
1333 }
1334 p->nSatSat++;
1335 p->nConfSat += p->Pars.nBTThis;
1336 //Gia_SatVerifyPattern( pAig, pRoot, vCex, vVisit );
1337 Cec_ManSatAddToStore( vCexStore, vCex, i );
1338 p->timeSatSat += Abc_Clock() - clk;
1339 }
1340 Vec_IntFree( vVisit );
1341 p->nSatTotal = Gia_ManPoNum(pAig);
1342 p->timeTotal = Abc_Clock() - clkTotal;
1343 if ( fVerbose )
1345 if ( fVerbose )
1346 {
1347 printf( "Prop1 = %d. Prop2 = %d. Prop3 = %d. ClaConf = %d. FailJ = %d. FailC = %d. ", p->nPropCalls[0], p->nPropCalls[1], p->nPropCalls[2], p->nClauseConf, p->nFails[0], p->nFails[1] );
1348 printf( "Mem usage %.2f MB.\n", 1.0*Cbs3_ManMemory(p)/(1<<20) );
1349 //Abc_PrintTime( 1, "JFront", p->timeJFront );
1350 //Abc_PrintTime( 1, "Loading", p->timeSatLoad );
1351 //printf( "Decisions = %d.\n", p->nDecs );
1352 }
1353 Cbs3_ManStop( p );
1354 *pvStatus = vStatus;
1355 return vCexStore;
1356}
ABC_INT64_T abctime
Definition abc_global.h:332
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
struct Vec_Str_t_ Vec_Str_t
Definition bblif.c:46
void Cec_ManSatAddToStore(Vec_Int_t *vCexStore, Vec_Int_t *vCex, int Out)
Definition cecSolve.c:996
void Cbs3_ManStop(Cbs3_Man_t *p)
Definition giaCSat3.c:246
Vec_Int_t * Cbs3_ReadModel(Cbs3_Man_t *p)
Definition giaCSat3.c:298
void Cbs3_ManSatPrintStats(Cbs3_Man_t *p)
Definition giaCSat3.c:1134
Cbs3_Man_t * Cbs3_ManAlloc(Gia_Man_t *pGia)
Definition giaCSat3.c:183
int Cbs3_ManMemory(Cbs3_Man_t *p)
Definition giaCSat3.c:267
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
void Gia_ManCreateRefs(Gia_Man_t *p)
Definition giaUtil.c:779
#define Gia_ManForEachCo(p, pObj, i)
Definition gia.h:1236
Here is the call graph for this function:

◆ Cbs3_ManStop()

void Cbs3_ManStop ( Cbs3_Man_t * p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 246 of file giaCSat3.c.

247{
248 // circuit structure
249 Vec_IntErase( &p->vMap );
250 Vec_IntErase( &p->vRef );
251 Vec_IntErase( &p->vFans );
252 Vec_WecErase( &p->vImps );
253 // internal data
254 Vec_StrErase( &p->vAssign );
255 Vec_StrErase( &p->vMark );
256 Vec_IntErase( &p->vLevReason );
257 Vec_IntErase( &p->vActs );
258 Vec_IntErase( &p->vWatches );
259 Vec_IntErase( &p->vWatchUpds );
260 Vec_IntFree( p->vModel );
261 Vec_IntFree( p->vTemp );
262 ABC_FREE( p->pClauses.pData );
263 ABC_FREE( p->pProp.pData );
264 ABC_FREE( p->pJust.pData );
265 ABC_FREE( p );
266}
#define ABC_FREE(obj)
Definition abc_global.h:267
Here is the caller graph for this function:

◆ Cbs3_ManUpdateJFrontier()

void Cbs3_ManUpdateJFrontier ( Cbs3_Man_t * p)

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

Synopsis [Propagates a variable.]

Description [Returns clause handle if conflict; 0 if no conflict.]

SideEffects []

SeeAlso []

Definition at line 963 of file giaCSat3.c.

964{
965 //abctime clk = Abc_Clock();
966 int iVar, iLit, i, k = p->pJust.iTail;
967 Cbs3_QueGrow( &p->pJust, Cbs3_QueSize(&p->pJust) + Cbs3_QueSize(&p->pProp) );
968 Cbs3_QueForEachEntry( p->pJust, iVar, i )
969 if ( Cbs3_VarIsJust(p, iVar) )
970 p->pJust.pData[k++] = iVar;
971 Cbs3_QueForEachEntry( p->pProp, iLit, i )
972 if ( Cbs3_VarIsJust(p, Abc_Lit2Var(iLit)) )
973 p->pJust.pData[k++] = Abc_Lit2Var(iLit);
974 p->pJust.iHead = p->pJust.iTail;
975 p->pJust.iTail = k;
976 //p->timeJFront += Abc_Clock() - clk;
977}
Here is the caller graph for this function:

◆ Cbs3_ReadModel()

Vec_Int_t * Cbs3_ReadModel ( Cbs3_Man_t * p)

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

Synopsis [Returns satisfying assignment.]

Description []

SideEffects []

SeeAlso []

Definition at line 298 of file giaCSat3.c.

299{
300 return p->vModel;
301}
Here is the caller graph for this function:

◆ Cbs3_SetDefaultParams()

void Cbs3_SetDefaultParams ( Cbs3_Par_t * pPars)

FUNCTION DEFINITIONS ///.

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

Synopsis [Sets default values of the parameters.]

Description []

SideEffects []

SeeAlso []

Definition at line 159 of file giaCSat3.c.

160{
161 memset( pPars, 0, sizeof(Cbs3_Par_t) );
162 pPars->nBTLimit = 1000; // limit on the number of conflicts
163 pPars->nJustLimit = 500; // limit on the size of justification queue
164 pPars->nRestLimit = 10; // limit on the number of restarts
165 pPars->fVerbose = 1; // print detailed statistics
166}
typedefABC_NAMESPACE_IMPL_START struct Cbs3_Par_t_ Cbs3_Par_t
DECLARATIONS ///.
Definition giaCSat3.c:30
char * memset()
Here is the call graph for this function:
Here is the caller graph for this function: