abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
absRefJ.h File Reference

Go to the source code of this file.

Typedefs

typedef
typedefABC_NAMESPACE_HEADER_START
struct Rf2_Man_t_ 
Rf2_Man_t
 INCLUDES ///. More...
 

Functions

Rf2_Man_tRf2_ManStart (Gia_Man_t *pGia)
 MACRO DEFINITIONS ///. More...
 
void Rf2_ManStop (Rf2_Man_t *p, int fProfile)
 
double Rf2_ManMemoryUsage (Rf2_Man_t *p)
 
Vec_Int_tRf2_ManRefine (Rf2_Man_t *p, Abc_Cex_t *pCex, Vec_Int_t *vMap, int fPropFanout, int fVerbose)
 

Typedef Documentation

typedef typedefABC_NAMESPACE_HEADER_START struct Rf2_Man_t_ Rf2_Man_t

INCLUDES ///.

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

FileName [absRef2.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Abstraction package.]

Synopsis [Refinement manager to compute all justifying subsets.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

Id:
absRef2.h,v 1.00 2005/06/20 00:00:00 alanmi Exp

]PARAMETERS ///BASIC TYPES ///

Definition at line 40 of file absRefJ.h.

Function Documentation

double Rf2_ManMemoryUsage ( Rf2_Man_t p)

Definition at line 249 of file absRefJ.c.

250 {
251  return (double)(sizeof(Rf2_Man_t) + sizeof(Vec_Int_t) * Gia_ManObjNum(p->pGia));
252 }
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
typedefABC_NAMESPACE_HEADER_START struct Rf2_Man_t_ Rf2_Man_t
INCLUDES ///.
Definition: absRefJ.h:40
static int Gia_ManObjNum(Gia_Man_t *p)
Definition: gia.h:388
Vec_Int_t* Rf2_ManRefine ( Rf2_Man_t p,
Abc_Cex_t pCex,
Vec_Int_t vMap,
int  fPropFanout,
int  fVerbose 
)

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

Synopsis [Computes the refinement for a given counter-example.]

Description []

SideEffects []

SeeAlso []

Definition at line 863 of file absRefJ.c.

864 {
865  Vec_Int_t * vJusts;
866 // Vec_Int_t * vSelected = Vec_IntAlloc( 100 );
867  Vec_Int_t * vSelected = NULL;
868  clock_t clk, clk2 = clock();
869  int nGroups;
870  p->nCalls++;
871  // initialize
872  p->pCex = pCex;
873  p->vMap = vMap;
874  p->fPropFanout = fPropFanout;
875  p->fVerbose = fVerbose;
876  // collects used objects
877  Rf2_ManCollect( p );
878  // collect reconvergence points
879 // Rf2_ManGatherFanins( p, 2 );
880  // propagate justification IDs
881  nGroups = Rf2_ManAssignJustIds( p );
882  vJusts = Rf2_ManPropagate( p, 32 );
883 
884 // printf( "\n" );
885 // Rf2_ManPrintVector( vJusts, nGroups );
886  Rf2_ManPrintVectorSpecial( p, vJusts );
887  if ( Vec_IntSize(vJusts) == 0 )
888  {
889  printf( "Empty set of justifying subsets.\n" );
890  return NULL;
891  }
892 
893 // p->nMapWords = Abc_BitWordNum( Vec_IntSize(p->vMap) + Vec_IntSize(p->vObjs) + 1 ); // Map + Flops + Const
894 // Rf2_ManBounds( p );
895 
896  // select the result
897 // Abc_PrintTime( 1, "Time", clock() - clk2 );
898 
899  // verify (empty) refinement
900  clk = clock();
901 // Rf2_ManVerifyUsingTerSim( p->pGia, p->pCex, p->vMap, p->vObjs, vSelected );
902 // Vec_IntUniqify( vSelected );
903 // Vec_IntReverseOrder( vSelected );
904  p->timeVer += clock() - clk;
905  p->timeTotal += clock() - clk2;
906 // p->nRefines += Vec_IntSize(vSelected);
907  return vSelected;
908 }
void Rf2_ManCollect(Rf2_Man_t *p)
Definition: absRefJ.c:282
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
int Rf2_ManAssignJustIds(Rf2_Man_t *p)
Definition: absRefJ.c:636
Vec_Int_t * Rf2_ManPropagate(Rf2_Man_t *p, int Limit)
Definition: absRefJ.c:699
static int Vec_IntSize(Vec_Int_t *p)
Definition: bblif.c:252
static void Rf2_ManPrintVectorSpecial(Rf2_Man_t *p, Vec_Int_t *vVec)
Definition: absRefJ.c:661
Rf2_Man_t* Rf2_ManStart ( Gia_Man_t pGia)

MACRO DEFINITIONS ///.

FUNCTION DECLARATIONS ///

MACRO DEFINITIONS ///.

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

Synopsis [Creates a new manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 211 of file absRefJ.c.

212 {
213  Rf2_Man_t * p;
214  assert( Gia_ManPoNum(pGia) == 1 );
215  p = ABC_CALLOC( Rf2_Man_t, 1 );
216  p->pGia = pGia;
217  p->vObjs = Vec_IntAlloc( 1000 );
218  p->vFanins = Vec_IntAlloc( 1000 );
219  p->pvVecs = ABC_CALLOC( Vec_Int_t, Gia_ManObjNum(pGia) );
220  p->vGrp2Ppi = Vec_VecStart( 100 );
221  Gia_ManCleanMark0(pGia);
222  Gia_ManCleanMark1(pGia);
223  return p;
224 }
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
void Gia_ManCleanMark1(Gia_Man_t *p)
Definition: giaUtil.c:272
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
static Vec_Vec_t * Vec_VecStart(int nSize)
Definition: vecVec.h:168
typedefABC_NAMESPACE_HEADER_START struct Rf2_Man_t_ Rf2_Man_t
INCLUDES ///.
Definition: absRefJ.h:40
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
#define assert(ex)
Definition: util_old.h:213
static int Gia_ManObjNum(Gia_Man_t *p)
Definition: gia.h:388
void Rf2_ManStop ( Rf2_Man_t p,
int  fProfile 
)

Definition at line 225 of file absRefJ.c.

226 {
227  if ( !p ) return;
228  // print runtime statistics
229  if ( fProfile && p->nCalls )
230  {
231  double MemGia = sizeof(Gia_Man_t) + sizeof(Gia_Obj_t) * p->pGia->nObjsAlloc + sizeof(int) * p->pGia->nTravIdsAlloc;
232  double MemOther = sizeof(Rf2_Man_t) + sizeof(Rf2_Obj_t) * p->nObjsAlloc + sizeof(int) * Vec_IntCap(p->vObjs);
233  clock_t timeOther = p->timeTotal - p->timeFwd - p->timeBwd - p->timeVer;
234  printf( "Abstraction refinement runtime statistics:\n" );
235  ABC_PRTP( "Sensetization", p->timeFwd, p->timeTotal );
236  ABC_PRTP( "Justification", p->timeBwd, p->timeTotal );
237  ABC_PRTP( "Verification ", p->timeVer, p->timeTotal );
238  ABC_PRTP( "Other ", timeOther, p->timeTotal );
239  ABC_PRTP( "TOTAL ", p->timeTotal, p->timeTotal );
240  printf( "Total calls = %d. Average refine = %.1f. GIA mem = %.3f MB. Other mem = %.3f MB.\n",
241  p->nCalls, 1.0*p->nRefines/p->nCalls, MemGia/(1<<20), MemOther/(1<<20) );
242  }
243  Vec_IntFree( p->vObjs );
244  Vec_IntFree( p->vFanins );
245  Vec_VecFree( p->vGrp2Ppi );
246  ABC_FREE( p->pvVecs );
247  ABC_FREE( p );
248 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
abctime timeOther
Definition: llb3Image.c:82
typedefABC_NAMESPACE_IMPL_START struct Rf2_Obj_t_ Rf2_Obj_t
DECLARATIONS ///.
Definition: absRefJ.c:75
static void Vec_VecFree(Vec_Vec_t *p)
Definition: vecVec.h:347
Definition: gia.h:75
#define ABC_PRTP(a, t, T)
Definition: abc_global.h:223
static int Vec_IntCap(Vec_Int_t *p)
Definition: vecInt.h:368
#define ABC_FREE(obj)
Definition: abc_global.h:232
typedefABC_NAMESPACE_HEADER_START struct Rf2_Man_t_ Rf2_Man_t
INCLUDES ///.
Definition: absRefJ.h:40
struct Gia_Man_t_ Gia_Man_t
Definition: gia.h:94
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235