abc/src/aig/ivy/ivyFraig.c
/**Function*************************************************************

  Synopsis    [Refines the classes after simulation.]

  Description [Assumes that simulation info is assigned. Returns the
  number of classes refined.]
               
  SideEffects [Large equivalence class of constant 0 may cause problems.]

  SeeAlso     []

***********************************************************************/
Function
Synopsis    [Refines the classes after simulation.]

Description [Assumes that simulation info is assigned. Returns the
number of classes refined.]

SideEffects [Large equivalence class of constant 0 may cause problems.]


Function Synopsis [ Refines the classes after simulation . ] Description [ Assumes that simulation info is assigned . Returns the number of classes refined . ] SideEffects [ Large equivalence class of constant 0 may cause problems . ]
int Ivy_FraigRefineClasses( Ivy_FraigMan_t * p )
{
    Ivy_Obj_t * pClass, * pClass2;
    int RetValue, Counter = 0;
    abctime clk;
    if ( p->pParams->fProve )
        Ivy_FraigCheckOutputSims( p );
    if ( p->pManFraig->pData )
        return 0;
clk = Abc_Clock();
    Ivy_FraigForEachEquivClassSafe( p->lClasses.pHead, pClass, pClass2 )
    {
        if ( pClass->fMarkA )
            continue;
        RetValue = Ivy_FraigRefineClass_rec( p, pClass );
        Counter += ( RetValue > 0 );
    }
p->timeRef += Abc_Clock() - clk;
    return Counter;
}
int Ivy_FraigRefineClasses ( Ivy_FraigMan_t * p ) { Ivy_Obj_t * pClass , * pClass2 ; int RetValue , Counter = 0 ; abctime clk ; if ( p -> pParams -> fProve ) Ivy_FraigCheckOutputSims ( p ) ; if ( p -> pManFraig -> pData ) return 0 ; clk = Abc_Clock ( ) ; Ivy_FraigForEachEquivClassSafe ( p -> lClasses . pHead , pClass , pClass2 ) { if ( pClass -> fMarkA ) continue ; RetValue = Ivy_FraigRefineClass_rec ( p , pClass ) ; Counter += ( RetValue > 0 ) ; } p -> timeRef += Abc_Clock ( ) - clk ; return Counter ; }
Function
Synopsis    [Refines the classes after simulation.]
Function Synopsis [ Refines the classes after simulation . ]
// check if some outputs already became non-constant // this is a special case when computation can be stopped!!! // refine the classed //if ( Ivy_ObjIsConst1(pClass) ) //printf( "%d ", RetValue ); //if ( Ivy_ObjIsConst1(pClass) ) //    p->time1 += Abc_Clock() - clk;