51 int RetValue, Beg, End, i, k;
52 int CounterBase = 0, CounterInd = 0;
57 printf(
"Invariant verification: Can only verify for K = 1\n" );
85 for ( k = Beg; k < End; k++ )
88 for ( k = Beg; k < End; k++ )
112 printf(
"Invariant verification: SAT solver is unsat after adding a clause.\n" );
130 for ( k = Beg; k < End; k++ )
132 pStart[k] += 2 * pCnf->
nVars;
133 pStart[k] =
lit_neg(pStart[k]);
135 RetValue =
sat_solver_solve( pSat, pStart + Beg, pStart + End, 0, 0, 0, 0 );
136 for ( k = Beg; k < End; k++ )
138 pStart[k] =
lit_neg(pStart[k]);
139 pStart[k] -= 2 * pCnf->
nVars;
150 printf(
"Invariant verification: %d clauses (out of %d) FAILED the base case.\n", CounterBase,
Vec_IntSize(vClauses) );
152 printf(
"Invariant verification: %d clauses (out of %d) FAILED the inductive case.\n", CounterInd,
Vec_IntSize(vClauses) );
153 if ( CounterBase || CounterInd )
155 printf(
"Invariant verification: %d clauses verified correctly. ",
Vec_IntSize(vClauses) );
static int * Vec_IntArray(Vec_Int_t *p)
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 ///.
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)
void sat_solver_delete(sat_solver *s)
static abctime Abc_Clock()
static lit lit_neg(lit l)
static int Aig_ManCoNum(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_END
ABC_NAMESPACE_IMPL_START int Fra_InvariantVerify(Aig_Man_t *pAig, int nFrames, Vec_Int_t *vClauses, Vec_Int_t *vLits)
DECLARATIONS ///.
#define ABC_NAMESPACE_IMPL_START
int sat_solver_simplify(sat_solver *s)
static int Vec_IntSize(Vec_Int_t *p)
void * Cnf_DataWriteIntoSolver(Cnf_Dat_t *p, int nFrames, int fInit)
Cnf_Dat_t * Cnf_DeriveSimple(Aig_Man_t *p, int nOutputs)
void Cnf_DataFree(Cnf_Dat_t *p)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.