abc/src/base/abci/abcExact.c
/**Function*************************************************************

  Synopsis    [Find minimum size networks with a SAT solver.]

  Description [If nMaxDepth is -1, then depth constraints are ignored.
               If nMaxDepth is not -1, one can set pArrTimeProfile which should have the length of nVars.
               One can ignore pArrTimeProfile by setting it to NULL.]

  SideEffects []

  SeeAlso     []

***********************************************************************/
Function
Synopsis    [Find minimum size networks with a SAT solver.]

Description [If nMaxDepth is -1, then depth constraints are ignored.
If nMaxDepth is not -1, one can set pArrTimeProfile which should have the length of nVars.
One can ignore pArrTimeProfile by setting it to NULL.]




Function Synopsis [ Find minimum size networks with a SAT solver . ] Description [ If nMaxDepth is - 1 then depth constraints are ignored . If nMaxDepth is not - 1 one can set pArrTimeProfile which should have the length of nVars . One can ignore pArrTimeProfile by setting it to NULL . ]
Abc_Ntk_t * Abc_NtkFindExact( word * pTruth, int nVars, int nFunc, int nMaxDepth, int * pArrTimeProfile, int nBTLimit, int nStartGates, int fVerbose )
{
    Ses_Man_t * pSes;
    char * pSol;
    Abc_Ntk_t * pNtk = NULL;
    abctime timeStart;
    assert( nVars >= 2 && nVars <= 8 );
    timeStart = Abc_Clock();
    pSes = Ses_ManAlloc( pTruth, nVars, nFunc, nMaxDepth, pArrTimeProfile, 0, nBTLimit, fVerbose );
    pSes->nStartGates = nStartGates;
    pSes->fReasonVerbose = 0;
    pSes->fSatVerbose = 0;
    if ( fVerbose )
        Ses_ManPrintFuncs( pSes );
    if ( ( pSol = Ses_ManFindMinimumSize( pSes ) ) != NULL )
    {
        pNtk = Ses_ManExtractNtk( pSol );
        ABC_FREE( pSol );
    }
    pSes->timeTotal = Abc_Clock() - timeStart;
    if ( fVerbose )
        Ses_ManPrintRuntime( pSes );
    Ses_ManClean( pSes );
    return pNtk;
}
Abc_Ntk_t * Abc_NtkFindExact ( word * pTruth , int nVars , int nFunc , int nMaxDepth , int * pArrTimeProfile , int nBTLimit , int nStartGates , int fVerbose ) { Ses_Man_t * pSes ; char * pSol ; Abc_Ntk_t * pNtk = NULL ; abctime timeStart ; assert ( nVars >= 2 && nVars <= 8 ) ; timeStart = Abc_Clock ( ) ; pSes = Ses_ManAlloc ( pTruth , nVars , nFunc , nMaxDepth , pArrTimeProfile , 0 , nBTLimit , fVerbose ) ; pSes -> nStartGates = nStartGates ; pSes -> fReasonVerbose = 0 ; pSes -> fSatVerbose = 0 ; if ( fVerbose ) Ses_ManPrintFuncs ( pSes ) ; if ( ( pSol = Ses_ManFindMinimumSize ( pSes ) ) != NULL ) { pNtk = Ses_ManExtractNtk ( pSol ) ; ABC_FREE ( pSol ) ; } pSes -> timeTotal = Abc_Clock ( ) - timeStart ; if ( fVerbose ) Ses_ManPrintRuntime ( pSes ) ; Ses_ManClean ( pSes ) ; return pNtk ; }
Function
Synopsis    [Find minimum size networks with a SAT solver.]
Function Synopsis [ Find minimum size networks with a SAT solver . ]
/* some checks */ /* cleanup */