abc/src/base/abci/abcExact.c
// find minimum size by increasing the number of gates
find minimum size by increasing the number of gates
find minimum size by increasing the number of gates
static char * Ses_ManFindMinimumSizeBottomUp( Ses_Man_t * pSes )
{
    int nGates = pSes->nStartGates, fRes;
    char * pSol = NULL;
    pSes->fHitResLimit = 0;
    pSes->nDebugOffset = pSes->nMaxGates >= 10 ? 3 : 2;
    if ( Vec_IntSize( pSes->vStairDecVars ) )
        nGates = Abc_MaxInt( nGates, Vec_IntSize( pSes->vStairDecVars ) - 1 );
    memset( pSes->pTtValues, 0, 4 * sizeof( word ) );
    Abc_DebugPrintIntInt( " (%d/%d)", nGates, pSes->nMaxGates, pSes->fVeryVerbose );
    while ( true )
    {
        ++nGates;
        fRes = Ses_ManFindNetworkExactCEGAR( pSes, nGates, &pSol );
        if ( fRes == 0 )
        {
            pSes->fHitResLimit = 1;
            break;
        }
        else if ( fRes == 1 || fRes == 3 )
            break;
    }
    Abc_DebugErase( pSes->nDebugOffset + ( nGates >= 10 ? 5 : 4 ), pSes->fVeryVerbose );
    return pSol;
}
static char * Ses_ManFindMinimumSizeBottomUp ( Ses_Man_t * pSes ) { int nGates = pSes -> nStartGates , fRes ; char * pSol = NULL ; pSes -> fHitResLimit = 0 ; pSes -> nDebugOffset = pSes -> nMaxGates >= 10 ? 3 : 2 ; if ( Vec_IntSize ( pSes -> vStairDecVars ) ) nGates = Abc_MaxInt ( nGates , Vec_IntSize ( pSes -> vStairDecVars ) - 1 ) ; memset ( pSes -> pTtValues , 0 , 4 * sizeof ( word ) ) ; Abc_DebugPrintIntInt ( " " , nGates , pSes -> nMaxGates , pSes -> fVeryVerbose ) ; while ( true ) { ++ nGates ; fRes = Ses_ManFindNetworkExactCEGAR ( pSes , nGates , & pSol ) ; if ( fRes == 0 ) { pSes -> fHitResLimit = 1 ; break ; } else if ( fRes == 1 || fRes == 3 ) break ; } Abc_DebugErase ( pSes -> nDebugOffset + ( nGates >= 10 ? 5 : 4 ) , pSes -> fVeryVerbose ) ; return pSol ; }
find minimum size by increasing the number of gates
find minimum size by increasing the number of gates
/* store whether call was unsuccessful due to resource limit and not due to impossible constraint */ /* adjust number of gates if there is a stair decomposition */ //Ses_ManStoreDepthAndArrivalTimes( pSes );