51 int i, ThisSize, Length, LengthStart;
64 if ( LengthStart > 0 )
72 if ( Length < LengthStart )
81 for ( i = ThisSize; i < 70; i++ )
84 Abc_Print( 1,
"%10.2f sec", 1.0*Time/CLOCKS_PER_SEC );
85 if ( p->
pPars->fSolveAll )
87 if ( p->
pPars->nTimeOutOne )
113 for ( n = 0; n < pCube->nLits; n++ )
188 Counter += (Entry > 0);
215 Abc_Print( 1,
"C=%4d. F=%4d ", Counter++, k );
236 printf(
"Clause: {" );
237 for ( i = 0; i < p->nLits; i++ )
273 for ( n = 0; n < pCube->nLits; n++ )
277 pObjNew =
Aig_And( pNew, pObjNew, pLit );
291 printf(
"Aig_ManDupSimple(): The check has failed.\n" );
299 printf(
"Dumped modified AIG into file \"aig_with_clauses.aig\".\n" );
323 pFile = fopen( pFileName,
"w" );
326 Abc_Print( 1,
"Cannot open file \"%s\" for writing invariant.\n", pFileName );
338 fprintf( pFile,
"# Inductive invariant for \"%s\"\n", p->
pAig->pName );
340 fprintf( pFile,
"# Clauses of the last timeframe for \"%s\"\n", p->
pAig->pName );
341 fprintf( pFile,
"# generated by PDR in ABC on %s\n",
Aig_TimeStamp() );
343 fprintf( pFile,
".o 1\n" );
349 fprintf( pFile,
".ilb" );
353 fprintf( pFile,
"\n" );
355 fprintf( pFile,
".ob inv\n" );
361 fprintf( pFile,
" 1\n" );
363 fprintf( pFile,
".e\n\n" );
368 Abc_Print( 1,
"Inductive invariant was written into file \"%s\".\n", pFileName );
370 Abc_Print( 1,
"Clauses of the last timeframe were written into file \"%s\".\n", pFileName );
390 Abc_Print( 1,
"Invariant F[%d] : %d clauses with %d flops (out of %d)\n",
412 int i, kStart, kThis, RetValue,
Counter = 0;
437 Abc_Print( 1,
"Verification of clause %d failed.\n", i );
442 Abc_Print( 1,
"Verification of %d clauses has failed.\n", Counter );
445 Abc_Print( 1,
"Verification of invariant with %d clauses was successful. ",
Vec_PtrSize(vCubes) );
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
static int * Vec_IntArray(Vec_Int_t *p)
#define Vec_VecForEachLevel(vGlob, vVec, i)
MACRO DEFINITIONS ///.
void Pdr_ManVerifyInvariant(Pdr_Man_t *p)
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
ABC_DLL int Aig_ManCheck(Aig_Man_t *p)
FUNCTION DECLARATIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
int sat_solver_addclause(sat_solver *s, lit *begin, lit *end)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Aig_ManStop(Aig_Man_t *p)
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)
static void sat_solver_compress(sat_solver *s)
ABC_DLL int Abc_FrameIsBatchMode()
#define Vec_VecForEachLevelStart(vGlob, vVec, i, LevelStart)
int Pdr_ManCountVariables(Pdr_Man_t *p, int kStart)
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
ABC_DLL char ** Abc_NtkCollectCioNames(Abc_Ntk_t *pNtk, int fCollectCos)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
static void Vec_PtrSort(Vec_Ptr_t *p, int(*Vec_PtrSortCompare)()) ___unused
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
void Pdr_SetPrint(FILE *pFile, Pdr_Set_t *p, int nRegs, Vec_Int_t *vFlopCounts)
static abctime Abc_Clock()
static int Abc_MaxInt(int a, int b)
static int Vec_PtrSize(Vec_Ptr_t *p)
void Pdr_ManReportInvariant(Pdr_Man_t *p)
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
static void Abc_PrintTime(int level, const char *pStr, abctime time)
void Pdr_ManDumpAig(Aig_Man_t *p, Vec_Ptr_t *vCubes)
static Vec_Int_t * Vec_IntStart(int nSize)
static int Abc_LitIsCompl(int Lit)
#define Aig_ManForEachNode(p, pObj, i)
void Aig_ManSetRegNum(Aig_Man_t *p, int nRegs)
#define Saig_ManForEachLi(p, pObj, i)
static void Vec_IntAddToEntry(Vec_Int_t *p, int i, int Addition)
static Aig_Obj_t * Aig_ManCi(Aig_Man_t *p, int i)
void Pdr_SetPrintOne(Pdr_Set_t *p)
Vec_Ptr_t * Pdr_ManCollectCubes(Pdr_Man_t *p, int kStart)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static int Abc_Base10Log(unsigned n)
#define ABC_NAMESPACE_IMPL_END
void Pdr_ManPrintClauses(Pdr_Man_t *p, int kStart)
static Aig_Obj_t * Aig_ObjChild1Copy(Aig_Obj_t *pObj)
typedefABC_NAMESPACE_HEADER_START struct Pdr_Set_t_ Pdr_Set_t
INCLUDES ///.
static Aig_Obj_t * Aig_ObjChild0Copy(Aig_Obj_t *pObj)
static void Vec_IntFreeP(Vec_Int_t **p)
static void Abc_Print(int level, const char *format,...)
void Ioa_WriteAiger(Aig_Man_t *pMan, char *pFileName, int fWriteSymbols, int fCompact)
Vec_Int_t * Pdr_ManCubeToLits(Pdr_Man_t *p, int k, Pdr_Set_t *pCube, int fCompl, int fNext)
static int Saig_ManRegNum(Aig_Man_t *p)
static int Aig_ManObjNumMax(Aig_Man_t *p)
int Pdr_SetCompare(Pdr_Set_t **pp1, Pdr_Set_t **pp2)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
ABC_DLL Abc_Ntk_t * Abc_FrameReadNtk(Abc_Frame_t *p)
static int Aig_ManRegNum(Aig_Man_t *p)
static int Vec_IntSize(Vec_Int_t *p)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
ABC_NAMESPACE_IMPL_START void Pdr_ManPrintProgress(Pdr_Man_t *p, int fClose, abctime Time)
DECLARATIONS ///.
static int Saig_ManPiNum(Aig_Man_t *p)
MACRO DEFINITIONS ///.
static int Abc_Lit2Var(int Lit)
ABC_DLL Abc_Frame_t * Abc_FrameReadGlobalFrame()
sat_solver * Pdr_ManCreateSolver(Pdr_Man_t *p, int k)
DECLARATIONS ///.
#define Vec_VecForEachLevelStartStop(vGlob, vVec, i, LevelStart, LevelStop)
int Pdr_ManFindInvariantStart(Pdr_Man_t *p)
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
void Pdr_ManDumpClauses(Pdr_Man_t *p, char *pFileName, int fProved)
Aig_Man_t * Pdr_ManDupAigWithClauses(Aig_Man_t *p, Vec_Ptr_t *vCubes)
char * Abc_UtilStrsav(char *s)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
void Aig_ManCleanData(Aig_Man_t *p)
int Aig_ManCleanup(Aig_Man_t *p)
Vec_Int_t * Pdr_ManCountFlops(Pdr_Man_t *p, Vec_Ptr_t *vCubes)
static void Vec_PtrFree(Vec_Ptr_t *p)