Commit 458c0538 by Alan Mishchenko

User-controlable SAT sweeper.

parent a1c543c6
...@@ -623,7 +623,7 @@ static Vec_Int_t * Gia_ManGetCex( Gia_Man_t * pGia, Vec_Int_t * vId2Lit, sat_sol ...@@ -623,7 +623,7 @@ static Vec_Int_t * Gia_ManGetCex( Gia_Man_t * pGia, Vec_Int_t * vId2Lit, sat_sol
int Gia_SweeperCheckEquiv( Gia_Man_t * pGia, int Probe1, int Probe2 ) int Gia_SweeperCheckEquiv( Gia_Man_t * pGia, int Probe1, int Probe2 )
{ {
Swp_Man_t * p = (Swp_Man_t *)pGia->pData; Swp_Man_t * p = (Swp_Man_t *)pGia->pData;
int iLitOld, iLitNew, pLitsSat[2], RetValue, RetValue1; int iLitOld, iLitNew, pLitsSat[2], RetValue, RetValue1, LitSat, i;
clock_t clk; clock_t clk;
p->nSatCalls++; p->nSatCalls++;
assert( p->pSat != NULL ); assert( p->pSat != NULL );
...@@ -648,6 +648,8 @@ int Gia_SweeperCheckEquiv( Gia_Man_t * pGia, int Probe1, int Probe2 ) ...@@ -648,6 +648,8 @@ int Gia_SweeperCheckEquiv( Gia_Man_t * pGia, int Probe1, int Probe2 )
assert( iLitOld > iLitNew ); assert( iLitOld > iLitNew );
// if the nodes do not have SAT variables, allocate them // if the nodes do not have SAT variables, allocate them
Vec_IntForEachEntry( p->vCondLits, LitSat, i )
Gia_ManCnfNodeAddToSolver( p, Abc_Lit2Var(LitSat) );
Gia_ManCnfNodeAddToSolver( p, Abc_Lit2Var(iLitOld) ); Gia_ManCnfNodeAddToSolver( p, Abc_Lit2Var(iLitOld) );
Gia_ManCnfNodeAddToSolver( p, Abc_Lit2Var(iLitNew) ); Gia_ManCnfNodeAddToSolver( p, Abc_Lit2Var(iLitNew) );
sat_solver_compress( p->pSat ); sat_solver_compress( p->pSat );
...@@ -751,12 +753,16 @@ p->timeSatUndec += clock() - clk; ...@@ -751,12 +753,16 @@ p->timeSatUndec += clock() - clk;
int Gia_SweeperCondCheckUnsat( Gia_Man_t * pGia ) int Gia_SweeperCondCheckUnsat( Gia_Man_t * pGia )
{ {
Swp_Man_t * p = (Swp_Man_t *)pGia->pData; Swp_Man_t * p = (Swp_Man_t *)pGia->pData;
int RetValue; int RetValue, LitSat, i;
clock_t clk; clock_t clk;
p->nSatCalls++; p->nSatCalls++;
assert( p->pSat != NULL ); assert( p->pSat != NULL );
p->vCexUser = NULL; p->vCexUser = NULL;
Vec_IntForEachEntry( p->vCondLits, LitSat, i )
Gia_ManCnfNodeAddToSolver( p, Abc_Lit2Var(LitSat) );
sat_solver_compress( p->pSat );
clk = clock(); clk = clock();
RetValue = sat_solver_solve( p->pSat, Vec_IntArray(p->vCondLits), Vec_IntArray(p->vCondLits) + Vec_IntSize(p->vCondLits), RetValue = sat_solver_solve( p->pSat, Vec_IntArray(p->vCondLits), Vec_IntArray(p->vCondLits) + Vec_IntSize(p->vCondLits),
(ABC_INT64_T)p->nConfMax, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 ); (ABC_INT64_T)p->nConfMax, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
......
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