abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
intMan.c File Reference
#include "intInt.h"
#include "aig/ioa/ioa.h"

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START
Inter_Man_t
Inter_ManCreate (Aig_Man_t *pAig, Inter_ManParams_t *pPars)
 DECLARATIONS ///. More...
 
void Inter_ManClean (Inter_Man_t *p)
 
void Inter_ManInterDump (Inter_Man_t *p, int fProved)
 
void Inter_ManStop (Inter_Man_t *p, int fProved)
 

Function Documentation

void Inter_ManClean ( Inter_Man_t p)

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

Synopsis [Cleans the interpolation manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 73 of file intMan.c.

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 }
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
if(last==0)
Definition: sparse_int.h:34
void Cnf_DataFree(Cnf_Dat_t *p)
Definition: cnfMan.c:180
static void Vec_PtrClear(Vec_Ptr_t *p)
Definition: vecPtr.h:545
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
ABC_NAMESPACE_IMPL_START Inter_Man_t* Inter_ManCreate ( Aig_Man_t pAig,
Inter_ManParams_t pPars 
)

DECLARATIONS ///.

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

FileName [intMan.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Interpolation engine.]

Synopsis [Interpolation manager procedures.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 24, 2008.]

Revision [

Id:
intMan.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

]FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis [Creates the interpolation manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 46 of file intMan.c.

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 }
char * memset()
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
typedefABC_NAMESPACE_HEADER_START struct Inter_Man_t_ Inter_Man_t
INCLUDES ///.
Definition: intInt.h:49
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
static int Aig_ManRegNum(Aig_Man_t *p)
Definition: aig.h:260
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
void Inter_ManInterDump ( Inter_Man_t p,
int  fProved 
)

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

Synopsis [Writes interpolant into a file.]

Description []

SideEffects []

SeeAlso []

Definition at line 104 of file intMan.c.

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 }
Aig_Man_t * Aig_ManDupArray(Vec_Ptr_t *vArray)
Definition: aigDup.c:1255
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
void Ioa_WriteAiger(Aig_Man_t *pMan, char *pFileName, int fWriteSymbols, int fCompact)
Definition: ioaWriteAig.c:446
void Inter_ManStop ( Inter_Man_t p,
int  fProved 
)

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

Synopsis [Frees the interpolation manager.]

Description []

SideEffects []

SeeAlso []

Definition at line 128 of file intMan.c.

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 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
#define ABC_PRTP(a, t, T)
Definition: abc_global.h:223
void Inter_ManInterDump(Inter_Man_t *p, int fProved)
Definition: intMan.c:104
static void Vec_IntFreeP(Vec_Int_t **p)
Definition: vecInt.h:289
#define ABC_FREE(obj)
Definition: abc_global.h:232
static void Vec_PtrFreeP(Vec_Ptr_t **p)
Definition: vecPtr.h:240
void Cnf_DataFree(Cnf_Dat_t *p)
Definition: cnfMan.c:180
void Inter_ManClean(Inter_Man_t *p)
Definition: intMan.c:73