24 #ifdef ABC_USE_LIBRARIES
74 for ( i = 0; i < pCnfFrames->
nVars; i++ )
83 for ( i = 0; i < pCnfInter->
nClauses; i++ )
105 for ( i = 0; i < pCnfAig->
nClauses; i++ )
132 for ( i = 0; i < pCnfFrames->
nClauses; i++ )
159 int Inter_ManResolveM114p(
Vec_Int_t * vResolvent,
int * pLits,
int nLits,
int iVar )
161 int i, k, iLit = -1, fFound = 0;
163 for ( i = 0; i < vResolvent->nSize; i++ )
164 if (
lit_var(vResolvent->pArray[i]) == iVar )
166 iLit = vResolvent->pArray[i];
167 vResolvent->pArray[i] = vResolvent->pArray[--vResolvent->nSize];
172 for ( i = 0; i < nLits; i++ )
174 if (
lit_var(pLits[i]) == iVar )
181 for ( k = 0; k < vResolvent->nSize; k++ )
182 if ( vResolvent->pArray[k] == pLits[i] )
184 if ( k < vResolvent->nSize )
213 Vec_Int_t * vLiterals, * vClauses, * vResolvent;
214 int * pLitsNext, nLitsNext, nOffset, iLit;
215 int * pLits, * pClauses, * pVars;
216 int nLits,
nVars, i, k, v, iVar;
241 for ( v = 0; v < nLits; v++ )
256 for ( v = 0; v < nLitsNext; v++ )
259 for ( k = 0; k <
nVars; k++ )
268 Inter_ManResolveM114p( vResolvent, pLitsNext, nLitsNext, pVars[k] );
271 pInter =
Aig_Or( p, pInter, pInter2 );
272 else if ( iVar == -2 )
273 pInter =
Aig_And( p, pInter, pInter2 );
277 for ( v = 0; v < nLitsNext; v++ )
278 if (
lit_var(pLitsNext[v]) == pVars[k] )
282 pInter =
Aig_Mux( p, pVar, pInter, pInter2 );
325 int * pLits, * pClauses, * pVars;
326 int nLits,
nVars, i, k, iVar;
343 for ( k = 0; k < nLits; k++ )
350 pInter =
Aig_Or( p, pInter, pVar );
361 for ( k = 0; k <
nVars; k++ )
366 pInter =
Aig_Or( p, pInter, pInter2 );
368 pInter =
Aig_And( p, pInter, pInter2 );
393 int Inter_ManPerformOneStepM114p(
Inter_Man_t * p,
int fUsePudlak,
int fUseOther )
398 int status, RetValue;
399 assert( p->pInterNew == NULL );
401 pSat = Inter_ManDeriveSatSolverM114p( p->pInter, p->pCnfInter,
402 p->pAigTrans, p->pCnfAig, p->pFrames, p->pCnfFrames,
403 &vMapRoots, &vMapVars );
408 p->timeSat += clock() - clk;
416 p->pInterNew = Inter_ManInterpolateM114pPudlak( pSat, vMapRoots, vMapVars );
418 p->pInterNew = Inter_ManpInterpolateM114( pSat, vMapRoots, vMapVars );
419 p->timeInt += clock() - clk;
421 else if ( status == 1 )
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
static int * Vec_IntArray(Vec_Int_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 ///.
ABC_NAMESPACE_HEADER_START typedef int M114p_Solver_t
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
#define M114p_SolverForEachRoot(s, ppLits, nLits, i)
static int lit_var(lit l)
static Aig_Obj_t * Saig_ManLo(Aig_Man_t *p, int i)
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
static Aig_Obj_t * Aig_ManConst0(Aig_Man_t *p)
static int Vec_PtrSize(Vec_Ptr_t *p)
typedefABC_NAMESPACE_HEADER_START struct Inter_Man_t_ Inter_Man_t
INCLUDES ///.
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
void M114p_SolverSetVarNum(M114p_Solver_t s, int nVars)
void M114p_SolverDelete(M114p_Solver_t s)
static lit lit_neg(lit l)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static int Aig_ManCoNum(Aig_Man_t *p)
int M114p_SolverAddClause(M114p_Solver_t s, lit *begin, lit *end)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Aig_Obj_t * Aig_IthVar(Aig_Man_t *p, int i)
FUNCTION DEFINITIONS ///.
static lit toLitCond(int v, int c)
static int Vec_IntEntry(Vec_Int_t *p, int i)
static int Aig_ManCiNum(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_END
static void Vec_IntFill(Vec_Int_t *p, int nSize, int Fill)
Aig_Obj_t * Aig_Or(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
static Aig_Obj_t * Saig_ManLi(Aig_Man_t *p, int i)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
void Cnf_DataLift(Cnf_Dat_t *p, int nVarsPlus)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static int Aig_ManRegNum(Aig_Man_t *p)
int M114p_SolverGetConflictNum(M114p_Solver_t s)
static int Vec_IntSize(Vec_Int_t *p)
Aig_Obj_t * Aig_Mux(Aig_Man_t *p, Aig_Obj_t *pC, Aig_Obj_t *p1, Aig_Obj_t *p0)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
static int lit_sign(lit l)
#define M114p_SolverForEachChain(s, ppClauses, ppVars, nVars, i)
ABC_NAMESPACE_HEADER_START M114p_Solver_t M114p_SolverNew(int fRecordProof)
int M114p_SolverSolve(M114p_Solver_t s, lit *begin, lit *end, int nConfLimit)
static Aig_Obj_t * Aig_NotCond(Aig_Obj_t *p, int c)
static void Vec_IntFree(Vec_Int_t *p)
static void Vec_IntClear(Vec_Int_t *p)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
int M114p_SolverProofIsReady(M114p_Solver_t s)
int Aig_ManCleanup(Aig_Man_t *p)
int M114p_SolverProofClauseNum(M114p_Solver_t s)
static void Vec_PtrFree(Vec_Ptr_t *p)