bmc.h 7.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
/**CFile****************************************************************

  FileName    [bmc.h]

  SystemName  [ABC: Logic synthesis and verification system.]

  PackageName [SAT-based bounded model checking.]

  Synopsis    [External declarations.]

  Author      [Alan Mishchenko]
  
  Affiliation [UC Berkeley]

  Date        [Ver. 1.0. Started - June 20, 2005.]

  Revision    [$Id: bmc.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]

***********************************************************************/
 
#ifndef ABC___sat_bmc_BMC_h
#define ABC___sat_bmc_BMC_h


////////////////////////////////////////////////////////////////////////
///                          INCLUDES                                ///
////////////////////////////////////////////////////////////////////////

#include "aig/saig/saig.h"
30
#include "aig/gia/gia.h"
31 32 33 34 35 36 37 38 39 40

////////////////////////////////////////////////////////////////////////
///                         PARAMETERS                               ///
////////////////////////////////////////////////////////////////////////

ABC_NAMESPACE_HEADER_START

////////////////////////////////////////////////////////////////////////
///                         BASIC TYPES                              ///
////////////////////////////////////////////////////////////////////////
41 42 43 44

// unrolling manager 
typedef struct Unr_Man_t_ Unr_Man_t;

45 46 47 48 49 50 51 52 53
typedef struct Saig_ParBmc_t_ Saig_ParBmc_t;
struct Saig_ParBmc_t_
{
    int         nStart;         // starting timeframe
    int         nFramesMax;     // maximum number of timeframes 
    int         nConfLimit;     // maximum number of conflicts at a node
    int         nConfLimitJump; // maximum number of conflicts after jumping
    int         nFramesJump;    // the number of tiemframes to jump
    int         nTimeOut;       // approximate timeout in seconds
54
    int         nTimeOutGap;    // approximate timeout in seconds since the last change
55
    int         nTimeOutOne;    // timeout per output in multi-output solving
56 57
    int         nPisAbstract;   // the number of PIs to abstract
    int         fSolveAll;      // does not stop at the first SAT output
58
    int         fStoreCex;      // enable storing CEXes in the MO mode
59
    int         fUseBridge;     // use bridge interface
60 61 62
    int         fDropSatOuts;   // replace sat outputs by constant 0
    int         nFfToAddMax;    // max number of flops to add during CBA
    int         fSkipRand;      // skip random decisions
63 64 65
    int         nLearnedStart;  // starting learned clause limit
    int         nLearnedDelta;  // delta of learned clause limit
    int         nLearnedPerce;  // ratio of learned clause limit
66
    int         fVerbose;       // verbose 
67
    int         fNotVerbose;    // skip line-by-line print-out 
68
    int         fSilent;        // completely silent
69 70
    int         iFrame;         // explored up to this frame
    int         nFailOuts;      // the number of failed outputs
71
    int         nDropOuts;      // the number of dropped outputs
72
    abctime     timeLastSolved; // the time when the last output was solved
73
    int(*pFuncOnFail)(int,Abc_Cex_t*); // called for a failed output in MO mode
74 75
};

76
 
77 78
typedef struct Bmc_AndPar_t_ Bmc_AndPar_t;
struct Bmc_AndPar_t_
79 80 81
{
    int         nStart;         // starting timeframe
    int         nFramesMax;     // maximum number of timeframes 
82
    int         nFramesAdd;     // the number of additional frames
83
    int         nConfLimit;     // maximum number of conflicts at a node
Alan Mishchenko committed
84
    int         nTimeOut;       // timeout in seconds
85
    int         fLoadCnf;       // dynamic CNF loading
86
    int         fDumpFrames;    // dump unrolled timeframes
87
    int         fUseSynth;      // use synthesis
Alan Mishchenko committed
88
    int         fUseOldCnf;     // use old CNF construction
89
    int         fVerbose;       // verbose 
90
    int         fVeryVerbose;   // very verbose 
91 92 93 94 95
    int         fNotVerbose;    // skip line-by-line print-out 
    int         iFrame;         // explored up to this frame
    int         nFailOuts;      // the number of failed outputs
    int         nDropOuts;      // the number of dropped outputs
};
96 97 98 99 100 101 102
 
typedef struct Bmc_MulPar_t_ Bmc_MulPar_t;
struct Bmc_MulPar_t_
{
    int         TimeOutGlo;
    int         TimeOutLoc;
    int         TimeOutInc;
103
    int         TimeOutGap;
104
    int         TimePerOut;
105 106 107 108 109
    int         fUseSyn;
    int         fDumpFinal;
    int         fVerbose;
    int         fVeryVerbose;
};
110 111 112 113 114 115 116 117 118

////////////////////////////////////////////////////////////////////////
///                      MACRO DEFINITIONS                           ///
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
///                    FUNCTION DECLARATIONS                         ///
////////////////////////////////////////////////////////////////////////

119
/*=== bmcBmc.c ==========================================================*/
120
extern int               Saig_ManBmcSimple( Aig_Man_t * pAig, int nFrames, int nSizeMax, int nBTLimit, int fRewrite, int fVerbose, int * piFrame, int nCofFanLit );
121
/*=== bmcBmc2.c ==========================================================*/
122
extern int               Saig_BmcPerform( Aig_Man_t * pAig, int nStart, int nFramesMax, int nNodesMax, int nTimeOut, int nConfMaxOne, int nConfMaxAll, int fVerbose, int fVerbOverwrite, int * piFrames, int fSilent );
123
/*=== bmcBmc3.c ==========================================================*/
124 125
extern void              Saig_ParBmcSetDefaultParams( Saig_ParBmc_t * p );
extern int               Saig_ManBmcScalable( Aig_Man_t * pAig, Saig_ParBmc_t * pPars );
126 127
/*=== bmcBmcAnd.c ==========================================================*/
extern int               Gia_ManBmcPerform( Gia_Man_t * p, Bmc_AndPar_t * pPars );
128
/*=== bmcCexCut.c ==========================================================*/
129 130
extern Gia_Man_t *       Bmc_GiaTargetStates( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrBeg, int iFrEnd, int fCombOnly, int fGenAll, int fAllFrames, int fVerbose );
extern Aig_Man_t *       Bmc_AigTargetStates( Aig_Man_t * p, Abc_Cex_t * pCex, int iFrBeg, int iFrEnd, int fCombOnly, int fGenAll, int fAllFrames, int fVerbose );
131
/*=== bmcCexMin.c ==========================================================*/
132
extern Abc_Cex_t *       Saig_ManCexMinPerform( Aig_Man_t * pAig, Abc_Cex_t * pCex );
133
/*=== bmcICheck.c ==========================================================*/
134
extern void              Bmc_PerformICheck( Gia_Man_t * p, int nFramesMax, int nTimeOut, int fEmpty, int fVerbose );
135
extern Vec_Int_t *       Bmc_PerformISearch( Gia_Man_t * p, int nFramesMax, int nTimeOut, int fReverse, int fDump, int fVerbose );
136 137 138 139
/*=== bmcUnroll.c ==========================================================*/
extern Unr_Man_t *       Unr_ManUnrollStart( Gia_Man_t * pGia, int fVerbose );
extern Gia_Man_t *       Unr_ManUnrollFrame( Unr_Man_t * p, int f );
extern void              Unr_ManFree( Unr_Man_t * p );
140 141 142 143 144 145 146 147 148 149 150 151


ABC_NAMESPACE_HEADER_END



#endif

////////////////////////////////////////////////////////////////////////
///                       END OF FILE                                ///
////////////////////////////////////////////////////////////////////////