ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
absRef.h
Go to the documentation of this file.
1
20
21#ifndef ABC__proof_abs__AbsRef_h
22#define ABC__proof_abs__AbsRef_h
23
24
28
32
34
35
39
40
44
45typedef struct Rnm_Obj_t_ Rnm_Obj_t; // refinement object
47{
48 unsigned Value : 1; // binary value
49 unsigned fVisit : 1; // visited object
50 unsigned fVisitJ : 1; // justified visited object
51 unsigned fPPi : 1; // PPI object
52 unsigned Prio : 24; // priority (0 - highest)
53};
54
55typedef struct Rnm_Man_t_ Rnm_Man_t; // refinement manager
57{
58 // user data
59 Gia_Man_t * pGia; // working AIG manager (it is completely owned by this package)
60 Abc_Cex_t * pCex; // counter-example
61 Vec_Int_t * vMap; // mapping of CEX inputs into objects (PI + PPI, in any order)
62 int fPropFanout; // propagate fanouts
63 int fVerbose; // verbose flag
64 int nRefId; // refinement ID
65 // traversing data
66 Vec_Int_t * vObjs; // internal objects used in value propagation
67 // filtering of selected objects
68 Vec_Str_t * vCounts; // fanin counters
69 Vec_Int_t * vFanins; // fanins
70/*
71 // SAT solver
72 sat_solver2 * pSat; // incremental SAT solver
73 Vec_Int_t * vSatVars; // SAT variables
74 Vec_Int_t * vSat2Ids; // mapping of SAT variables into object IDs
75 Vec_Int_t * vIsopMem; // memory for ISOP computation
76*/
77 // internal data
78 Rnm_Obj_t * pObjs; // refinement objects
79 int nObjs; // the number of used objects
80 int nObjsAlloc; // the number of allocated objects
81 int nObjsFrame; // the number of used objects in each frame
82 int nCalls; // total number of calls
83 int nRefines; // total refined objects
84 int nVisited; // visited during justification
85 // statistics
86 abctime timeFwd; // forward propagation
87 abctime timeBwd; // backward propagation
88 abctime timeVer; // ternary simulation
89 abctime timeTotal; // other time
90};
91
92// accessing the refinement object
93static inline Rnm_Obj_t * Rnm_ManObj( Rnm_Man_t * p, Gia_Obj_t * pObj, int f )
94{
95 assert( Gia_ObjIsConst0(pObj) || pObj->Value );
96 assert( (int)pObj->Value < p->nObjsFrame );
97 assert( f >= 0 && f <= p->pCex->iFrame );
98 return p->pObjs + f * p->nObjsFrame + pObj->Value;
99}
100static inline void Rnm_ManSetRefId( Rnm_Man_t * p, int RefId ) { p->nRefId = RefId; }
101
102static inline int Rnm_ObjCount( Rnm_Man_t * p, Gia_Obj_t * pObj ) { return Vec_StrEntry( p->vCounts, Gia_ObjId(p->pGia, pObj) ); }
103static inline void Rnm_ObjSetCount( Rnm_Man_t * p, Gia_Obj_t * pObj, int c ) { Vec_StrWriteEntry( p->vCounts, Gia_ObjId(p->pGia, pObj), (char)c ); }
104static inline int Rnm_ObjAddToCount( Rnm_Man_t * p, Gia_Obj_t * pObj ) { int c = Rnm_ObjCount(p, pObj); if ( c < 16 ) Rnm_ObjSetCount(p, pObj, c+1); return c; }
105
106static inline int Rnm_ObjIsJust( Rnm_Man_t * p, Gia_Obj_t * pObj ) { return Gia_ObjIsConst0(pObj) || (pObj->Value && Rnm_ManObj(p, pObj, 0)->fVisitJ); }
107
111
112/*=== absRef.c ===========================================================*/
113extern Rnm_Man_t * Rnm_ManStart( Gia_Man_t * pGia );
114extern void Rnm_ManStop( Rnm_Man_t * p, int fProfile );
115extern double Rnm_ManMemoryUsage( Rnm_Man_t * p );
116extern Vec_Int_t * Rnm_ManRefine( Rnm_Man_t * p, Abc_Cex_t * pCex, Vec_Int_t * vMap, int fPropFanout, int fNewRefinement, int fVerbose );
117/*=== absRefSelected.c ===========================================================*/
118extern Vec_Int_t * Rnm_ManFilterSelected( Rnm_Man_t * p, Vec_Int_t * vOldPPis );
119extern Vec_Int_t * Rnm_ManFilterSelectedNew( Rnm_Man_t * p, Vec_Int_t * vOldPPis );
120
121
123
124#endif
125
129
ABC_INT64_T abctime
Definition abc_global.h:332
#define ABC_NAMESPACE_HEADER_END
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Vec_Int_t * Rnm_ManFilterSelectedNew(Rnm_Man_t *p, Vec_Int_t *vOldPPis)
typedefABC_NAMESPACE_HEADER_START struct Rnm_Obj_t_ Rnm_Obj_t
INCLUDES ///.
Definition absRef.h:45
void Rnm_ManStop(Rnm_Man_t *p, int fProfile)
Definition absRef.c:285
Vec_Int_t * Rnm_ManFilterSelected(Rnm_Man_t *p, Vec_Int_t *vOldPPis)
double Rnm_ManMemoryUsage(Rnm_Man_t *p)
Definition absRef.c:317
Vec_Int_t * Rnm_ManRefine(Rnm_Man_t *p, Abc_Cex_t *pCex, Vec_Int_t *vMap, int fPropFanout, int fNewRefinement, int fVerbose)
Definition absRef.c:673
Rnm_Man_t * Rnm_ManStart(Gia_Man_t *pGia)
FUNCTION DECLARATIONS ///.
Definition absRef.c:264
struct Rnm_Man_t_ Rnm_Man_t
Definition absRef.h:55
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
Cube * p
Definition exorList.c:222
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
unsigned Value
Definition gia.h:89
int fPropFanout
Definition absRef.h:62
int nObjs
Definition absRef.h:79
Vec_Int_t * vMap
Definition absRef.h:61
abctime timeFwd
Definition absRef.h:86
int fVerbose
Definition absRef.h:63
Vec_Int_t * vFanins
Definition absRef.h:69
int nObjsFrame
Definition absRef.h:81
int nRefId
Definition absRef.h:64
int nVisited
Definition absRef.h:84
int nCalls
Definition absRef.h:82
abctime timeTotal
Definition absRef.h:89
Abc_Cex_t * pCex
Definition absRef.h:60
Vec_Str_t * vCounts
Definition absRef.h:68
int nObjsAlloc
Definition absRef.h:80
abctime timeBwd
Definition absRef.h:87
Vec_Int_t * vObjs
Definition absRef.h:66
int nRefines
Definition absRef.h:83
Rnm_Obj_t * pObjs
Definition absRef.h:78
Gia_Man_t * pGia
Definition absRef.h:59
abctime timeVer
Definition absRef.h:88
unsigned Prio
Definition absRef.h:52
unsigned fVisit
Definition absRef.h:49
unsigned fVisitJ
Definition absRef.h:50
unsigned fPPi
Definition absRef.h:51
unsigned Value
Definition absRef.h:48
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
Definition utilCex.h:39
#define assert(ex)
Definition util_old.h:213