Commit 88c273c2 by Alan Mishchenko

User-controlable SAT sweeper.

parent ceca5da3
...@@ -193,6 +193,7 @@ void Gia_SweeperSetRuntimeLimit( Gia_Man_t * p, int nSeconds ) ...@@ -193,6 +193,7 @@ void Gia_SweeperSetRuntimeLimit( Gia_Man_t * p, int nSeconds )
Vec_Int_t * Gia_SweeperGetCex( Gia_Man_t * p ) Vec_Int_t * Gia_SweeperGetCex( Gia_Man_t * p )
{ {
Swp_Man_t * pSwp = (Swp_Man_t *)p->pData; Swp_Man_t * pSwp = (Swp_Man_t *)p->pData;
assert( pSwp->vCexUser == NULL || Vec_IntSize(pSwp->vCexUser) == Gia_ManPiNum(p) );
return pSwp->vCexUser; return pSwp->vCexUser;
} }
...@@ -605,6 +606,11 @@ static Vec_Int_t * Gia_ManGetCex( Gia_Man_t * pGia, Vec_Int_t * vId2Lit, sat_sol ...@@ -605,6 +606,11 @@ static Vec_Int_t * Gia_ManGetCex( Gia_Man_t * pGia, Vec_Int_t * vId2Lit, sat_sol
Gia_ManForEachPi( pGia, pObj, i ) Gia_ManForEachPi( pGia, pObj, i )
{ {
LitSat = Vec_IntEntry( vId2Lit, Gia_ObjId(pGia, pObj) ); LitSat = Vec_IntEntry( vId2Lit, Gia_ObjId(pGia, pObj) );
if ( LitSat == 0 )
{
Vec_IntPush( vCex, 2 );
continue;
}
assert( LitSat > 0 ); assert( LitSat > 0 );
Value = sat_solver_var_value(pSat, Abc_Lit2Var(LitSat)) ^ Abc_LitIsCompl(LitSat); Value = sat_solver_var_value(pSat, Abc_Lit2Var(LitSat)) ^ Abc_LitIsCompl(LitSat);
Vec_IntPush( vCex, Value ); Vec_IntPush( vCex, Value );
......
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