abc/src/aig/gia/giaSweeper.c
/**Function*************************************************************

  Synopsis    [Performs conditional sweeping of the cone.]

  Description [Returns the result as a new GIA manager with as many inputs 
  as the original manager and as many outputs as there are logic cones.]
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Function
Synopsis    [Performs conditional sweeping of the cone.]

Description [Returns the result as a new GIA manager with as many inputs
as the original manager and as many outputs as there are logic cones.]




Function Synopsis [ Performs conditional sweeping of the cone . ] Description [ Returns the result as a new GIA manager with as many inputs as the original manager and as many outputs as there are logic cones . ]
Gia_Man_t * Gia_SweeperSweep( Gia_Man_t * p, Vec_Int_t * vProbeOuts, int nWords, int nConfs, int fVerify, int fVerbose )
{
    Vec_Int_t * vProbeConds;
    Gia_Man_t * pGiaCond, * pGiaOuts, * pGiaRes;
    Ssc_Pars_t Pars, * pPars = &Pars;
    Ssc_ManSetDefaultParams( pPars );
    pPars->nWords   = nWords;
    pPars->nBTLimit = nConfs;
    pPars->fVerify  = fVerify;
    pPars->fVerbose = fVerbose;
    assert( Gia_SweeperIsRunning(p) );
    vProbeConds = Gia_SweeperCondVector( p );
    pGiaCond = Gia_SweeperExtractUserLogic( p, vProbeConds, NULL, NULL );
    pGiaOuts = Gia_SweeperExtractUserLogic( p, vProbeOuts, NULL, NULL );
    Gia_ManSetPhase( pGiaOuts );
    if ( Gia_ManPoNum(pGiaCond) == 0 )
        Gia_ManAppendCo( pGiaCond, Gia_ManConst0Lit() );
    pGiaRes = Ssc_PerformSweeping( pGiaOuts, pGiaCond, pPars );
    Gia_ManStop( pGiaCond );
    Gia_ManStop( pGiaOuts );
    return pGiaRes;
}
Gia_Man_t * Gia_SweeperSweep ( Gia_Man_t * p , Vec_Int_t * vProbeOuts , int nWords , int nConfs , int fVerify , int fVerbose ) { Vec_Int_t * vProbeConds ; Gia_Man_t * pGiaCond , * pGiaOuts , * pGiaRes ; Ssc_Pars_t Pars , * pPars = & Pars ; Ssc_ManSetDefaultParams ( pPars ) ; pPars -> nWords = nWords ; pPars -> nBTLimit = nConfs ; pPars -> fVerify = fVerify ; pPars -> fVerbose = fVerbose ; assert ( Gia_SweeperIsRunning ( p ) ) ; vProbeConds = Gia_SweeperCondVector ( p ) ; pGiaCond = Gia_SweeperExtractUserLogic ( p , vProbeConds , NULL , NULL ) ; pGiaOuts = Gia_SweeperExtractUserLogic ( p , vProbeOuts , NULL , NULL ) ; Gia_ManSetPhase ( pGiaOuts ) ; if ( Gia_ManPoNum ( pGiaCond ) == 0 ) Gia_ManAppendCo ( pGiaCond , Gia_ManConst0Lit ( ) ) ; pGiaRes = Ssc_PerformSweeping ( pGiaOuts , pGiaCond , pPars ) ; Gia_ManStop ( pGiaCond ) ; Gia_ManStop ( pGiaOuts ) ; return pGiaRes ; }
Function
Synopsis    [Performs conditional sweeping of the cone.]
Function Synopsis [ Performs conditional sweeping of the cone . ]
// sweeper is running // extract conditions and logic cones // if there is no conditions, define constant true constraint (constant 0 output) // perform sweeping under constraints