62 p->vGloVars = Vec_IntAllocArrayCopy( pGloVars, nGloVars );
63 p->vVar2Glo = Vec_IntInvert(
p->vGloVars, -1 );
65 p->pGia->pName = Abc_UtilStrsav(
"interpolant" );
66 for ( i = 0; i < nGloVars; i++ )
67 Gia_ManAppendCi(
p->pGia );
76 Vec_IntFree(
p->vGloVars );
77 Vec_IntFree(
p->vVar2Glo );
83 Gia_Man_t * pTemp, * pGia =
p->pGia;
p->pGia = NULL;
88 assert( Gia_ManPoNum(pGia) == 0 );
111 return veci_begin(&
p->pSat->claProofs)[clause_id(c)];
116 int i,
Var, CiId, Res = 0;
117 for ( i = 0; i < (int)c->
size; i++ )
120 if ( Abc_Lit2Var(c->
lits[i]) >= Vec_IntSize(
p->vVar2Glo) )
122 Var = Vec_IntEntry(
p->vVar2Glo, Abc_Lit2Var(c->
lits[i]) );
126 CiId = Gia_ObjId(
p->pGia, Gia_ManCi(
p->pGia,
Var) );
166 int Lit, Cid,
Var, status, i;
168 assert( Gia_ManRegNum(
p) == 0 );
169 assert( Gia_ManCoNum(
p) == 1 );
182 if ( pCnf->
pVarNums[pObj->
Id] >= 0 && !Aig_ObjIsCi(pObj) && !Aig_ObjIsCo(pObj) )
186 for ( i = 0; i < pCnf->
nClauses; i++ )
189 clause2_set_partA( pSat, Cid, 1 );
194 for ( i = 0; i < pCnf->
nClauses; i++ )
199 vGVars = Vec_IntAlloc( Aig_ManCoNum(pMan)+1 );
203 sat_solver2_add_buffer( pSat,
Var, pCnf->
nVars +
Var, 0, 0, -1 );
204 Vec_IntPush( vGVars,
Var );
209 sat_solver2_add_xor( pSat,
Var, pCnf->
nVars +
Var, 2*pCnf->
nVars, 0, 0, -1 );
210 Vec_IntPush( vGVars,
Var );
216 Lit = toLitCond( 2*pCnf->
nVars, 0 );
224 Abc_PrintTime( 1,
"Total interpolation time", Abc_Clock() - clk );
227 Vec_IntFree( vGVars );
#define ABC_CALLOC(type, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define Aig_ManForEachObj(p, pObj, i)
void Aig_ManStop(Aig_Man_t *p)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
struct Aig_Obj_t_ Aig_Obj_t
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Cnf_Dat_t * Cnf_Derive(Aig_Man_t *pAig, int nOutputs)
struct Cnf_Dat_t_ Cnf_Dat_t
void Cnf_DataFree(Cnf_Dat_t *p)
void Cnf_DataLift(Cnf_Dat_t *p, int nVarsPlus)
Aig_Man_t * Gia_ManToAigSimple(Gia_Man_t *p)
void Gia_ManStop(Gia_Man_t *p)
void Gia_ManHashStart(Gia_Man_t *p)
void Gia_ManStopP(Gia_Man_t **p)
Gia_Man_t * Gia_ManStart(int nObjsMax)
FUNCTION DEFINITIONS ///.
int Gia_ManHashOr(Gia_Man_t *p, int iLit0, int iLit1)
struct Gia_Man_t_ Gia_Man_t
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
void Gia_ManPrintStats(Gia_Man_t *p, Gps_Par_t *pPars)
typedefABC_NAMESPACE_HEADER_START struct Int2_Man_t_ Int2_Man_t
INCLUDES ///.
void sat_solver2_delete(sat_solver2 *s)
sat_solver2 * sat_solver2_new(void)
int sat_solver2_solve(sat_solver2 *s, lit *begin, lit *end, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, ABC_INT64_T nConfLimitGlobal, ABC_INT64_T nInsLimitGlobal)
void sat_solver2_setnvars(sat_solver2 *s, int n)
void var_set_partA(sat_solver2 *s, int v, int partA)
int sat_solver2_addclause(sat_solver2 *s, lit *begin, lit *end, int Id)
void Sat_Solver2PrintStats(FILE *pFile, sat_solver2 *p)
struct sat_solver2_t sat_solver2
Gia_Man_t * Gia_ManInterTest(Gia_Man_t *p)
void Int2_ManStop(Int2_Man_t *p)
int Int2_ManChainStart(Int2_Man_t *p, clause *c)
int Int2_ManChainResolve(Int2_Man_t *p, clause *c, int iLit, int varA)
Int2_Man_t * Int2_ManStart(sat_solver2 *pSat, int *pGloVars, int nGloVars)
FUNCTION DEFINITIONS ///.
void * Int2_ManReadInterpolant(sat_solver2 *pSat)