ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
int2Int.h
Go to the documentation of this file.
1
20
21#ifndef ABC__Gia__int2__intInt_h
22#define ABC__Gia__int2__intInt_h
23
24
28
29#include "aig/gia/gia.h"
30#include "sat/bsat/satSolver.h"
31#include "sat/cnf/cnf.h"
32#include "int2.h"
33
37
39
43
44// interpolation manager
45typedef struct Int2_Man_t_ Int2_Man_t;
47{
48 // parameters
49 Int2_ManPars_t * pPars; // parameters
50 // GIA managers
51 Gia_Man_t * pGia; // original manager
52 Gia_Man_t * pGiaPref; // prefix manager
53 Gia_Man_t * pGiaSuff; // suffix manager
54 // subset of the manager
55 Vec_Int_t * vSuffCis; // suffix CIs
56 Vec_Int_t * vSuffCos; // suffix COs
57 Vec_Int_t * vPrefCos; // suffix POs
58 Vec_Int_t * vStack; // temporary stack
59 // preimages
60 Vec_Int_t * vImageOne; // latest preimage
61 Vec_Int_t * vImagesAll; // cumulative preimage
62 // variable maps
63 Vec_Ptr_t * vMapFrames; // mapping of GIA IDs into frame IDs
64 Vec_Int_t * vMapPref; // mapping of flop inputs into SAT variables
65 Vec_Int_t * vMapSuff; // mapping of flop outputs into SAT variables
66 // initial minimization
67 Vec_Int_t * vAssign; // assignment of PIs in pGiaSuff
68 Vec_Int_t * vPrio; // priority of PIs in pGiaSuff
69 // SAT solving
70 sat_solver * pSatPref; // prefix solver
71 sat_solver * pSatSuff; // suffix solver
72 // runtime
77};
78
79static inline Int2_Man_t * Int2_ManCreate( Gia_Man_t * pGia, Int2_ManPars_t * pPars )
80{
81 Int2_Man_t * p;
82 p = ABC_CALLOC( Int2_Man_t, 1 );
83 p->pPars = pPars;
84 p->pGia = pGia;
85 p->pGiaPref = Gia_ManStart( 10000 );
86 // perform structural hashing
87 Gia_ManHashAlloc( pFrames );
88 // subset of the manager
89 p->vSuffCis = Vec_IntAlloc( Gia_ManCiNum(pGia) );
90 p->vSuffCos = Vec_IntAlloc( Gia_ManCoNum(pGia) );
91 p->vPrefCos = Vec_IntAlloc( Gia_ManCoNum(pGia) );
92 p->vStack = Vec_IntAlloc( 10000 );
93 // preimages
94 p->vImageOne = Vec_IntAlloc( 1000 );
95 p->vImagesAll = Vec_IntAlloc( 1000 );
96 // variable maps
97 p->vMapFrames = Vec_PtrAlloc( 100 );
98 p->vMapPref = Vec_IntAlloc( Gia_ManRegNum(pGia) );
99 p->vMapSuff = Vec_IntAlloc( Gia_ManRegNum(pGia) );
100 // initial minimization
101 p->vAssign = Vec_IntAlloc( Gia_ManCiNum(pGia) );
102 p->vPrio = Vec_IntAlloc( Gia_ManCiNum(pGia) );
103 return p;
104}
105static inline void Int2_ManStop( Int2_Man_t * p )
106{
107 // GIA managers
108 Gia_ManStopP( &p->pGiaPref );
109 Gia_ManStopP( &p->pGiaSuff );
110 // subset of the manager
111 Vec_IntFreeP( &p->vSuffCis );
112 Vec_IntFreeP( &p->vSuffCos );
113 Vec_IntFreeP( &p->vPrefCos );
114 Vec_IntFreeP( &p->vStack );
115 // preimages
116 Vec_IntFreeP( &p->vImageOne );
117 Vec_IntFreeP( &p->vImagesAll );
118 // variable maps
119 Vec_VecFree( (Vec_Vec_t *)p->vMapFrames );
120 Vec_IntFreeP( &p->vMapPref );
121 Vec_IntFreeP( &p->vMapSuff );
122 // initial minimization
123 Vec_IntFreeP( &p->vAssign );
124 Vec_IntFreeP( &p->vPrio );
125 // SAT solving
126 if ( p->pSatPref )
127 sat_solver_delete( p->pSatPref );
128 if ( p->timeSatSuff )
129 sat_solver_delete( p->pSatSuff );
130 ABC_FREE( p );
131}
132
136
140
141/*=== int2Bmc.c =============================================================*/
142extern int Int2_ManCheckInit( Gia_Man_t * p );
143extern Gia_Man_t * Int2_ManDupInit( Gia_Man_t * p, int fVerbose );
144extern sat_solver * Int2_ManSetupBmcSolver( Gia_Man_t * p, int nFrames );
145extern void Int2_ManCreateFrames( Int2_Man_t * p, int iFrame, Vec_Int_t * vPrefCos );
146extern int Int2_ManCheckBmc( Int2_Man_t * p, Vec_Int_t * vCube );
147
148/*=== int2Refine.c =============================================================*/
149extern Vec_Int_t * Int2_ManRefineCube( Gia_Man_t * p, Vec_Int_t * vAssign, Vec_Int_t * vPrio );
150
151/*=== int2Util.c ============================================================*/
152extern Gia_Man_t * Int2_ManProbToGia( Gia_Man_t * p, Vec_Int_t * vSop );
153
154
156
157
158
159#endif
160
164
ABC_INT64_T abctime
Definition abc_global.h:332
#define ABC_CALLOC(type, num)
Definition abc_global.h:265
#define ABC_FREE(obj)
Definition abc_global.h:267
#define ABC_NAMESPACE_HEADER_END
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
#define sat_solver
Definition cecSatG2.c:34
Cube * p
Definition exorList.c:222
void Gia_ManStopP(Gia_Man_t **p)
Definition giaMan.c:224
void Gia_ManHashAlloc(Gia_Man_t *p)
Definition giaHash.c:105
Gia_Man_t * Gia_ManStart(int nObjsMax)
FUNCTION DEFINITIONS ///.
Definition giaMan.c:57
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
void Int2_ManCreateFrames(Int2_Man_t *p, int iFrame, Vec_Int_t *vPrefCos)
Definition int2Bmc.c:219
sat_solver * Int2_ManSetupBmcSolver(Gia_Man_t *p, int nFrames)
Definition int2Bmc.c:170
typedefABC_NAMESPACE_HEADER_START struct Int2_Man_t_ Int2_Man_t
INCLUDES ///.
Definition int2Int.h:45
Vec_Int_t * Int2_ManRefineCube(Gia_Man_t *p, Vec_Int_t *vAssign, Vec_Int_t *vPrio)
Definition int2Refine.c:104
Gia_Man_t * Int2_ManDupInit(Gia_Man_t *p, int fVerbose)
DECLARATIONS ///.
Definition int2Bmc.c:46
Gia_Man_t * Int2_ManProbToGia(Gia_Man_t *p, Vec_Int_t *vSop)
Definition int2Util.c:98
int Int2_ManCheckBmc(Int2_Man_t *p, Vec_Int_t *vCube)
Definition int2Bmc.c:318
int Int2_ManCheckInit(Gia_Man_t *p)
MACRO DEFINITIONS ///.
Definition int2Bmc.c:92
typedefABC_NAMESPACE_HEADER_START struct Int2_ManPars_t_ Int2_ManPars_t
INCLUDES ///.
Definition int2.h:50
void sat_solver_delete(sat_solver *s)
Definition satSolver.c:1341
DECLARATIONS ///.
Definition int2Int.h:47
Vec_Int_t * vImageOne
Definition int2Int.h:60
Vec_Int_t * vImagesAll
Definition int2Int.h:61
Vec_Int_t * vSuffCis
Definition int2Int.h:55
abctime timeOther
Definition int2Int.h:75
Vec_Int_t * vMapPref
Definition int2Int.h:64
Gia_Man_t * pGia
Definition int2Int.h:51
Vec_Ptr_t * vMapFrames
Definition int2Int.h:63
abctime timeSatPref
Definition int2Int.h:73
sat_solver * pSatSuff
Definition int2Int.h:71
abctime timeTotal
Definition int2Int.h:76
Vec_Int_t * vStack
Definition int2Int.h:58
Int2_ManPars_t * pPars
Definition int2Int.h:49
Gia_Man_t * pGiaPref
Definition int2Int.h:52
Vec_Int_t * vAssign
Definition int2Int.h:67
Vec_Int_t * vMapSuff
Definition int2Int.h:65
abctime timeSatSuff
Definition int2Int.h:74
sat_solver * pSatPref
Definition int2Int.h:70
Gia_Man_t * pGiaSuff
Definition int2Int.h:53
Vec_Int_t * vPrio
Definition int2Int.h:68
Vec_Int_t * vSuffCos
Definition int2Int.h:56
Vec_Int_t * vPrefCos
Definition int2Int.h:57
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition vecVec.h:42