Commit b11344b4 by Alan Mishchenko

Experiments with SAT-based collapsing.

parent a207f6c0
...@@ -970,7 +970,7 @@ Vec_Int_t * Abc_NtkNodeSupportInt( Abc_Ntk_t * pNtk, int iCo ) ...@@ -970,7 +970,7 @@ Vec_Int_t * Abc_NtkNodeSupportInt( Abc_Ntk_t * pNtk, int iCo )
int Abc_NtkFunctionalIsoGia_rec( Gia_Man_t * pNew, Abc_Obj_t * pNode ) int Abc_NtkFunctionalIsoGia_rec( Gia_Man_t * pNew, Abc_Obj_t * pNode )
{ {
int iLit0, iLit1; int iLit0, iLit1;
if ( Abc_NodeIsTravIdCurrent(pNode) || Abc_ObjFaninNum(pNode) == 0 ) if ( Abc_NodeIsTravIdCurrent(pNode) || Abc_ObjFaninNum(pNode) == 0 || Abc_ObjIsCi(pNode) )
return pNode->iTemp; return pNode->iTemp;
assert( Abc_ObjIsNode( pNode ) ); assert( Abc_ObjIsNode( pNode ) );
Abc_NodeSetTravIdCurrent( pNode ); Abc_NodeSetTravIdCurrent( pNode );
......
...@@ -256,7 +256,7 @@ Abc_Ntk_t * Abc_NtkCollapse( Abc_Ntk_t * pNtk, int fBddSizeMax, int fDualRail, i ...@@ -256,7 +256,7 @@ Abc_Ntk_t * Abc_NtkCollapse( Abc_Ntk_t * pNtk, int fBddSizeMax, int fDualRail, i
int Abc_NtkClpOneGia_rec( Gia_Man_t * pNew, Abc_Obj_t * pNode ) int Abc_NtkClpOneGia_rec( Gia_Man_t * pNew, Abc_Obj_t * pNode )
{ {
int iLit0, iLit1; int iLit0, iLit1;
if ( Abc_NodeIsTravIdCurrent(pNode) || Abc_ObjFaninNum(pNode) == 0 ) if ( Abc_NodeIsTravIdCurrent(pNode) || Abc_ObjFaninNum(pNode) == 0 || Abc_ObjIsCi(pNode) )
return pNode->iTemp; return pNode->iTemp;
assert( Abc_ObjIsNode( pNode ) ); assert( Abc_ObjIsNode( pNode ) );
Abc_NodeSetTravIdCurrent( pNode ); Abc_NodeSetTravIdCurrent( pNode );
......
...@@ -1861,7 +1861,7 @@ int sat_solver_solve(sat_solver* s, lit* begin, lit* end, ABC_INT64_T nConfLimit ...@@ -1861,7 +1861,7 @@ int sat_solver_solve(sat_solver* s, lit* begin, lit* end, ABC_INT64_T nConfLimit
int fConfl = sat_solver_propagate(s); int fConfl = sat_solver_propagate(s);
if (fConfl){ if (fConfl){
sat_solver_analyze_final(s, fConfl, 0); sat_solver_analyze_final(s, fConfl, 0);
assert(s->conf_final.size > 0); //assert(s->conf_final.size > 0);
sat_solver_canceluntil(s, 0); sat_solver_canceluntil(s, 0);
return l_False; } return l_False; }
} }
......
...@@ -234,6 +234,13 @@ static void sat_solver_prepare_enum(sat_solver* s, int * pVars, int nVars ) ...@@ -234,6 +234,13 @@ static void sat_solver_prepare_enum(sat_solver* s, int * pVars, int nVars )
for ( v = 0; v < nVars; v++ ) for ( v = 0; v < nVars; v++ )
veci_push(&s->vDeciVars,pVars[v]); veci_push(&s->vDeciVars,pVars[v]);
} }
static void sat_solver_clean_polarity(sat_solver* s, int * pVars, int nVars )
{
int i;
assert( veci_size(&s->vDeciVars) == 0 );
for ( i = 0; i < nVars; i++ )
s->polarity[pVars[i]] = 0;
}
static int sat_solver_final(sat_solver* s, int ** ppArray) static int sat_solver_final(sat_solver* s, int ** ppArray)
{ {
......
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