ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
giaCSatP.h File Reference
#include "gia.h"
Include dependency graph for giaCSatP.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CbsP_Par_t_
 
struct  CbsP_Que_t_
 
struct  CbsP_Man_t_
 

Macros

#define CBS_UNSAT   1
 
#define CBS_SAT   0
 
#define CBS_UNDEC   -1
 

Typedefs

typedef typedefABC_NAMESPACE_HEADER_START struct CbsP_Par_t_ CbsP_Par_t
 INCLUDES ///.
 
typedef struct CbsP_Que_t_ CbsP_Que_t
 
typedef struct CbsP_Man_t_ CbsP_Man_t
 

Functions

CbsP_Man_tCbsP_ManAlloc (Gia_Man_t *pGia)
 
void CbsP_ManStop (CbsP_Man_t *p)
 
void CbsP_ManSatPrintStats (CbsP_Man_t *p)
 
void CbsP_PrintRecord (CbsP_Par_t *pPars)
 
int CbsP_ManSolve2 (CbsP_Man_t *p, Gia_Obj_t *pObj, Gia_Obj_t *pObj2)
 

Macro Definition Documentation

◆ CBS_SAT

#define CBS_SAT   0

Definition at line 111 of file giaCSatP.h.

◆ CBS_UNDEC

#define CBS_UNDEC   -1

Definition at line 112 of file giaCSatP.h.

◆ CBS_UNSAT

#define CBS_UNSAT   1

Definition at line 110 of file giaCSatP.h.

Typedef Documentation

◆ CbsP_Man_t

typedef struct CbsP_Man_t_ CbsP_Man_t

Definition at line 75 of file giaCSatP.h.

◆ CbsP_Par_t

typedef typedefABC_NAMESPACE_HEADER_START struct CbsP_Par_t_ CbsP_Par_t

INCLUDES ///.

PARAMETERS ///

Definition at line 19 of file giaCSatP.h.

◆ CbsP_Que_t

typedef struct CbsP_Que_t_ CbsP_Que_t

Definition at line 66 of file giaCSatP.h.

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
Cube * p
Definition exorList.c:222
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_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_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
int CbsP_ManSolve_rec(CbsP_Man_t *p, int Level)
Definition giaCSatP.c:912
#define CBS_UNSAT
Definition giaCSatP.h:110
#define CBS_SAT
Definition giaCSatP.h:111
#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_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: