Commit b781c1c1 by Alan Mishchenko

Merging heads.

parents 2076d38e 22fd7dca
...@@ -94,6 +94,7 @@ sat_solver * Bmc_DeriveSolver( Gia_Man_t * p, Gia_Man_t * pMiter, Cnf_Dat_t * pC ...@@ -94,6 +94,7 @@ sat_solver * Bmc_DeriveSolver( Gia_Man_t * p, Gia_Man_t * pMiter, Cnf_Dat_t * pC
Vec_Int_t * vLits; Vec_Int_t * vLits;
Gia_Obj_t * pObj, * pObj0, * pObj1; Gia_Obj_t * pObj, * pObj0, * pObj1;
int i, k, iVar0, iVar1, iVarOut; int i, k, iVar0, iVar1, iVarOut;
int VarShift = 0;
// start the SAT solver // start the SAT solver
pSat = sat_solver_new(); pSat = sat_solver_new();
...@@ -108,6 +109,8 @@ sat_solver * Bmc_DeriveSolver( Gia_Man_t * p, Gia_Man_t * pMiter, Cnf_Dat_t * pC ...@@ -108,6 +109,8 @@ sat_solver * Bmc_DeriveSolver( Gia_Man_t * p, Gia_Man_t * pMiter, Cnf_Dat_t * pC
// load the last timeframe // load the last timeframe
Cnf_DataLiftGia( pCnf, pMiter, Gia_ManRegNum(p) + Gia_ManCoNum(p) ); Cnf_DataLiftGia( pCnf, pMiter, Gia_ManRegNum(p) + Gia_ManCoNum(p) );
VarShift += Gia_ManRegNum(p) + Gia_ManCoNum(p);
// add XOR clauses // add XOR clauses
Gia_ManForEachPo( p, pObj, i ) Gia_ManForEachPo( p, pObj, i )
{ {
...@@ -141,6 +144,7 @@ sat_solver * Bmc_DeriveSolver( Gia_Man_t * p, Gia_Man_t * pMiter, Cnf_Dat_t * pC ...@@ -141,6 +144,7 @@ sat_solver * Bmc_DeriveSolver( Gia_Man_t * p, Gia_Man_t * pMiter, Cnf_Dat_t * pC
Vec_IntPush( vLits, pCnf->pVarNums[Gia_ObjId(pMiter, pObj)] ); Vec_IntPush( vLits, pCnf->pVarNums[Gia_ObjId(pMiter, pObj)] );
// lift CNF again // lift CNF again
Cnf_DataLiftGia( pCnf, pMiter, pCnf->nVars ); Cnf_DataLiftGia( pCnf, pMiter, pCnf->nVars );
VarShift += pCnf->nVars;
// stitch the clauses // stitch the clauses
Gia_ManForEachRi( pMiter, pObj, i ) Gia_ManForEachRi( pMiter, pObj, i )
{ {
...@@ -173,6 +177,7 @@ sat_solver * Bmc_DeriveSolver( Gia_Man_t * p, Gia_Man_t * pMiter, Cnf_Dat_t * pC ...@@ -173,6 +177,7 @@ sat_solver * Bmc_DeriveSolver( Gia_Man_t * p, Gia_Man_t * pMiter, Cnf_Dat_t * pC
assert( 0 ); assert( 0 );
} }
// sat_solver_compress( pSat ); // sat_solver_compress( pSat );
Cnf_DataLiftGia( pCnf, pMiter, -VarShift );
Vec_IntFree( vLits ); Vec_IntFree( vLits );
return pSat; return pSat;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment