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

Go to the source code of this file.

Data Structures

struct  Int2_ManPars_t_
 

Typedefs

typedef
typedefABC_NAMESPACE_HEADER_START
struct Int2_ManPars_t_ 
Int2_ManPars_t
 INCLUDES ///. More...
 

Functions

void Int2_ManSetDefaultParams (Int2_ManPars_t *p)
 MACRO DEFINITIONS ///. More...
 
int Int2_ManPerformInterpolation (Gia_Man_t *p, Int2_ManPars_t *pPars)
 

Typedef Documentation

typedef typedefABC_NAMESPACE_HEADER_START struct Int2_ManPars_t_ Int2_ManPars_t

INCLUDES ///.

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

FileName [int2.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Interpolation engine.]

Synopsis [External declarations.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - Dec 1, 2013.]

Revision [

Id:
int2.h,v 1.00 2013/12/01 00:00:00 alanmi Exp

]PARAMETERS ///BASIC TYPES ///

Definition at line 50 of file int2.h.

Function Documentation

int Int2_ManPerformInterpolation ( Gia_Man_t pInit,
Int2_ManPars_t pPars 
)

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

Synopsis [Interpolates while the number of conflicts is not exceeded.]

Description [Returns 1 if proven. 0 if failed. -1 if undecided.]

SideEffects [Does not check the property in 0-th frame.]

SeeAlso []

Definition at line 259 of file int2Core.c.

260 {
261  Int2_Man_t * p;
262  int f, i, RetValue = -1;
263  abctime clk, clkTotal = Abc_Clock(), timeTemp = 0;
264  abctime nTimeToStop = pPars->nSecLimit ? pPars->nSecLimit * CLOCKS_PER_SEC + Abc_Clock() : 0;
265 
266  // sanity checks
267  assert( Gia_ManPiNum(pInit) > 0 );
268  assert( Gia_ManPoNum(pInit) > 0 );
269  assert( Gia_ManRegNum(pInit) > 0 );
270 
271  // create manager
272  p = Int2_ManCreate( pInit, pPars );
273 
274  // create SAT solver
275  p->pSatPref = sat_solver_new();
276  sat_solver_setnvars( p->pSatPref, 1000 );
277  sat_solver_set_runtime_limit( p->pSatPref, nTimeToStop );
278 
279  // check outputs in the first frame
280  for ( i = 0; i < Gia_ManPoNum(pInit); i++ )
281  Vec_IntPush( p->vPrefCos, i );
282  Int2_ManCreateFrames( p, 0, p->vPrefCos );
283  RetValue = Int2_ManCheckBmc( p, NULL );
284  if ( RetValue != 1 )
285  return RetValue;
286 
287  // create original image
288  for ( f = pPars->nFramesS; f < p->nFramesMax; f++ )
289  {
290  for ( i = 0; i < p->nFramesMax; i++ )
291  {
292  p->pSatSuff = Int2_ManPrepareSuffix( p, vImageOne. vImagesAll, &vCoMap, &pGiaSuff );
293  sat_solver_set_runtime_limit( p->pSatSuff, nTimeToStop );
294  Vec_IntFreeP( &vImageOne );
295  vImageOne = Int2_ManComputePreimage( pGiaSuff, p->pSatPref, p->pSatSuff, vCiMap, vCoMap );
296  Vec_IntFree( vCoMap );
297  Gia_ManStop( pGiaSuff );
298  if ( nTimeToStop && Abc_Clock() > nTimeToStop )
299  return -1;
300  if ( vImageOne == NULL )
301  {
302  if ( i == 0 )
303  {
304  printf( "Satisfiable in frame %d.\n", f );
305  Vec_IntFree( vCiMap );
306  sat_solver_delete( p->pSatPref ); p->pSatPref = NULL;
307  return 0;
308  }
309  f += i;
310  break;
311  }
312  Vec_IntAppend( vImagesAll, vImageOne );
313  sat_solver_delete( p->pSatSuff ); p->pSatSuff = NULL;
314  }
315  Vec_IntFree( vCiMap );
316  sat_solver_delete( p->pSatPref ); p->pSatPref = NULL;
317  }
318  Abc_PrintTime( "Time", Abc_Clock() - clk );
319 
320 
321 p->timeSatPref += Abc_Clock() - clk;
322 
323  Int2_ManStop( p );
324  return RetValue;
325 }
static abctime sat_solver_set_runtime_limit(sat_solver *s, abctime Limit)
Definition: satSolver.h:233
void Gia_ManStop(Gia_Man_t *p)
Definition: giaMan.c:77
void Int2_ManCreateFrames(Int2_Man_t *p, int iFrame, Vec_Int_t *vPrefCos)
Definition: int2Bmc.c:219
static int Gia_ManPoNum(Gia_Man_t *p)
Definition: gia.h:386
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void sat_solver_delete(sat_solver *s)
Definition: satSolver.c:1141
sat_solver * Int2_ManPrepareSuffix(Gia_Man_t *p, Vec_Int_t *vImageOne, Vec_Int_t *vImagesAll, Vec_Int_t **pvCoMap, Gia_Man_t **ppSuff)
Definition: int2Core.c:132
static abctime Abc_Clock()
Definition: abc_global.h:279
Vec_Int_t * Int2_ManComputePreimage(Gia_Man_t *pSuff, sat_solver *pSatPref, sat_solver *pSatSuff, Vec_Int_t *vCiMap, Vec_Int_t *vCoMap, Vec_Int_t *vPrio)
Definition: int2Core.c:197
static void Abc_PrintTime(int level, const char *pStr, abctime time)
Definition: abc_global.h:367
typedefABC_NAMESPACE_HEADER_START struct Int2_Man_t_ Int2_Man_t
INCLUDES ///.
Definition: int2Int.h:45
int Int2_ManCheckBmc(Int2_Man_t *p, Vec_Int_t *vCube)
Definition: int2Bmc.c:318
void sat_solver_setnvars(sat_solver *s, int n)
Definition: satSolver.c:1072
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
static void Vec_IntAppend(Vec_Int_t *vVec1, Vec_Int_t *vVec2)
static void Int2_ManStop(Int2_Man_t *p)
Definition: int2Int.h:105
static void Vec_IntFreeP(Vec_Int_t **p)
Definition: vecInt.h:289
static Int2_Man_t * Int2_ManCreate(Gia_Man_t *pGia, Int2_ManPars_t *pPars)
Definition: int2Int.h:79
sat_solver * sat_solver_new(void)
Definition: satSolver.c:1001
#define assert(ex)
Definition: util_old.h:213
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
static int Gia_ManPiNum(Gia_Man_t *p)
Definition: gia.h:385
ABC_INT64_T abctime
Definition: abc_global.h:278
static int Gia_ManRegNum(Gia_Man_t *p)
Definition: gia.h:387
void Int2_ManSetDefaultParams ( Int2_ManPars_t p)

MACRO DEFINITIONS ///.

FUNCTION DECLARATIONS ///

MACRO DEFINITIONS ///.

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

FileName [int2Core.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Interpolation engine.]

Synopsis [Core procedures.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - Dec 1, 2013.]

Revision [

Id:
int2Core.c,v 1.00 2013/12/01 00:00:00 alanmi Exp

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

Synopsis [This procedure sets default values of interpolation parameters.]

Description []

SideEffects []

SeeAlso []

Definition at line 45 of file int2Core.c.

46 {
47  memset( p, 0, sizeof(Int2_ManPars_t) );
48  p->nBTLimit = 0; // limit on the number of conflicts
49  p->nFramesS = 1; // the starting number timeframes
50  p->nFramesMax = 0; // the max number timeframes to unroll
51  p->nSecLimit = 0; // time limit in seconds
52  p->nFramesK = 1; // the number of timeframes to use in induction
53  p->fRewrite = 0; // use additional rewriting to simplify timeframes
54  p->fTransLoop = 0; // add transition into the init state under new PI var
55  p->fDropInvar = 0; // dump inductive invariant into file
56  p->fVerbose = 0; // print verbose statistics
57  p->iFrameMax = -1;
58 }
char * memset()
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_HEADER_START struct Int2_ManPars_t_ Int2_ManPars_t
INCLUDES ///.
Definition: int2.h:50