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

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START int Inter_ManCheckInitialState (Aig_Man_t *p)
 DECLARATIONS ///. More...
 
int Inter_ManCheckAllStates (Aig_Man_t *p)
 

Function Documentation

int Inter_ManCheckAllStates ( Aig_Man_t p)

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

Synopsis [Returns 1 if the property holds in all states.]

Description []

SideEffects []

SeeAlso []

Definition at line 85 of file intUtil.c.

86 {
87  Cnf_Dat_t * pCnf;
88  sat_solver * pSat;
89  int status;
90  abctime clk = Abc_Clock();
91  pCnf = Cnf_Derive( p, Saig_ManRegNum(p) );
92  pSat = (sat_solver *)Cnf_DataWriteIntoSolver( pCnf, 1, 0 );
93  Cnf_DataFree( pCnf );
94  if ( pSat == NULL )
95  return 1;
96  status = sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
97  sat_solver_delete( pSat );
98  ABC_PRT( "Time", Abc_Clock() - clk );
99  return status == l_False;
100 }
Cnf_Dat_t * Cnf_Derive(Aig_Man_t *pAig, int nOutputs)
Definition: cnfCore.c:165
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int sat_solver_solve(sat_solver *s, lit *begin, lit *end, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal)
Definition: satSolver.c:1700
void sat_solver_delete(sat_solver *s)
Definition: satSolver.c:1141
static abctime Abc_Clock()
Definition: abc_global.h:279
Definition: cnf.h:56
static int Saig_ManRegNum(Aig_Man_t *p)
Definition: saig.h:77
void * Cnf_DataWriteIntoSolver(Cnf_Dat_t *p, int nFrames, int fInit)
Definition: cnfMan.c:463
#define ABC_PRT(a, t)
Definition: abc_global.h:220
#define l_False
Definition: SolverTypes.h:85
void Cnf_DataFree(Cnf_Dat_t *p)
Definition: cnfMan.c:180
ABC_INT64_T abctime
Definition: abc_global.h:278
ABC_NAMESPACE_IMPL_START int Inter_ManCheckInitialState ( Aig_Man_t p)

DECLARATIONS ///.

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

FileName [intUtil.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Interpolation engine.]

Synopsis [Various interpolation utilities.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

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

Synopsis [Returns 1 if the property fails in the initial state.]

Description []

SideEffects []

SeeAlso []

Definition at line 46 of file intUtil.c.

47 {
48  Cnf_Dat_t * pCnf;
49  Aig_Obj_t * pObj;
50  sat_solver * pSat;
51  int i, status;
52  //abctime clk = Abc_Clock();
53  pCnf = Cnf_Derive( p, Saig_ManRegNum(p) );
54  pSat = (sat_solver *)Cnf_DataWriteIntoSolver( pCnf, 1, 1 );
55  if ( pSat == NULL )
56  {
57  Cnf_DataFree( pCnf );
58  return 0;
59  }
60  status = sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
61  //ABC_PRT( "Time", Abc_Clock() - clk );
62  if ( status == l_True )
63  {
64  p->pSeqModel = Abc_CexAlloc( Aig_ManRegNum(p), Saig_ManPiNum(p), 1 );
65  Saig_ManForEachPi( p, pObj, i )
66  if ( sat_solver_var_value( pSat, pCnf->pVarNums[Aig_ObjId(pObj)] ) )
67  Abc_InfoSetBit( p->pSeqModel->pData, Aig_ManRegNum(p) + i );
68  }
69  Cnf_DataFree( pCnf );
70  sat_solver_delete( pSat );
71  return status == l_True;
72 }
Cnf_Dat_t * Cnf_Derive(Aig_Man_t *pAig, int nOutputs)
Definition: cnfCore.c:165
static Llb_Mgr_t * p
Definition: llb3Image.c:950
ABC_NAMESPACE_IMPL_START Abc_Cex_t * Abc_CexAlloc(int nRegs, int nRealPis, int nFrames)
DECLARATIONS ///.
Definition: utilCex.c:51
int sat_solver_solve(sat_solver *s, lit *begin, lit *end, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal)
Definition: satSolver.c:1700
void sat_solver_delete(sat_solver *s)
Definition: satSolver.c:1141
#define l_True
Definition: SolverTypes.h:84
Definition: cnf.h:56
static int sat_solver_var_value(sat_solver *s, int v)
Definition: satSolver.h:200
if(last==0)
Definition: sparse_int.h:34
Definition: aig.h:69
static int Saig_ManRegNum(Aig_Man_t *p)
Definition: saig.h:77
static void Abc_InfoSetBit(unsigned *p, int i)
Definition: abc_global.h:259
static int Aig_ManRegNum(Aig_Man_t *p)
Definition: aig.h:260
void * Cnf_DataWriteIntoSolver(Cnf_Dat_t *p, int nFrames, int fInit)
Definition: cnfMan.c:463
static int Saig_ManPiNum(Aig_Man_t *p)
MACRO DEFINITIONS ///.
Definition: saig.h:73
void Cnf_DataFree(Cnf_Dat_t *p)
Definition: cnfMan.c:180
static int Aig_ObjId(Aig_Obj_t *pObj)
Definition: aig.h:286
#define Saig_ManForEachPi(p, pObj, i)
Definition: saig.h:91