64 assert( Saig_ManRegNum(pAig) > 0 );
65 pFrames =
Aig_ManStart( Aig_ManNodeNum(pAig) * nFrames );
67 Aig_ManConst1(pAig)->pData = Aig_ManConst1( pFrames );
72 for ( f = 0; f < nFrames; f++ )
79 pObj->
pData =
Aig_And( pFrames, Aig_ObjChild0Copy(pObj), Aig_ObjChild1Copy(pObj) );
82 pObj->
pData = Aig_ObjChild0Copy(pObj);
110 p->vOrLits = Vec_IntAlloc( 100 );
111 p->vAndLits = Vec_IntAlloc( 100 );
112 p->vAssLits = Vec_IntAlloc( 100 );
115 assert( Aig_ManCiNum(
p->pFrames) == nFramesK * Saig_ManPiNum(pTrans) + Saig_ManRegNum(pTrans) );
116 assert( Aig_ManCoNum(
p->pFrames) == nFramesK * Saig_ManRegNum(pTrans) );
118 p->pCnf =
Cnf_Derive(
p->pFrames, Aig_ManCoNum(
p->pFrames) );
121 p->nFramesK = nFramesK;
122 p->nVars =
p->pCnf->nVars;
141 Vec_IntFree(
p->vOrLits );
142 Vec_IntFree(
p->vAndLits );
143 Vec_IntFree(
p->vAssLits );
164 int RetValue, pLits[3];
166 pLits[0] = toLitCond(iVarA, 1);
167 pLits[1] = toLitCond(iVarC, 0);
171 pLits[0] = toLitCond(iVarB, 1);
172 pLits[1] = toLitCond(iVarC, 0);
176 pLits[0] = toLitCond(iVarA, 0);
177 pLits[1] = toLitCond(iVarB, 0);
178 pLits[2] = toLitCond(iVarC, 1);
196 int RetValue, pLits[3];
198 pLits[0] = toLitCond(iVarA, 1);
199 pLits[1] = toLitCond(iVarB, 0);
203 pLits[0] = toLitCond(iVarB, 1);
204 pLits[1] = toLitCond(iVarA, 0);
223 int i, f, VarA, VarB, RetValue, Entry, status;
224 int nRegs = Aig_ManCiNum(pCnfInt->
pMan);
225 assert( Aig_ManCoNum(
p->pCnf->pMan) ==
p->nFramesK * nRegs );
230 sat_solver_set_runtime_limit(
p->pSat, nTimeNewOut );
234 for ( f = 0; f <=
p->nFramesK; f++ )
237 for ( i = 0; i < pCnfInt->
nClauses; i++ )
245 pObj2 = f ? Aig_ManCo(
p->pFrames, i + (f-1) * nRegs) : Aig_ManCi(
p->pFrames, i);
249 if ( f < p->nFramesK )
251 if ( f == Vec_IntSize(
p->vOrLits) )
254 VarB = pCnfInt->
pVarNums[ Aig_ManCo(pCnfInt->
pMan, 0)->Id ];
255 Vec_IntPush(
p->vOrLits, VarB );
260 VarA = Vec_IntEntry(
p->vOrLits, f );
261 VarB = pCnfInt->
pVarNums[ Aig_ManCo(pCnfInt->
pMan, 0)->Id ];
263 Vec_IntWriteEntry(
p->vOrLits, f,
p->nVars + pCnfInt->
nVars );
269 VarB = pCnfInt->
pVarNums[ Aig_ManCo(pCnfInt->
pMan, 0)->Id ];
270 Vec_IntPush(
p->vAndLits, VarB );
274 p->nVars += pCnfInt->
nVars + 1;
277 assert( Vec_IntSize(
p->vOrLits) ==
p->nFramesK );
280 Vec_IntClear(
p->vAssLits );
282 Vec_IntPush(
p->vAssLits, toLitCond(Entry, 0) );
284 Vec_IntPush(
p->vAssLits, toLitCond(Entry, 1) );
293 Vec_IntArray(
p->vAssLits) + Vec_IntSize(
p->vAssLits),
294 (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
#define ABC_CALLOC(type, num)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
void Aig_ManStop(Aig_Man_t *p)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
Aig_Obj_t * Aig_And(Aig_Man_t *p, Aig_Obj_t *p0, Aig_Obj_t *p1)
Aig_Obj_t * Aig_ObjCreateCo(Aig_Man_t *p, Aig_Obj_t *pDriver)
struct Aig_Obj_t_ Aig_Obj_t
Aig_Man_t * Aig_ManStart(int nNodesMax)
DECLARATIONS ///.
#define Aig_ManForEachNode(p, pObj, i)
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
int Aig_ManCleanup(Aig_Man_t *p)
Aig_Obj_t * Aig_ObjCreateCi(Aig_Man_t *p)
DECLARATIONS ///.
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
#define sat_solver_addclause
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)
void Inter_CheckStop(Inter_Check_t *p)
int Inter_CheckPerform(Inter_Check_t *p, Cnf_Dat_t *pCnfInt, abctime nTimeNewOut)
Inter_Check_t * Inter_CheckStart(Aig_Man_t *pTrans, int nFramesK)
MACRO DEFINITIONS ///.
void Inter_CheckAddOrGate(Inter_Check_t *p, int iVarA, int iVarB, int iVarC)
void Inter_CheckAddEqual(Inter_Check_t *p, int iVarA, int iVarB)
Aig_Man_t * Inter_ManUnrollFrames(Aig_Man_t *pAig, int nFrames)
FUNCTION DEFINITIONS ///.
struct Inter_Check_t_ Inter_Check_t
void * Cnf_DataWriteIntoSolver(Cnf_Dat_t *p, int nFrames, int fInit)
#define Saig_ManForEachLiLo(p, pObjLi, pObjLo, i)
#define Saig_ManForEachLi(p, pObj, i)
#define Saig_ManForEachLo(p, pObj, i)
#define Saig_ManForEachPi(p, pObj, i)
void sat_solver_delete(sat_solver *s)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.