ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
intMan.c
Go to the documentation of this file.
1
20
21#include "intInt.h"
22#include "aig/ioa/ioa.h"
23
25
26
30
34
47{
48 Inter_Man_t * p;
49 // create interpolation manager
50 p = ABC_ALLOC( Inter_Man_t, 1 );
51 memset( p, 0, sizeof(Inter_Man_t) );
52 p->vVarsAB = Vec_IntAlloc( Aig_ManRegNum(pAig) );
53 p->nConfLimit = pPars->nBTLimit;
54 p->fVerbose = pPars->fVerbose;
55 p->pFileName = pPars->pFileName;
56 p->pAig = pAig;
57 if ( pPars->fDropInvar )
58 p->vInters = Vec_PtrAlloc( 100 );
59 return p;
60}
61
74{
75 if ( p->vInters )
76 {
77 Aig_Man_t * pMan;
78 int i;
79 Vec_PtrForEachEntry( Aig_Man_t *, p->vInters, pMan, i )
80 Aig_ManStop( pMan );
81 Vec_PtrClear( p->vInters );
82 }
83 if ( p->pCnfInter )
84 Cnf_DataFree( p->pCnfInter );
85 if ( p->pCnfFrames )
86 Cnf_DataFree( p->pCnfFrames );
87 if ( p->pInter )
88 Aig_ManStop( p->pInter );
89 if ( p->pFrames )
90 Aig_ManStop( p->pFrames );
91}
92
104void Inter_ManInterDump( Inter_Man_t * p, int fProved )
105{
106 char * pFileName = p->pFileName ? p->pFileName : (char *)"invar.aig";
107 Aig_Man_t * pMan;
108 pMan = Aig_ManDupArray( p->vInters );
109 Ioa_WriteAiger( pMan, pFileName, 0, 0 );
110 Aig_ManStop( pMan );
111 if ( fProved )
112 printf( "Inductive invariant is dumped into file \"%s\".\n", pFileName );
113 else
114 printf( "Interpolants are dumped into file \"%s\".\n", pFileName );
115}
116
128void Inter_ManStop( Inter_Man_t * p, int fProved )
129{
130 if ( p->fVerbose )
131 {
132 p->timeOther = p->timeTotal-p->timeRwr-p->timeCnf-p->timeSat-p->timeInt-p->timeEqu;
133 printf( "Runtime statistics:\n" );
134 ABC_PRTP( "Rewriting ", p->timeRwr, p->timeTotal );
135 ABC_PRTP( "CNF mapping", p->timeCnf, p->timeTotal );
136 ABC_PRTP( "SAT solving", p->timeSat, p->timeTotal );
137 ABC_PRTP( "Interpol ", p->timeInt, p->timeTotal );
138 ABC_PRTP( "Containment", p->timeEqu, p->timeTotal );
139 ABC_PRTP( "Other ", p->timeOther, p->timeTotal );
140 ABC_PRTP( "TOTAL ", p->timeTotal, p->timeTotal );
141 }
142
143 if ( p->vInters )
144 Inter_ManInterDump( p, fProved );
145
146 if ( p->pCnfAig )
147 Cnf_DataFree( p->pCnfAig );
148 if ( p->pAigTrans )
149 Aig_ManStop( p->pAigTrans );
150 if ( p->pInterNew )
151 Aig_ManStop( p->pInterNew );
152 Inter_ManClean( p );
153 Vec_PtrFreeP( &p->vInters );
154 Vec_IntFreeP( &p->vVarsAB );
155 ABC_FREE( p );
156}
157
158
162
163
165
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
#define ABC_PRTP(a, t, T)
Definition abc_global.h:258
#define ABC_FREE(obj)
Definition abc_global.h:267
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
Aig_Man_t * Aig_ManDupArray(Vec_Ptr_t *vArray)
Definition aigDup.c:1255
void Aig_ManStop(Aig_Man_t *p)
Definition aigMan.c:187
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition aig.h:50
void Cnf_DataFree(Cnf_Dat_t *p)
Definition cnfMan.c:207
Cube * p
Definition exorList.c:222
typedefABC_NAMESPACE_HEADER_START struct Inter_Man_t_ Inter_Man_t
INCLUDES ///.
Definition intInt.h:49
void Inter_ManInterDump(Inter_Man_t *p, int fProved)
Definition intMan.c:104
ABC_NAMESPACE_IMPL_START Inter_Man_t * Inter_ManCreate(Aig_Man_t *pAig, Inter_ManParams_t *pPars)
DECLARATIONS ///.
Definition intMan.c:46
void Inter_ManStop(Inter_Man_t *p, int fProved)
Definition intMan.c:128
void Inter_ManClean(Inter_Man_t *p)
Definition intMan.c:73
typedefABC_NAMESPACE_HEADER_START struct Inter_ManParams_t_ Inter_ManParams_t
INCLUDES ///.
Definition int.h:48
void Ioa_WriteAiger(Aig_Man_t *pMan, char *pFileName, int fWriteSymbols, int fCompact)
char * memset()
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition vecPtr.h:55