ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
absIter.c File Reference
#include "abs.h"
#include "sat/bmc/bmc.h"
Include dependency graph for absIter.c:

Go to the source code of this file.

Functions

int Gia_IterTryImprove (Gia_Man_t *p, int nTimeOut, int iFrame0)
 FUNCTION DEFINITIONS ///.
 
Gia_Man_tGia_ManShrinkGla (Gia_Man_t *p, int nFrameMax, int nTimeOut, int fUsePdr, int fUseSat, int fUseBdd, int fVerbose)
 

Function Documentation

◆ Gia_IterTryImprove()

int Gia_IterTryImprove ( Gia_Man_t * p,
int nTimeOut,
int iFrame0 )

FUNCTION DEFINITIONS ///.

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 50 of file absIter.c.

51{
52 Gia_Man_t * pAbs = Gia_ManDupAbsGates( p, p->vGateClasses );
53 Aig_Man_t * pAig = Gia_ManToAigSimple( pAbs );
54 int nStart = 0;
55 int nFrames = iFrame0 ? iFrame0 + 1 : 10000000;
56 int nNodeDelta = 2000;
57 int nBTLimit = 0;
58 int nBTLimitAll = 0;
59 int fVerbose = 0;
60 int RetValue, iFrame;
61 RetValue = Saig_BmcPerform( pAig, nStart, nFrames, nNodeDelta, nTimeOut, nBTLimit, nBTLimitAll, fVerbose, 0, &iFrame, 1, 0 );
62 assert( RetValue == 0 || RetValue == -1 );
63 Aig_ManStop( pAig );
64 Gia_ManStop( pAbs );
65 return iFrame;
66}
Gia_Man_t * Gia_ManDupAbsGates(Gia_Man_t *p, Vec_Int_t *vGateClasses)
Definition absDup.c:220
void Aig_ManStop(Aig_Man_t *p)
Definition aigMan.c:187
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition aig.h:50
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, int fUseSatoko)
Definition bmcBmc2.c:811
Cube * p
Definition exorList.c:222
Aig_Man_t * Gia_ManToAigSimple(Gia_Man_t *p)
Definition giaAig.c:408
void Gia_ManStop(Gia_Man_t *p)
Definition giaMan.c:82
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Gia_ManShrinkGla()

Gia_Man_t * Gia_ManShrinkGla ( Gia_Man_t * p,
int nFrameMax,
int nTimeOut,
int fUsePdr,
int fUseSat,
int fUseBdd,
int fVerbose )

Definition at line 67 of file absIter.c.

68{
69 Gia_Obj_t * pObj;
70 int i, iFrame0, iFrame;
71 int nTotal = 0, nRemoved = 0;
72 Vec_Int_t * vGScopy;
73 abctime clk, clkTotal = Abc_Clock();
74 assert( Gia_ManPoNum(p) == 1 );
75 assert( p->vGateClasses != NULL );
76 vGScopy = Vec_IntDup( p->vGateClasses );
77 if ( nFrameMax == 0 )
78 iFrame0 = Gia_IterTryImprove( p, 0, 0 );
79 else
80 iFrame0 = nFrameMax - 1;
81 while ( 1 )
82 {
83 int fChanges = 0;
84 Gia_ManForEachObj1( p, pObj, i )
85 {
86 if ( pObj->fMark0 )
87 continue;
88 if ( !Gia_ObjIsInGla(p, pObj) )
89 continue;
90 if ( pObj == Gia_ObjFanin0( Gia_ManPo(p, 0) ) )
91 continue;
92 if ( Gia_ObjIsAnd(pObj) )
93 {
94 if ( Gia_ObjIsInGla(p, Gia_ObjFanin0(pObj)) && Gia_ObjIsInGla(p, Gia_ObjFanin1(pObj)) )
95 continue;
96 }
97 if ( Gia_ObjIsRo(p, pObj) )
98 {
99 if ( Gia_ObjIsInGla(p, Gia_ObjFanin0(Gia_ObjRoToRi(p, pObj))) )
100 continue;
101 }
102 clk = Abc_Clock();
103 printf( "%5d : ", nTotal );
104 printf( "Obj =%7d ", i );
105 Gia_ObjRemFromGla( p, pObj );
106 iFrame = Gia_IterTryImprove( p, nTimeOut, iFrame0 );
107 if ( nFrameMax )
108 assert( iFrame <= nFrameMax );
109 else
110 assert( iFrame <= iFrame0 );
111 printf( "Frame =%6d ", iFrame );
112 if ( iFrame < iFrame0 )
113 {
114 pObj->fMark0 = 1;
115 Gia_ObjAddToGla( p, pObj );
116 printf( " " );
117 }
118 else
119 {
120 fChanges = 1;
121 nRemoved++;
122 printf( "Removing " );
123 Vec_IntWriteEntry( vGScopy, Gia_ObjId(p, pObj), 0 );
124 }
125 Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
126 nTotal++;
127 // update the classes
128 Vec_IntFreeP( &p->vGateClasses );
129 p->vGateClasses = Vec_IntDup(vGScopy);
130 }
131 if ( !fChanges )
132 break;
133 }
135 Vec_IntFree( vGScopy );
136 printf( "Tried = %d. ", nTotal );
137 printf( "Removed = %d. (%.2f %%) ", nRemoved, 100.0 * nRemoved / Vec_IntCountPositive(p->vGateClasses) );
138 Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
139 return NULL;
140}
ABC_INT64_T abctime
Definition abc_global.h:332
int Gia_IterTryImprove(Gia_Man_t *p, int nTimeOut, int iFrame0)
FUNCTION DEFINITIONS ///.
Definition absIter.c:50
int nTotal
DECLARATIONS ///.
Definition cutTruth.c:37
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
#define Gia_ManForEachObj1(p, pObj, i)
Definition gia.h:1192
void Gia_ManCleanMark0(Gia_Man_t *p)
Definition giaUtil.c:256
unsigned fMark0
Definition gia.h:81
Here is the call graph for this function: