sswCore.c 17.8 KB
Newer Older
Alan Mishchenko committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
/**CFile****************************************************************

  FileName    [sswCore.c]

  SystemName  [ABC: Logic synthesis and verification system.]

  PackageName [Inductive prover with constraints.]

  Synopsis    [The core procedures.]

  Author      [Alan Mishchenko]
  
  Affiliation [UC Berkeley]

  Date        [Ver. 1.0. Started - September 1, 2008.]

  Revision    [$Id: sswCore.c,v 1.00 2008/09/01 00:00:00 alanmi Exp $]

***********************************************************************/

#include "sswInt.h"

23 24 25
ABC_NAMESPACE_IMPL_START


Alan Mishchenko committed
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
////////////////////////////////////////////////////////////////////////
///                        DECLARATIONS                              ///
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
///                     FUNCTION DEFINITIONS                         ///
////////////////////////////////////////////////////////////////////////

/**Function*************************************************************

  Synopsis    [This procedure sets default parameters.]

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
void Ssw_ManSetDefaultParams( Ssw_Pars_t * p )
{
    memset( p, 0, sizeof(Ssw_Pars_t) );
Alan Mishchenko committed
48 49 50
    p->nPartSize      =       0;  // size of the partition
    p->nOverSize      =       0;  // size of the overlap between partitions
    p->nFramesK       =       1;  // the induction depth
Alan Mishchenko committed
51
    p->nFramesAddSim  =       2;  // additional frames to simulate
52 53
    p->fConstrs       =       0;  // treat the last nConstrs POs as seq constraints
    p->fMergeFull     =       0;  // enables full merge when constraints are used
Alan Mishchenko committed
54 55 56
    p->nBTLimit       =    1000;  // conflict limit at a node
    p->nBTLimitGlobal = 5000000;  // conflict limit for all runs
    p->nMinDomSize    =     100;  // min clock domain considered for optimization
Alan Mishchenko committed
57
    p->nItersStop     =      -1;  // stop after the given number of iterations
Alan Mishchenko committed
58
    p->nResimDelta    =    1000;  // the internal of nodes to resimulate
59
    p->nStepsMax      =      -1;  // (scorr only) the max number of induction steps
Alan Mishchenko committed
60 61
    p->fPolarFlip     =       0;  // uses polarity adjustment
    p->fLatchCorr     =       0;  // performs register correspondence
62
    p->fConstCorr     =       0;  // performs constant correspondence
63
    p->fOutputCorr    =       0;  // perform 'PO correspondence'
Alan Mishchenko committed
64
    p->fSemiFormal    =       0;  // enable semiformal filtering
Alan Mishchenko committed
65 66
    p->fDynamic       =       0;  // dynamic partitioning
    p->fLocalSim      =       0;  // local simulation
Alan Mishchenko committed
67
    p->fVerbose       =       0;  // verbose stats
68 69
    p->fEquivDump     =       0;  // enables dumping equivalences

Alan Mishchenko committed
70
    // latch correspondence
Alan Mishchenko committed
71 72 73
    p->fLatchCorrOpt  =       0;  // performs optimized register correspondence
    p->nSatVarMax     =    1000;  // the max number of SAT variables
    p->nRecycleCalls  =      50;  // calls to perform before recycling SAT solver
Alan Mishchenko committed
74 75 76
    // signal correspondence
    p->nSatVarMax2    =    5000;  // the max number of SAT variables
    p->nRecycleCalls2 =     250;  // calls to perform before recycling SAT solver
Alan Mishchenko committed
77
    // return values
Alan Mishchenko committed
78
    p->nIters         =       0;  // the number of iterations performed
Alan Mishchenko committed
79 80 81 82
}

/**Function*************************************************************

Alan Mishchenko committed
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
  Synopsis    [This procedure sets default parameters.]

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
void Ssw_ManSetDefaultParamsLcorr( Ssw_Pars_t * p )
{
    Ssw_ManSetDefaultParams( p );
    p->fLatchCorrOpt = 1;
    p->nBTLimit      = 10000;
}

/**Function*************************************************************

101 102 103 104 105 106 107 108 109 110 111 112 113
  Synopsis    [Reports improvements for property cones.]

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
void Ssw_ReportConeReductions( Ssw_Man_t * p, Aig_Man_t * pAigInit, Aig_Man_t * pAigStop )
{
    Aig_Man_t * pAig1, * pAig2, * pAux;
    pAig1 = Aig_ManDupOneOutput( pAigInit, 0, 1 );
114
    pAig1 = Aig_ManScl( pAux = pAig1, 1, 1, 0, -1, -1, 0, 0 );
115 116
    Aig_ManStop( pAux );
    pAig2 = Aig_ManDupOneOutput( pAigStop, 0, 1 );
117
    pAig2 = Aig_ManScl( pAux = pAig2, 1, 1, 0, -1, -1, 0, 0 );
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
    Aig_ManStop( pAux );
   
    p->nNodesBegC = Aig_ManNodeNum(pAig1);
    p->nNodesEndC = Aig_ManNodeNum(pAig2);
    p->nRegsBegC  = Aig_ManRegNum(pAig1);
    p->nRegsEndC  = Aig_ManRegNum(pAig2);

    Aig_ManStop( pAig1 );
    Aig_ManStop( pAig2 );
}

/**Function*************************************************************

  Synopsis    [Reports one node.]

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
void Ssw_ReportOneOutput( Aig_Man_t * p, Aig_Obj_t * pObj )
{
    if ( pObj == Aig_ManConst1(p) )
        printf( "1" );
    else if ( pObj == Aig_ManConst0(p) )
        printf( "0" );
    else 
        printf( "X" );
}

/**Function*************************************************************

  Synopsis    [Reports improvements for property cones.]

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
void Ssw_ReportOutputs( Aig_Man_t * pAig )
{
    Aig_Obj_t * pObj;
    int i;
    Saig_ManForEachPo( pAig, pObj, i )
    {
        if ( i < Saig_ManPoNum(pAig)-Saig_ManConstrNum(pAig) )
            printf( "o" );
        else
            printf( "c" );
        Ssw_ReportOneOutput( pAig, Aig_ObjChild0(pObj) );
    }
    printf( "\n" );
}

/**Function*************************************************************

  Synopsis    [Remove from-equivs that are in the cone of constraints.]

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
void Ssw_ManUpdateEquivs( Ssw_Man_t * p, Aig_Man_t * pAig, int fVerbose )
{
    Vec_Ptr_t * vCones;
    Aig_Obj_t ** pArray;
    Aig_Obj_t * pObj;
    int i, nTotal = 0, nRemoved = 0;
    // collect the nodes in the cone of constraints
    pArray  = (Aig_Obj_t **)Vec_PtrArray(pAig->vPos);
    pArray += Saig_ManPoNum(pAig) - Saig_ManConstrNum(pAig);
    vCones  = Aig_ManDfsNodes( pAig, pArray, Saig_ManConstrNum(pAig) );
    // remove all the node that are equiv to something and are in the cones
    Aig_ManForEachObj( pAig, pObj, i )
    {
        if ( !Aig_ObjIsPi(pObj) && !Aig_ObjIsNode(pObj) )
            continue;
        if ( pAig->pReprs[i] != NULL )
            nTotal++;
        if ( !Aig_ObjIsTravIdCurrent(pAig, pObj) )
            continue;
        if ( pAig->pReprs[i] )
        {
            if ( p->pPars->fConstrs && !p->pPars->fMergeFull )
            {
                pAig->pReprs[i] = NULL;
                nRemoved++;
            }
        }
    }
    // collect statistics    
    p->nConesTotal   = Aig_ManPiNum(pAig) + Aig_ManNodeNum(pAig);
    p->nConesConstr  = Vec_PtrSize(vCones);
    p->nEquivsTotal  = nTotal;
    p->nEquivsConstr = nRemoved;
    Vec_PtrFree( vCones );
}

/**Function*************************************************************

Alan Mishchenko committed
225 226 227 228 229 230 231 232 233
  Synopsis    [Performs computation of signal correspondence with constraints.]

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Alan Mishchenko committed
234
Aig_Man_t * Ssw_SignalCorrespondenceRefine( Ssw_Man_t * p )
Alan Mishchenko committed
235
{
Alan Mishchenko committed
236
    int nSatProof, nSatCallsSat, nRecycles, nSatFailsReal, nUniques;
Alan Mishchenko committed
237
    Aig_Man_t * pAigNew;
238
    int RetValue, nIter = -1;
Alan Mishchenko committed
239
    int clk, clkTotal = clock();
Alan Mishchenko committed
240 241
    // get the starting stats
    p->nLitsBeg  = Ssw_ClassesLitNum( p->ppClasses );
Alan Mishchenko committed
242 243
    p->nNodesBeg = Aig_ManNodeNum(p->pAig);
    p->nRegsBeg  = Aig_ManRegNum(p->pAig);
Alan Mishchenko committed
244
    // refine classes using BMC
Alan Mishchenko committed
245
    if ( p->pPars->fVerbose )
Alan Mishchenko committed
246 247
    {
        printf( "Before BMC: " );
Alan Mishchenko committed
248
        Ssw_ClassesPrint( p->ppClasses, 0 );
Alan Mishchenko committed
249
    }
Alan Mishchenko committed
250 251
    if ( !p->pPars->fLatchCorr )
    { 
Alan Mishchenko committed
252
        p->pMSat = Ssw_SatStart( 0 );
253 254 255 256
        if ( p->pPars->fConstrs ) 
            Ssw_ManSweepBmcConstr( p );
        else
            Ssw_ManSweepBmc( p );
Alan Mishchenko committed
257 258
        Ssw_SatStop( p->pMSat );
        p->pMSat = NULL;
Alan Mishchenko committed
259 260
        Ssw_ManCleanup( p );
    }
Alan Mishchenko committed
261
    if ( p->pPars->fVerbose )
Alan Mishchenko committed
262 263
    {
        printf( "After  BMC: " );
Alan Mishchenko committed
264
        Ssw_ClassesPrint( p->ppClasses, 0 );
Alan Mishchenko committed
265
    }
Alan Mishchenko committed
266
    // apply semi-formal filtering
Alan Mishchenko committed
267
/*
Alan Mishchenko committed
268 269 270
    if ( p->pPars->fSemiFormal )
    {
        Aig_Man_t * pSRed;
Alan Mishchenko committed
271 272
        Ssw_FilterUsingSemi( p, 0, 2000, p->pPars->fVerbose );
//        Ssw_FilterUsingSemi( p, 1, 100000, p->pPars->fVerbose );
Alan Mishchenko committed
273 274 275 276
        pSRed = Ssw_SpeculativeReduction( p );
        Aig_ManDumpBlif( pSRed, "srm.blif", NULL, NULL );
        Aig_ManStop( pSRed );
    }
Alan Mishchenko committed
277
*/
278 279 280 281 282 283 284 285 286 287
    if ( p->pPars->pFunc )
    {
        ((int (*)(void *))p->pPars->pFunc)( p->pPars->pData );
        ((int (*)(void *))p->pPars->pFunc)( p->pPars->pData );
    }
    if ( p->pPars->nStepsMax == 0 )
    {
        printf( "Stopped signal correspondence after BMC.\n" );
        goto finalize;
    }
Alan Mishchenko committed
288
    // refine classes using induction
Alan Mishchenko committed
289
    nSatProof = nSatCallsSat = nRecycles = nSatFailsReal = nUniques = 0;
Alan Mishchenko committed
290 291
    for ( nIter = 0; ; nIter++ )
    {
292 293 294 295 296
        if ( p->pPars->nStepsMax == nIter )
        {
            printf( "Stopped signal correspondence after %d refiment iterations.\n", nIter );
            goto finalize;
        }
Alan Mishchenko committed
297 298 299 300 301 302 303 304 305 306 307 308
        if ( p->pPars->nItersStop >= 0 && p->pPars->nItersStop == nIter )
        {
            Aig_Man_t * pSRed = Ssw_SpeculativeReduction( p );
            Aig_ManDumpBlif( pSRed, "srm.blif", NULL, NULL );
            Aig_ManStop( pSRed );
            printf( "Iterative refinement is stopped before iteration %d.\n", nIter );
            printf( "The network is reduced using candidate equivalences.\n" );
            printf( "Speculatively reduced miter is saved in file \"%s\".\n", "srm.blif" );
            printf( "If the miter is SAT, the reduced result is incorrect.\n" );
            break;
        }

Alan Mishchenko committed
309
clk = clock();
Alan Mishchenko committed
310
        p->pMSat = Ssw_SatStart( 0 );
Alan Mishchenko committed
311
        if ( p->pPars->fLatchCorrOpt )
Alan Mishchenko committed
312
        {
Alan Mishchenko committed
313
            RetValue = Ssw_ManSweepLatch( p );
Alan Mishchenko committed
314 315
            if ( p->pPars->fVerbose )
            {
Alan Mishchenko committed
316
                printf( "%3d : C =%7d. Cl =%7d. Pr =%6d. Cex =%5d. R =%4d. F =%4d. ", 
Alan Mishchenko committed
317 318 319
                    nIter, Ssw_ClassesCand1Num(p->ppClasses), Ssw_ClassesClassNum(p->ppClasses), 
                    p->nSatProof-nSatProof, p->nSatCallsSat-nSatCallsSat, 
                    p->nRecycles-nRecycles, p->nSatFailsReal-nSatFailsReal );
Alan Mishchenko committed
320
                ABC_PRT( "T", clock() - clk );
Alan Mishchenko committed
321 322
            } 
        }
Alan Mishchenko committed
323
        else
Alan Mishchenko committed
324
        {
325 326 327
            if ( p->pPars->fConstrs ) 
                RetValue = Ssw_ManSweepConstr( p );
            else if ( p->pPars->fDynamic )
Alan Mishchenko committed
328 329 330
                RetValue = Ssw_ManSweepDyn( p );
            else
                RetValue = Ssw_ManSweep( p );
331

Alan Mishchenko committed
332
            p->pPars->nConflicts += p->pMSat->pSat->stats.conflicts;
Alan Mishchenko committed
333 334
            if ( p->pPars->fVerbose )
            {
Alan Mishchenko committed
335
                printf( "%3d : C =%7d. Cl =%7d. LR =%6d. NR =%6d. ", 
Alan Mishchenko committed
336
                    nIter, Ssw_ClassesCand1Num(p->ppClasses), Ssw_ClassesClassNum(p->ppClasses), 
Alan Mishchenko committed
337
                    p->nConstrReduced, Aig_ManNodeNum(p->pFrames) );
338
                if ( p->pPars->fDynamic )
Alan Mishchenko committed
339 340
                {
                    printf( "Cex =%5d. ", p->nSatCallsSat-nSatCallsSat );
Alan Mishchenko committed
341
                    printf( "R =%4d. ",   p->nRecycles-nRecycles );
Alan Mishchenko committed
342
                }
Alan Mishchenko committed
343 344
                printf( "F =%5d. %s ", p->nSatFailsReal-nSatFailsReal, 
                    (Saig_ManPoNum(p->pAig)==1 && Ssw_ObjIsConst1Cand(p->pAig,Aig_ObjFanin0(Aig_ManPo(p->pAig,0))))? "+" : "-" );
Alan Mishchenko committed
345
                ABC_PRT( "T", clock() - clk );
Alan Mishchenko committed
346
            } 
Alan Mishchenko committed
347 348
//            if ( p->pPars->fDynamic && p->nSatCallsSat-nSatCallsSat < 100 )
//                p->pPars->nBTLimit = 10000;
Alan Mishchenko committed
349
        }
Alan Mishchenko committed
350 351 352 353 354 355
        nSatProof     = p->nSatProof;
        nSatCallsSat  = p->nSatCallsSat;
        nRecycles     = p->nRecycles;
        nSatFailsReal = p->nSatFailsReal;
        nUniques      = p->nUniques;

Alan Mishchenko committed
356 357
        p->nVarsMax  = ABC_MAX( p->nVarsMax,  p->pMSat->nSatVars );
        p->nCallsMax = ABC_MAX( p->nCallsMax, p->pMSat->nSolverCalls );
Alan Mishchenko committed
358 359
        Ssw_SatStop( p->pMSat );
        p->pMSat = NULL;
Alan Mishchenko committed
360
        Ssw_ManCleanup( p );
Alan Mishchenko committed
361
        if ( !RetValue ) 
Alan Mishchenko committed
362
            break;
363 364
        if ( p->pPars->pFunc )
            ((int (*)(void *))p->pPars->pFunc)( p->pPars->pData );
Alan Mishchenko committed
365
    } 
366 367

finalize:
Alan Mishchenko committed
368
    p->pPars->nIters = nIter + 1;
Alan Mishchenko committed
369
p->timeTotal = clock() - clkTotal;
370 371

    Ssw_ManUpdateEquivs( p, p->pAig, p->pPars->fVerbose );
Alan Mishchenko committed
372
    pAigNew = Aig_ManDupRepr( p->pAig, 0 );
Alan Mishchenko committed
373
    Aig_ManSeqCleanup( pAigNew );
Alan Mishchenko committed
374
//Ssw_ClassesPrint( p->ppClasses, 1 );
Alan Mishchenko committed
375 376 377 378
    // get the final stats
    p->nLitsEnd  = Ssw_ClassesLitNum( p->ppClasses );
    p->nNodesEnd = Aig_ManNodeNum(pAigNew);
    p->nRegsEnd  = Aig_ManRegNum(pAigNew);
379 380 381
    // cleanup
    Aig_ManSetPhase( p->pAig );
    Aig_ManCleanMarkB( p->pAig );
Alan Mishchenko committed
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400
    return pAigNew;
}

/**Function*************************************************************

  Synopsis    [Performs computation of signal correspondence with constraints.]

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Aig_Man_t * Ssw_SignalCorrespondence( Aig_Man_t * pAig, Ssw_Pars_t * pPars )
{
    Ssw_Pars_t Pars;
    Aig_Man_t * pAigNew;
    Ssw_Man_t * p;
Alan Mishchenko committed
401
    assert( Aig_ManRegNum(pAig) > 0 );
Alan Mishchenko committed
402 403 404 405 406 407 408 409 410 411 412 413 414 415
    // reset random numbers
    Aig_ManRandom( 1 );
    // if parameters are not given, create them
    if ( pPars == NULL )
        Ssw_ManSetDefaultParams( pPars = &Pars );
    // consider the case of empty AIG
    if ( Aig_ManNodeNum(pAig) == 0 )
    {
        pPars->nIters = 0;
        // Ntl_ManFinalize() needs the following to satisfy an assertion
        Aig_ManReprStart( pAig,Aig_ManObjNumMax(pAig) );
        return Aig_ManDupOrdered(pAig);
    }
    // check and update parameters
Alan Mishchenko committed
416
    if ( pPars->fLatchCorrOpt )
Alan Mishchenko committed
417
    {
Alan Mishchenko committed
418
        pPars->fLatchCorr = 1;
Alan Mishchenko committed
419 420 421
        pPars->nFramesAddSim = 0;
        if ( (pAig->vClockDoms && Vec_VecSize(pAig->vClockDoms) > 0) )
           return Ssw_SignalCorrespondencePart( pAig, pPars );
Alan Mishchenko committed
422
    }
Alan Mishchenko committed
423 424 425 426 427 428 429 430
    else
    {
        assert( pPars->nFramesK > 0 );
        // perform partitioning
        if ( (pPars->nPartSize > 0 && pPars->nPartSize < Aig_ManRegNum(pAig))
             || (pAig->vClockDoms && Vec_VecSize(pAig->vClockDoms) > 0)  )
            return Ssw_SignalCorrespondencePart( pAig, pPars );
    }
Alan Mishchenko committed
431 432 433

    if ( pPars->fScorrGia )
    {
Alan Mishchenko committed
434 435 436 437 438 439 440 441 442 443
        if ( pPars->fLatchCorrOpt )
        {
            extern Aig_Man_t * Cec_LatchCorrespondence( Aig_Man_t * pAig, int nConfs, int fUseCSat );
            return Cec_LatchCorrespondence( pAig, pPars->nBTLimit, pPars->fUseCSat );
        }
        else
        {
            extern Aig_Man_t * Cec_SignalCorrespondence( Aig_Man_t * pAig, int nConfs, int fUseCSat );
            return Cec_SignalCorrespondence( pAig, pPars->nBTLimit, pPars->fUseCSat );
        }
Alan Mishchenko committed
444
    }
445
 
Alan Mishchenko committed
446 447 448 449
    // start the induction manager
    p = Ssw_ManCreate( pAig, pPars );
    // compute candidate equivalence classes
//    p->pPars->nConstrs = 1;
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466
    if ( p->pPars->fConstrs )
    {
        // create trivial equivalence classes with all nodes being candidates for constant 1
        p->ppClasses = Ssw_ClassesPrepareSimple( pAig, pPars->fLatchCorr, pPars->nMaxLevs );
        Ssw_ClassesSetData( p->ppClasses, NULL, NULL, Ssw_SmlObjIsConstBit, Ssw_SmlObjsAreEqualBit );
        // derive phase bits to satisfy the constraints
        if ( Ssw_ManSetConstrPhases( pAig, p->pPars->nFramesK + 1, &p->vInits ) != 0 )
        {
            printf( "Ssw_SignalCorrespondence(): The init state does not satisfy the constraints!\n" );
            p->pPars->fVerbose = 0;
            Ssw_ManStop( p );
            return NULL;
        }
        // perform simulation of the first timeframes
        Ssw_ManRefineByConstrSim( p );
    }
    else
Alan Mishchenko committed
467 468
    {
        // perform one round of seq simulation and generate candidate equivalence classes
469
        p->ppClasses = Ssw_ClassesPrepare( pAig, pPars->nFramesK, pPars->fLatchCorr, pPars->fConstCorr, pPars->fOutputCorr, pPars->nMaxLevs, pPars->fVerbose );
Alan Mishchenko committed
470
//        p->ppClasses = Ssw_ClassesPrepareTargets( pAig );
Alan Mishchenko committed
471 472 473 474 475 476
        if ( pPars->fLatchCorrOpt )
            p->pSml = Ssw_SmlStart( pAig, 0, 2, 1 );
        else if ( pPars->fDynamic )
            p->pSml = Ssw_SmlStart( pAig, 0, p->nFrames + p->pPars->nFramesAddSim, 1 );
        else
            p->pSml = Ssw_SmlStart( pAig, 0, 1 + p->pPars->nFramesAddSim, 1 );
477
        Ssw_ClassesSetData( p->ppClasses, p->pSml, (unsigned(*)(void *,Aig_Obj_t *))Ssw_SmlObjHashWord, (int(*)(void *,Aig_Obj_t *))Ssw_SmlObjIsConstWord, (int(*)(void *,Aig_Obj_t *,Aig_Obj_t *))Ssw_SmlObjsAreEqualWord );
Alan Mishchenko committed
478
    }
479
    // allocate storage
Alan Mishchenko committed
480
    if ( p->pPars->fLocalSim )
Alan Mishchenko committed
481
        p->pVisited = ABC_CALLOC( int, Ssw_SmlNumFrames( p->pSml ) * Aig_ManObjNumMax(p->pAig) );
Alan Mishchenko committed
482 483
    // perform refinement of classes
    pAigNew = Ssw_SignalCorrespondenceRefine( p );    
484 485 486
//    Ssw_ReportOutputs( pAigNew );
    if ( pPars->fConstrs && pPars->fVerbose )
        Ssw_ReportConeReductions( p, pAig, pAigNew );
Alan Mishchenko committed
487 488
    // cleanup
    Ssw_ManStop( p );
Alan Mishchenko committed
489
    return pAigNew;
Alan Mishchenko committed
490 491
}

Alan Mishchenko committed
492 493 494 495 496 497 498 499 500 501 502 503 504
/**Function*************************************************************

  Synopsis    [Performs computation of latch correspondence.]

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Aig_Man_t * Ssw_LatchCorrespondence( Aig_Man_t * pAig, Ssw_Pars_t * pPars )
{
505
    Aig_Man_t * pRes;
Alan Mishchenko committed
506 507 508
    Ssw_Pars_t Pars;
    if ( pPars == NULL )
        Ssw_ManSetDefaultParamsLcorr( pPars = &Pars );
509 510 511 512
    pRes = Ssw_SignalCorrespondence( pAig, pPars );
//    if ( pPars->fConstrs && pPars->fVerbose )
//        Ssw_ReportConeReductions( pAig, pRes );
    return pRes;
Alan Mishchenko committed
513
}
Alan Mishchenko committed
514 515


Alan Mishchenko committed
516 517 518 519 520
////////////////////////////////////////////////////////////////////////
///                       END OF FILE                                ///
////////////////////////////////////////////////////////////////////////


521 522
ABC_NAMESPACE_IMPL_END