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

Go to the source code of this file.

Macros

#define CbsP_QueForEachEntry(Que, pObj, i)
 
#define CbsP_ClauseForEachVar(p, hClause, pObj)
 
#define CbsP_ClauseForEachVar1(p, hClause, pObj)
 

Functions

void CbsP_SetDefaultParams (CbsP_Par_t *pPars)
 FUNCTION DEFINITIONS ///.
 
void CbsP_ManSetConflictNum (CbsP_Man_t *p, int Num)
 
void CbsP_PrintRecord (CbsP_Par_t *pPars)
 
CbsP_Man_tCbsP_ManAlloc (Gia_Man_t *pGia)
 
void CbsP_ManStop (CbsP_Man_t *p)
 
Vec_Int_tCbsP_ReadModel (CbsP_Man_t *p)
 
int CbsP_ManPropagate (CbsP_Man_t *p, int Level)
 
int CbsP_ManSolve_rec (CbsP_Man_t *p, int Level)
 
int CbsP_ManSolve (CbsP_Man_t *p, Gia_Obj_t *pObj)
 
int CbsP_ManSolve2 (CbsP_Man_t *p, Gia_Obj_t *pObj, Gia_Obj_t *pObj2)
 
void CbsP_ManSatPrintStats (CbsP_Man_t *p)
 
Vec_Int_tCbsP_ManSolveMiterNc (Gia_Man_t *pAig, int nConfs, Vec_Str_t **pvStatus, int f0Proved, int fVerbose)
 

Macro Definition Documentation

◆ CbsP_ClauseForEachVar

#define CbsP_ClauseForEachVar ( p,
hClause,
pObj )
Value:
for ( (p)->pIter = (p)->pClauses.pData + hClause; (pObj = *pIter); (p)->pIter++ )
Cube * p
Definition exorList.c:222

Definition at line 52 of file giaCSatP.c.

52#define CbsP_ClauseForEachVar( p, hClause, pObj ) \
53 for ( (p)->pIter = (p)->pClauses.pData + hClause; (pObj = *pIter); (p)->pIter++ )

◆ CbsP_ClauseForEachVar1

#define CbsP_ClauseForEachVar1 ( p,
hClause,
pObj )
Value:
for ( (p)->pIter = (p)->pClauses.pData+hClause+1; (pObj = *pIter); (p)->pIter++ )

Definition at line 54 of file giaCSatP.c.

54#define CbsP_ClauseForEachVar1( p, hClause, pObj ) \
55 for ( (p)->pIter = (p)->pClauses.pData+hClause+1; (pObj = *pIter); (p)->pIter++ )

◆ CbsP_QueForEachEntry

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

Definition at line 49 of file giaCSatP.c.

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

Function Documentation

◆ CbsP_ManAlloc()

CbsP_Man_t * CbsP_ManAlloc ( Gia_Man_t * pGia)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 173 of file giaCSatP.c.

174{
175 CbsP_Man_t * p;
176 p = ABC_CALLOC( CbsP_Man_t, 1 );
177 p->pProp.nSize = p->pJust.nSize = p->pClauses.nSize = 10000;
178 p->pProp.pData = ABC_ALLOC( Gia_Obj_t *, p->pProp.nSize );
179 p->pJust.pData = ABC_ALLOC( Gia_Obj_t *, p->pJust.nSize );
180 p->pClauses.pData = ABC_ALLOC( Gia_Obj_t *, p->pClauses.nSize );
181 p->pClauses.iHead = p->pClauses.iTail = 1;
182 p->vModel = Vec_IntAlloc( 1000 );
183 p->vLevReas = Vec_IntAlloc( 1000 );
184 p->vTemp = Vec_PtrAlloc( 1000 );
185 p->pAig = pGia;
186 p->vValue = Vec_IntAlloc( Gia_ManObjNum(pGia) );
187 Vec_IntFill( p->vValue, Gia_ManObjNum(pGia), ~0 );
188 //memset( p->vValue->pArray, (unsigned) ~0, sizeof(int) * Gia_ManObjNum(pGia) );
189 CbsP_SetDefaultParams( &p->Pars );
190 return p;
191}
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
#define ABC_CALLOC(type, num)
Definition abc_global.h:265
void CbsP_SetDefaultParams(CbsP_Par_t *pPars)
FUNCTION DEFINITIONS ///.
Definition giaCSatP.c:72
struct CbsP_Man_t_ CbsP_Man_t
Definition giaCSatP.h:75
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CbsP_ManPropagate()

int CbsP_ManPropagate ( CbsP_Man_t * p,
int Level )

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

Synopsis [Propagates all variables.]

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

SideEffects []

SeeAlso []

Definition at line 869 of file giaCSatP.c.

870{
871 int hClause;
872 Gia_Obj_t * pVar;
873 int i, k;
874 while ( 1 )
875 {
876 CbsP_QueForEachEntry( p->pProp, pVar, i )
877 {
878 if ( (hClause = CbsP_ManPropagateOne( p, pVar, Level )) )
879 return hClause;
880 if( CbsP_ManCheckPropLimits(p) )
881 return 0;
882 }
883 p->pProp.iHead = p->pProp.iTail;
884 k = p->pJust.iHead;
885 CbsP_QueForEachEntry( p->pJust, pVar, i )
886 {
887 if ( CbsP_VarIsJust( pVar ) )
888 p->pJust.pData[k++] = pVar;
889 else if ( (hClause = CbsP_ManPropagateTwo( p, pVar, Level )) )
890 return hClause;
891 if( CbsP_ManCheckPropLimits(p) )
892 return 0;
893 }
894 if ( k == p->pJust.iTail )
895 break;
896 p->pJust.iTail = k;
897 }
898 return 0;
899}
#define CbsP_QueForEachEntry(Que, pObj, i)
Definition giaCSatP.c:49
Here is the caller graph for this function:

◆ CbsP_ManSatPrintStats()

void CbsP_ManSatPrintStats ( CbsP_Man_t * p)

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

Synopsis [Prints statistics of the manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 1073 of file giaCSatP.c.

1074{
1075 printf( "CO = %8d ", Gia_ManCoNum(p->pAig) );
1076 printf( "AND = %8d ", Gia_ManAndNum(p->pAig) );
1077 printf( "Conf = %6d ", p->Pars.nBTLimit );
1078 printf( "JustMax = %5d ", p->Pars.nJustLimit );
1079 printf( "\n" );
1080 printf( "Unsat calls %6d (%6.2f %%) Ave conf = %8.1f ",
1081 p->nSatUnsat, p->nSatTotal? 100.0*p->nSatUnsat/p->nSatTotal :0.0, p->nSatUnsat? 1.0*p->nConfUnsat/p->nSatUnsat :0.0 );
1082 ABC_PRTP( "Time", p->timeSatUnsat, p->timeTotal );
1083 printf( "Sat calls %6d (%6.2f %%) Ave conf = %8.1f ",
1084 p->nSatSat, p->nSatTotal? 100.0*p->nSatSat/p->nSatTotal :0.0, p->nSatSat? 1.0*p->nConfSat/p->nSatSat : 0.0 );
1085 ABC_PRTP( "Time", p->timeSatSat, p->timeTotal );
1086 printf( "Undef calls %6d (%6.2f %%) Ave conf = %8.1f ",
1087 p->nSatUndec, p->nSatTotal? 100.0*p->nSatUndec/p->nSatTotal :0.0, p->nSatUndec? 1.0*p->nConfUndec/p->nSatUndec : 0.0 );
1088 ABC_PRTP( "Time", p->timeSatUndec, p->timeTotal );
1089 ABC_PRT( "Total time", p->timeTotal );
1090}
#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:

◆ CbsP_ManSetConflictNum()

void CbsP_ManSetConflictNum ( CbsP_Man_t * p,
int Num )

Definition at line 107 of file giaCSatP.c.

108{
109 p->Pars.nBTLimit = Num;
110}

◆ CbsP_ManSolve()

int CbsP_ManSolve ( CbsP_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 [The two procedures differ in the CEX format.]

SeeAlso []

Definition at line 994 of file giaCSatP.c.

995{
996 int RetValue = 0;
997// s_Counter = 0;
998 assert( !p->pProp.iHead && !p->pProp.iTail );
999 assert( !p->pJust.iHead && !p->pJust.iTail );
1000 assert( p->pClauses.iHead == 1 && p->pClauses.iTail == 1 );
1001 p->Pars.nBTThis = p->Pars.nJustThis = p->Pars.nBTThisNc = 0;
1002 CbsP_ManAssign( p, pObj, 0, NULL, NULL );
1003 if ( !CbsP_ManSolve_rec(p, 0) && !CbsP_ManCheckLimits(p) )
1004 CbsP_ManSaveModel( p, p->vModel );
1005 else
1006 RetValue = 1;
1007 CbsP_ManCancelUntil( p, 0 );
1008 p->pJust.iHead = p->pJust.iTail = 0;
1009 p->pClauses.iHead = p->pClauses.iTail = 1;
1010 p->Pars.nBTTotal += p->Pars.nBTThis;
1011 p->Pars.nJustTotal = Abc_MaxInt( p->Pars.nJustTotal, p->Pars.nJustThis );
1012 if ( CbsP_ManCheckLimits( p ) )
1013 RetValue = -1;
1014// printf( "%d ", s_Counter );
1015 return RetValue;
1016}
int CbsP_ManSolve_rec(CbsP_Man_t *p, int Level)
Definition giaCSatP.c:912
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CbsP_ManSolve2()

int CbsP_ManSolve2 ( CbsP_Man_t * p,
Gia_Obj_t * pObj,
Gia_Obj_t * pObj2 )

Definition at line 1017 of file giaCSatP.c.

1018{
1019 abctime clk = Abc_Clock();
1020 int RetValue = 0;
1021// s_Counter = 0;
1022 assert( !p->pProp.iHead && !p->pProp.iTail );
1023 assert( !p->pJust.iHead && !p->pJust.iTail );
1024 assert( p->pClauses.iHead == 1 && p->pClauses.iTail == 1 );
1025 p->Pars.nBTThis = p->Pars.nJustThis = p->Pars.nBTThisNc = 0;
1026 p->Pars.nJscanThis = p->Pars.nRscanThis = p->Pars.nPropThis = 0;
1027 CbsP_ManAssign( p, pObj, 0, NULL, NULL );
1028 if ( pObj2 )
1029 CbsP_ManAssign( p, pObj2, 0, NULL, NULL );
1030 if ( !CbsP_ManSolve_rec(p, 0) && !CbsP_ManCheckLimits(p) )
1031 CbsP_ManSaveModel( p, p->vModel );
1032 else
1033 RetValue = 1;
1034 CbsP_ManCancelUntil( p, 0 );
1035
1036 p->pJust.iHead = p->pJust.iTail = 0;
1037 p->pClauses.iHead = p->pClauses.iTail = 1;
1038 p->Pars.nBTTotal += p->Pars.nBTThis;
1039 p->Pars.nJustTotal = Abc_MaxInt( p->Pars.nJustTotal, p->Pars.nJustThis );
1040 if ( CbsP_ManCheckLimits( p ) )
1041 RetValue = -1;
1042
1043 if( CBS_SAT == RetValue ){
1044 p->nSatSat ++;
1045 p->timeSatSat += Abc_Clock() - clk;
1046 p->nConfSat += p->Pars.nBTThis;
1047 } else
1048 if( CBS_UNSAT == RetValue ){
1049 p->nSatUnsat ++;
1050 p->timeSatUnsat += Abc_Clock() - clk;
1051 p->nConfUnsat += p->Pars.nBTThis;
1052 } else {
1053 p->nSatUndec ++;
1054 p->timeSatUndec += Abc_Clock() - clk;
1055 p->nConfUndec += p->Pars.nBTThis;
1056 }
1057// printf( "%d ", s_Counter );
1058 CbsP_UpdateRecord(&p->Pars,RetValue);
1059 return RetValue;
1060}
ABC_INT64_T abctime
Definition abc_global.h:332
#define CBS_UNSAT
Definition giaCSatP.h:110
#define CBS_SAT
Definition giaCSatP.h:111
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CbsP_ManSolve_rec()

int CbsP_ManSolve_rec ( CbsP_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 912 of file giaCSatP.c.

913{
914 CbsP_Que_t * pQue = &(p->pClauses);
915 Gia_Obj_t * pVar = NULL, * pDecVar;
916 int hClause, hLearn0, hLearn1;
917 int iPropHead, iJustHead, iJustTail;
918 // propagate assignments
919 assert( !CbsP_QueIsEmpty(&p->pProp) );
920 if ( (hClause = CbsP_ManPropagate( p, Level )) )
921 return hClause;
922
923 // quit using resource limits
924 if ( CbsP_ManCheckLimits( p ) )
925 return 0;
926 // check for satisfying assignment
927 assert( CbsP_QueIsEmpty(&p->pProp) );
928 if ( CbsP_QueIsEmpty(&p->pJust) )
929 return 0;
930 p->Pars.nJustThis = Abc_MaxInt( p->Pars.nJustThis, p->pJust.iTail - p->pJust.iHead );
931 // remember the state before branching
932 iPropHead = p->pProp.iHead;
933 CbsP_QueStore( &p->pJust, &iJustHead, &iJustTail );
934 p->Pars.nJscanThis += iJustTail - iJustHead;
935 if ( CbsP_ManCheckLimits( p ) )
936 return 0;
937 // find the decision variable
938 if ( p->Pars.fUseHighest )
939 pVar = CbsP_ManDecideHighest( p );
940 else if ( p->Pars.fUseLowest )
941 pVar = CbsP_ManDecideLowest( p );
942 else if ( p->Pars.fUseMaxFF )
943 pVar = CbsP_ManDecideMaxFF( p );
944 else assert( 0 );
945 assert( CbsP_VarIsJust( pVar ) );
946 // chose decision variable using fanout count
947
948 if ( Gia_ObjRefNum(p->pAig, Gia_ObjFanin0(pVar)) > Gia_ObjRefNum(p->pAig, Gia_ObjFanin1(pVar)) )
949 pDecVar = Gia_Not(Gia_ObjChild0(pVar));
950 else
951 pDecVar = Gia_Not(Gia_ObjChild1(pVar));
952
953// pDecVar = Gia_NotCond( Gia_Regular(pDecVar), Gia_Regular(pDecVar)->fPhase );
954// pDecVar = Gia_Not(pDecVar);
955 // decide on first fanin
956 CbsP_ManAssign( p, pDecVar, Level+1, NULL, NULL );
957 if ( !(hLearn0 = CbsP_ManSolve_rec( p, Level+1 )) )
958 return 0;
959 if ( CbsP_ManCheckLimits( p ) )
960 return 0;
961 if ( pQue->pData[hLearn0] != Gia_Regular(pDecVar) )
962 return hLearn0;
963 CbsP_ManCancelUntil( p, iPropHead );
964 CbsP_QueRestore( &p->pJust, iJustHead, iJustTail );
965 // decide on second fanin
966 CbsP_ManAssign( p, Gia_Not(pDecVar), Level+1, NULL, NULL );
967 if ( !(hLearn1 = CbsP_ManSolve_rec( p, Level+1 )) )
968 return 0;
969 if ( CbsP_ManCheckLimits( p ) )
970 return 0;
971 if ( pQue->pData[hLearn1] != Gia_Regular(pDecVar) )
972 return hLearn1;
973 hClause = CbsP_ManResolve( p, Level, hLearn0, hLearn1 );
974// CbsP_ManPrintClauseNew( p, Level, hClause );
975// if ( Level > CbsP_ClauseDecLevel(p, hClause) )
976// p->Pars.nBTThisNc++;
977 p->Pars.nBTThis++;
978 return hClause;
979}
int CbsP_ManPropagate(CbsP_Man_t *p, int Level)
Definition giaCSatP.c:869
struct CbsP_Que_t_ CbsP_Que_t
Definition giaCSatP.h:66
Gia_Obj_t ** pData
Definition giaCSatP.h:72
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CbsP_ManSolveMiterNc()

Vec_Int_t * CbsP_ManSolveMiterNc ( Gia_Man_t * pAig,
int nConfs,
Vec_Str_t ** pvStatus,
int f0Proved,
int fVerbose )

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

Synopsis [Procedure to test the new SAT solver.]

Description []

SideEffects []

SeeAlso []

Definition at line 1103 of file giaCSatP.c.

1104{
1105 extern void Gia_ManCollectTest( Gia_Man_t * pAig );
1106 extern void Cec_ManSatAddToStore( Vec_Int_t * vCexStore, Vec_Int_t * vCex, int Out );
1107 CbsP_Man_t * p;
1108 Vec_Int_t * vCex, * vVisit, * vCexStore;
1109 Vec_Str_t * vStatus;
1110 Gia_Obj_t * pRoot;
1111 int i, status;
1112 abctime clk, clkTotal = Abc_Clock();
1113 assert( Gia_ManRegNum(pAig) == 0 );
1114// Gia_ManCollectTest( pAig );
1115 // prepare AIG
1116 Gia_ManCreateRefs( pAig );
1117 Gia_ManCleanMark0( pAig );
1118 Gia_ManCleanMark1( pAig );
1119 Gia_ManFillValue( pAig ); // maps nodes into trail ids
1120 Gia_ManSetPhase( pAig ); // maps nodes into trail ids
1121 // create logic network
1122 p = CbsP_ManAlloc( pAig );
1123 p->Pars.nBTLimit = nConfs;
1124 // create resulting data-structures
1125 vStatus = Vec_StrAlloc( Gia_ManPoNum(pAig) );
1126 vCexStore = Vec_IntAlloc( 10000 );
1127 vVisit = Vec_IntAlloc( 100 );
1128 vCex = CbsP_ReadModel( p );
1129 // solve for each output
1130 Gia_ManForEachCo( pAig, pRoot, i )
1131 {
1132// printf( "\n" );
1133
1134 Vec_IntClear( vCex );
1135 if ( Gia_ObjIsConst0(Gia_ObjFanin0(pRoot)) )
1136 {
1137 if ( Gia_ObjFaninC0(pRoot) )
1138 {
1139// printf( "Constant 1 output of SRM!!!\n" );
1140 Cec_ManSatAddToStore( vCexStore, vCex, i ); // trivial counter-example
1141 Vec_StrPush( vStatus, 0 );
1142 }
1143 else
1144 {
1145// printf( "Constant 0 output of SRM!!!\n" );
1146 Vec_StrPush( vStatus, 1 );
1147 }
1148 continue;
1149 }
1150 clk = Abc_Clock();
1151 p->Pars.fUseHighest = 1;
1152 p->Pars.fUseLowest = 0;
1153 status = CbsP_ManSolve( p, Gia_ObjChild0(pRoot) );
1154// printf( "\n" );
1155/*
1156 if ( status == -1 )
1157 {
1158 p->Pars.fUseHighest = 0;
1159 p->Pars.fUseLowest = 1;
1160 status = CbsP_ManSolve( p, Gia_ObjChild0(pRoot) );
1161 }
1162*/
1163 Vec_StrPush( vStatus, (char)status );
1164 if ( status == -1 )
1165 {
1166 p->nSatUndec++;
1167 p->nConfUndec += p->Pars.nBTThis;
1168 Cec_ManSatAddToStore( vCexStore, NULL, i ); // timeout
1169 p->timeSatUndec += Abc_Clock() - clk;
1170 continue;
1171 }
1172 if ( status == 1 )
1173 {
1174 if ( f0Proved )
1175 Gia_ManPatchCoDriver( pAig, i, 0 );
1176 p->nSatUnsat++;
1177 p->nConfUnsat += p->Pars.nBTThis;
1178 p->timeSatUnsat += Abc_Clock() - clk;
1179 continue;
1180 }
1181 p->nSatSat++;
1182 p->nConfSat += p->Pars.nBTThis;
1183// Gia_SatVerifyPattern( pAig, pRoot, vCex, vVisit );
1184 Cec_ManSatAddToStore( vCexStore, vCex, i );
1185 p->timeSatSat += Abc_Clock() - clk;
1186 }
1187 Vec_IntFree( vVisit );
1188 p->nSatTotal = Gia_ManPoNum(pAig);
1189 p->timeTotal = Abc_Clock() - clkTotal;
1190 if ( fVerbose )
1192// printf( "RecCalls = %8d. RecClause = %8d. RecNonChro = %8d.\n", p->nRecCall, p->nRecClause, p->nRecNonChro );
1193 CbsP_ManStop( p );
1194 *pvStatus = vStatus;
1195
1196// printf( "Total number of cex literals = %d. (Ave = %d)\n",
1197// Vec_IntSize(vCexStore)-2*p->nSatUndec-2*p->nSatSat,
1198// (Vec_IntSize(vCexStore)-2*p->nSatUndec-2*p->nSatSat)/p->nSatSat );
1199 return vCexStore;
1200}
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
CbsP_Man_t * CbsP_ManAlloc(Gia_Man_t *pGia)
Definition giaCSatP.c:173
void CbsP_ManStop(CbsP_Man_t *p)
Definition giaCSatP.c:204
void CbsP_ManSatPrintStats(CbsP_Man_t *p)
Definition giaCSatP.c:1073
Vec_Int_t * CbsP_ReadModel(CbsP_Man_t *p)
Definition giaCSatP.c:227
int CbsP_ManSolve(CbsP_Man_t *p, Gia_Obj_t *pObj)
Definition giaCSatP.c:994
void Gia_ManCollectTest(Gia_Man_t *p)
Definition giaDfs.c:232
void Gia_ManFillValue(Gia_Man_t *p)
Definition giaUtil.c:369
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
void Gia_ManCleanMark0(Gia_Man_t *p)
Definition giaUtil.c:256
void Gia_ManCreateRefs(Gia_Man_t *p)
Definition giaUtil.c:779
#define Gia_ManForEachCo(p, pObj, i)
Definition gia.h:1236
void Gia_ManSetPhase(Gia_Man_t *p)
Definition giaUtil.c:420
void Gia_ManCleanMark1(Gia_Man_t *p)
Definition giaUtil.c:313
Here is the call graph for this function:

◆ CbsP_ManStop()

void CbsP_ManStop ( CbsP_Man_t * p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 204 of file giaCSatP.c.

205{
206 Vec_IntFree( p->vLevReas );
207 Vec_IntFree( p->vModel );
208 Vec_PtrFree( p->vTemp );
209 Vec_IntFree( p->vValue );
210 ABC_FREE( p->pClauses.pData );
211 ABC_FREE( p->pProp.pData );
212 ABC_FREE( p->pJust.pData );
213 ABC_FREE( p );
214}
#define ABC_FREE(obj)
Definition abc_global.h:267
Here is the caller graph for this function:

◆ CbsP_PrintRecord()

void CbsP_PrintRecord ( CbsP_Par_t * pPars)

Definition at line 148 of file giaCSatP.c.

148 {
149 printf("max of solved: jscan# %13d rscan %13d prop %13d\n" , pPars->maxJscanSolved, pPars->maxRscanSolved , pPars->maxPropSolved );
150 printf("max of undec: jscan# %13d rscan %13d prop %13d\n" , pPars->maxJscanUndec , pPars->maxRscanUndec , pPars->maxPropUndec );
151 printf("acc of sat: jscan# %13ld rscan %13ld prop %13ld\n", pPars->accJscanSat , pPars->accRscanSat , pPars->accPropSat );
152 printf("acc of unsat: jscan# %13ld rscan %13ld prop %13ld\n", pPars->accJscanUnsat , pPars->accRscanUnsat , pPars->accPropUnsat );
153 printf("acc of undec: jscan# %13ld rscan %13ld prop %13ld\n", pPars->accJscanUndec , pPars->accRscanUndec , pPars->accPropUndec );
154 if( pPars->nSat )
155 printf("avg of sat: jscan# %13ld rscan %13ld prop %13ld\n", pPars->accJscanSat / pPars->nSat , pPars->accRscanSat / pPars->nSat , pPars->accPropSat / pPars->nSat );
156 if( pPars->nUnsat )
157 printf("avg of unsat: jscan# %13ld rscan %13ld prop %13ld\n", pPars->accJscanUnsat / pPars->nUnsat , pPars->accRscanUnsat / pPars->nUnsat , pPars->accPropUnsat / pPars->nUnsat );
158 if( pPars->nUndec )
159 printf("avg of undec: jscan# %13ld rscan %13ld prop %13ld\n", pPars->accJscanUndec / pPars->nUndec , pPars->accRscanUndec / pPars->nUndec , pPars->accPropUndec / pPars->nUndec );
160}
Here is the caller graph for this function:

◆ CbsP_ReadModel()

Vec_Int_t * CbsP_ReadModel ( CbsP_Man_t * p)

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

Synopsis [Returns satisfying assignment.]

Description []

SideEffects []

SeeAlso []

Definition at line 227 of file giaCSatP.c.

228{
229 return p->vModel;
230}
Here is the caller graph for this function:

◆ CbsP_SetDefaultParams()

void CbsP_SetDefaultParams ( CbsP_Par_t * pPars)

FUNCTION DEFINITIONS ///.

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

Synopsis [Sets default values of the parameters.]

Description []

SideEffects []

SeeAlso []

Definition at line 72 of file giaCSatP.c.

73{
74 memset( pPars, 0, sizeof(CbsP_Par_t) );
75 pPars->nBTLimit = 1000; // limit on the number of conflicts
76 pPars->nJustLimit = 100; // limit on the size of justification queue
77 pPars->fUseHighest = 1; // use node with the highest ID
78 pPars->fUseLowest = 0; // use node with the highest ID
79 pPars->fUseMaxFF = 0; // use node with the largest fanin fanout
80 pPars->fVerbose = 1; // print detailed statistics
81
82 pPars->fUseProved = 1;
83
84
85 pPars->nJscanThis = 0;
86 pPars->nRscanThis = 0;
87 pPars->maxJscanUndec = 0;
88 pPars->maxRscanUndec = 0;
89 pPars->maxJscanSolved = 0;
90 pPars->maxRscanSolved = 0;
91
92
93 pPars->accJscanSat = 0;
94 pPars->accJscanUnsat = 0;
95 pPars->accJscanUndec = 0;
96 pPars->accRscanSat = 0;
97 pPars->accRscanUnsat = 0;
98 pPars->accRscanUndec = 0;
99 pPars->nSat = 0;
100 pPars->nUnsat = 0;
101 pPars->nUndec = 0;
102
103 pPars->nJscanLimit = 100;
104 pPars->nRscanLimit = 100;
105 pPars->nPropLimit = 500;
106}
typedefABC_NAMESPACE_HEADER_START struct CbsP_Par_t_ CbsP_Par_t
INCLUDES ///.
Definition giaCSatP.h:19
char * memset()
Here is the call graph for this function:
Here is the caller graph for this function: