ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
mainInt.h File Reference
#include "main.h"
#include "misc/tim/tim.h"
#include "map/if/if.h"
#include "aig/aig/aig.h"
#include "aig/gia/gia.h"
#include "proof/ssw/ssw.h"
#include "proof/fra/fra.h"
#include "misc/vec/vecHsh.h"
Include dependency graph for mainInt.h:

Go to the source code of this file.

Classes

struct  Abc_Frame_t_
 
struct  Abc_FrameInitializer_t_
 

Macros

#define ABC_VERSION   "UC Berkeley, ABC 1.01"
 INCLUDES ///.
 
#define ABC_MAX_STR   (1<<15)
 

Typedefs

typedef void(* Abc_Frame_Callback_BmcFrameDone_Func) (int frame, int po, int status)
 STRUCTURE DEFINITIONS ///.
 
typedef void(* Abc_Frame_Initialization_Func) (Abc_Frame_t *pAbc)
 
typedef struct Abc_FrameInitializer_t_ Abc_FrameInitializer_t
 

Functions

ABC_DLL int main (int argc, char *argv[])
 GLOBAL VARIABLES ///.
 
ABC_DLL void Abc_FrameInit (Abc_Frame_t *pAbc)
 FUNCTION DEFINITIONS ///.
 
ABC_DLL void Abc_FrameEnd (Abc_Frame_t *pAbc)
 
ABC_DLL void Abc_FrameAddInitializer (Abc_FrameInitializer_t *p)
 
ABC_DLL Abc_Frame_tAbc_FrameAllocate ()
 
ABC_DLL void Abc_FrameDeallocate (Abc_Frame_t *p)
 
ABC_DLL char * Abc_UtilsGetVersion (Abc_Frame_t *pAbc)
 FUNCTION DEFINITIONS ///.
 
ABC_DLL char * Abc_UtilsGetUsersInput (Abc_Frame_t *pAbc)
 
ABC_DLL void Abc_UtilsPrintHello (Abc_Frame_t *pAbc)
 
ABC_DLL void Abc_UtilsPrintUsage (Abc_Frame_t *pAbc, char *ProgName)
 
ABC_DLL void Abc_UtilsSource (Abc_Frame_t *pAbc)
 
ABC_DLL void Abc_FrameStoreStart (Abc_Frame_t *pAbc)
 
ABC_DLL void Abc_FrameStoreStop (Abc_Frame_t *pAbc)
 
ABC_DLL void Abc_FrameStoreAdd (Abc_Frame_t *pAbc, Gia_Man_t *p)
 
ABC_DLL void Abc_FrameStorePrint (Abc_Frame_t *pAbc)
 

Macro Definition Documentation

◆ ABC_MAX_STR

#define ABC_MAX_STR   (1<<15)

Definition at line 52 of file mainInt.h.

◆ ABC_VERSION

#define ABC_VERSION   "UC Berkeley, ABC 1.01"

INCLUDES ///.

CFile****************************************************************

FileName [mainInt.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [The main package.]

Synopsis [Internal declarations of the main package.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

Id
mainInt.h,v 1.1 2008/05/14 22:13:13 wudenni Exp

] PARAMETERS ///

Definition at line 49 of file mainInt.h.

Typedef Documentation

◆ Abc_Frame_Callback_BmcFrameDone_Func

typedef void(* Abc_Frame_Callback_BmcFrameDone_Func) (int frame, int po, int status)

STRUCTURE DEFINITIONS ///.

Definition at line 58 of file mainInt.h.

◆ Abc_Frame_Initialization_Func

typedef void(* Abc_Frame_Initialization_Func) (Abc_Frame_t *pAbc)

Definition at line 173 of file mainInt.h.

◆ Abc_FrameInitializer_t

Definition at line 176 of file mainInt.h.

Function Documentation

◆ Abc_FrameAddInitializer()

ABC_DLL void Abc_FrameAddInitializer ( Abc_FrameInitializer_t * p)
extern

Definition at line 76 of file mainInit.c.

77{
78 if( ! s_InitializerStart )
79 s_InitializerStart = p;
80
81 p->next = NULL;
82 p->prev = s_InitializerEnd;
83
84 if ( s_InitializerEnd )
85 s_InitializerEnd->next = p;
86
87 s_InitializerEnd = p;
88
89}
Cube * p
Definition exorList.c:222

◆ Abc_FrameAllocate()

ABC_DLL Abc_Frame_t * Abc_FrameAllocate ( )
extern

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 162 of file mainFrame.c.

163{
164 Abc_Frame_t * p;
165 extern void define_cube_size( int n );
166 extern void set_espresso_flags();
167 // allocate and clean
168 p = ABC_CALLOC( Abc_Frame_t, 1 );
169 // get version
170 p->sVersion = Abc_UtilsGetVersion( p );
171 // set streams
172 p->Err = stderr;
173 p->Out = stdout;
174 p->Hst = NULL;
175 p->Status = -1;
176 p->nFrames = -1;
177 // set the starting step
178 p->nSteps = 1;
179 p->fBatchMode = 0;
180 // networks to be used by choice
181 p->vStore = Vec_PtrAlloc( 16 );
182 p->vAbcObjIds = Vec_IntAlloc( 0 );
183 // initialize decomposition manager
184// define_cube_size(20);
185// set_espresso_flags();
186 // initialize the trace manager
187// Abc_HManStart();
188 p->vPlugInComBinPairs = Vec_PtrAlloc( 100 );
189 return p;
190}
#define ABC_CALLOC(type, num)
Definition abc_global.h:265
typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
INCLUDES ///.
Definition abcapis.h:38
void set_espresso_flags()
Definition cubehack.c:129
void define_cube_size(int n)
Definition cubehack.c:51
ABC_DLL char * Abc_UtilsGetVersion(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition mainUtils.c:52
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_FrameDeallocate()

ABC_DLL void Abc_FrameDeallocate ( Abc_Frame_t * p)
extern

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 204 of file mainFrame.c.

205{
206 extern void Rwt_ManGlobalStop();
207 extern void undefine_cube_size();
208// extern void Ivy_TruthManStop();
209// Abc_HManStop();
210// undefine_cube_size();
212// Ivy_TruthManStop();
213 if ( p->vAbcObjIds) Vec_IntFree( p->vAbcObjIds );
214 if ( p->vCexVec ) Vec_PtrFreeFree( p->vCexVec );
215 if ( p->vPoEquivs ) Vec_VecFree( (Vec_Vec_t *)p->vPoEquivs );
216 if ( p->vStatuses ) Vec_IntFree( p->vStatuses );
217 if ( p->pManDec ) Dec_ManStop( (Dec_Man_t *)p->pManDec );
218#ifdef ABC_USE_CUDD
219 if ( p->dd ) Extra_StopManager( p->dd );
220#endif
221 if ( p->vStore ) Vec_PtrFree( p->vStore );
222 if ( p->pSave1 ) Aig_ManStop( (Aig_Man_t *)p->pSave1 );
223 if ( p->pSave2 ) Aig_ManStop( (Aig_Man_t *)p->pSave2 );
224 if ( p->pSave3 ) Aig_ManStop( (Aig_Man_t *)p->pSave3 );
225 if ( p->pSave4 ) Aig_ManStop( (Aig_Man_t *)p->pSave4 );
226 if ( p->pManDsd ) If_DsdManFree( (If_DsdMan_t *)p->pManDsd, 0 );
227 if ( p->pManDsd2 ) If_DsdManFree( (If_DsdMan_t *)p->pManDsd2, 0 );
228 if ( p->pNtkBackup) Abc_NtkDelete( p->pNtkBackup );
229 if ( p->vPlugInComBinPairs )
230 {
231 char * pTemp;
232 int i;
233 Vec_PtrForEachEntry( char *, p->vPlugInComBinPairs, pTemp, i )
234 ABC_FREE( pTemp );
235 Vec_PtrFree( p->vPlugInComBinPairs );
236 }
237 Vec_IntFreeP( &p->vIndFlops );
238 Vec_PtrFreeP( &p->vLTLProperties_global );
239 if ( p->vSignalNames )
240 Vec_PtrFreeFree( p->vSignalNames );
241 ABC_FREE( p->pSpecName );
243 ABC_FREE( p->pDrivingCell );
244 ABC_FREE( p->pCex2 );
245 ABC_FREE( p->pCex );
246 Vec_IntFreeP( &p->pAbcWlcInv );
247 Abc_NamDeref( s_GlobalFrame->pJsonStrs );
248 Vec_WecFreeP( &s_GlobalFrame->vJsonObjs );
249 Ndr_Delete( s_GlobalFrame->pNdr );
250 ABC_FREE( s_GlobalFrame->pNdrArray );
251 Abc_FrameStoreStop( s_GlobalFrame );
252
253 Gia_ManStopP( &p->pGiaMiniAig );
254 Gia_ManStopP( &p->pGiaMiniLut );
255 Vec_IntFreeP( &p->vCopyMiniAig );
256 Vec_IntFreeP( &p->vCopyMiniLut );
257 ABC_FREE( p->pArray );
258 ABC_FREE( p->pBoxes );
259
260
261 ABC_FREE( p );
262 s_GlobalFrame = NULL;
263}
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
Definition abcNtk.c:1421
#define ABC_FREE(obj)
Definition abc_global.h:267
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
void undefine_cube_size()
Definition cubehack.c:111
struct Dec_Man_t_ Dec_Man_t
Definition dec.h:79
void Dec_ManStop(Dec_Man_t *p)
Definition decMan.c:70
void Extra_StopManager(DdManager *dd)
void Gia_ManStopP(Gia_Man_t **p)
Definition giaMan.c:224
struct If_DsdMan_t_ If_DsdMan_t
Definition if.h:84
void If_DsdManFree(If_DsdMan_t *p, int fVerbose)
Definition ifDsd.c:333
void Abc_FrameDeleteAllNetworks(Abc_Frame_t *p)
Definition mainFrame.c:596
ABC_DLL void Abc_FrameStoreStop(Abc_Frame_t *pAbc)
Definition mainUtils.c:303
void Rwt_ManGlobalStop()
Definition rwtMan.c:68
void Abc_NamDeref(Abc_Nam_t *p)
Definition utilNam.c:212
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition vecPtr.h:55
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition vecVec.h:42
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_FrameEnd()

ABC_DLL void Abc_FrameEnd ( Abc_Frame_t * pAbc)
extern

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

Synopsis [Stops all the packages.]

Description []

SideEffects []

SeeAlso []

Definition at line 145 of file mainInit.c.

146{
148 for( p = s_InitializerEnd ; p ; p = p->prev )
149 if ( p->destroy )
150 p->destroy(pAbc);
151 Abc_End( pAbc );
152 Io_End( pAbc );
153 Cmd_End( pAbc );
154 If_End( pAbc );
155 Map_End( pAbc );
156 Mio_End( pAbc );
157 Super_End( pAbc );
158 Libs_End( pAbc );
159 Load_End( pAbc );
160 Scl_End( pAbc );
161 Wlc_End( pAbc );
162 Wln_End( pAbc );
163 Bac_End( pAbc );
164 Cba_End( pAbc );
165 Pla_End( pAbc );
166 Test_End( pAbc );
167 Glucose_End( pAbc );
168}
void Abc_End(Abc_Frame_t *pAbc)
Definition abc.c:1504
void Super_End(Abc_Frame_t *pAbc)
Definition super.c:65
void Pla_End(Abc_Frame_t *pAbc)
Definition plaCom.c:78
void Scl_End(Abc_Frame_t *pAbc)
Definition scl.c:127
void Wlc_End(Abc_Frame_t *pAbc)
Definition wlcCom.c:117
void Glucose_End(Abc_Frame_t *pAbc)
void Cmd_End(Abc_Frame_t *pAbc)
Definition cmd.c:139
void Io_End(Abc_Frame_t *pAbc)
Definition io.c:192
void Load_End(Abc_Frame_t *pAbc)
Definition cmdLoad.c:199
void Libs_End(Abc_Frame_t *pAbc)
Definition libSupport.c:206
void Wln_End(Abc_Frame_t *pAbc)
Definition wlnCom.c:77
void Mio_End(Abc_Frame_t *pAbc)
Definition mio.c:226
void Test_End(Abc_Frame_t *pAbc)
Definition test.c:60
void Bac_End(Abc_Frame_t *pAbc)
Definition bacCom.c:125
void Cba_End(Abc_Frame_t *pAbc)
Definition cbaCom.c:84
void Map_End(Abc_Frame_t *pAbc)
Definition mapper.c:64
void If_End(Abc_Frame_t *pAbc)
Definition ifCom.c:79
struct Abc_FrameInitializer_t_ Abc_FrameInitializer_t
Definition mainInt.h:176
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_FrameInit()

ABC_DLL void Abc_FrameInit ( Abc_Frame_t * pAbc)
extern

FUNCTION DEFINITIONS ///.

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

Synopsis [Starts all the packages.]

Description []

SideEffects []

SeeAlso []

Definition at line 106 of file mainInit.c.

107{
109 Cmd_Init( pAbc );
110 Cmd_CommandExecute( pAbc, "set checkread" );
111 Io_Init( pAbc );
112 Abc_Init( pAbc );
113 If_Init( pAbc );
114 Map_Init( pAbc );
115 Mio_Init( pAbc );
116 Super_Init( pAbc );
117 Libs_Init( pAbc );
118 Load_Init( pAbc );
119 Scl_Init( pAbc );
120 Wlc_Init( pAbc );
121 Wln_Init( pAbc );
122 Bac_Init( pAbc );
123 Cba_Init( pAbc );
124 Pla_Init( pAbc );
125 Test_Init( pAbc );
126 Glucose_Init( pAbc );
127 Glucose2_Init( pAbc );
128 for( p = s_InitializerStart ; p ; p = p->next )
129 if(p->init)
130 p->init(pAbc);
131}
ABC_DLL int Cmd_CommandExecute(Abc_Frame_t *pAbc, const char *sCommand)
Definition cmdApi.c:193
void Scl_Init(Abc_Frame_t *pAbc)
Definition scl.c:102
void Wln_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition wlnCom.c:56
void Libs_Init(Abc_Frame_t *pAbc)
Definition libSupport.c:200
void Cba_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition cbaCom.c:60
void Mio_Init(Abc_Frame_t *pAbc)
Definition mio.c:198
void Bac_Init(Abc_Frame_t *pAbc)
Definition bacCom.c:102
void Super_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition super.c:48
void Cmd_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition cmd.c:85
void Map_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition mapper.c:48
void Test_Init(Abc_Frame_t *pAbc)
DECLARATIONS ///.
Definition test.c:45
void Io_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition io.c:117
ABC_NAMESPACE_IMPL_START void Abc_Init(Abc_Frame_t *pAbc)
DECLARATIONS ///.
Definition abc.c:892
void Load_Init(Abc_Frame_t *pAbc)
Definition cmdLoad.c:164
void Glucose_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
void Wlc_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition wlcCom.c:78
void If_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition ifCom.c:53
void Pla_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition plaCom.c:57
void Glucose2_Init(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_FrameStoreAdd()

ABC_DLL void Abc_FrameStoreAdd ( Abc_Frame_t * pAbc,
Gia_Man_t * p )
extern

Definition at line 316 of file mainUtils.c.

317{
318 if ( pAbc->pHash == NULL )
319 Abc_FrameStoreStart( pAbc );
320 Gia_Man_t * p = Gia_ManIsoCanonicize( pGia, 0 );
321 Vec_IntClear( pAbc->pHash->vEntry );
322 Vec_IntPush( pAbc->pHash->vEntry, 0 );
323 Vec_IntPush( pAbc->pHash->vEntry, Gia_ManPiNum(p) );
324 Vec_IntPush( pAbc->pHash->vEntry, Gia_ManPoNum(p) );
325 Vec_IntPush( pAbc->pHash->vEntry, Gia_ManRegNum(p) );
326 Gia_Obj_t * pObj; int i;
327 Gia_ManForEachAnd( p, pObj, i )
328 Vec_IntPushTwo( pAbc->pHash->vEntry, Gia_ObjFaninLit0(pObj, i), Gia_ObjFaninLit1(pObj, i) );
329 int iEntry = Hsh_VecManAdd( pAbc->pHash, pAbc->pHash->vEntry );
330 if ( Vec_IntSize(pAbc->pHash->vValue) == iEntry )
331 Vec_IntPush( pAbc->pHash->vValue, 0 );
332 Vec_IntAddToEntry( pAbc->pHash->vValue, iEntry, 1 );
333 assert( Vec_IntSize(pAbc->pHash->vValue) == Hsh_VecSize(pAbc->pHash) );
334 Gia_ManStop( p );
335}
void Gia_ManStop(Gia_Man_t *p)
Definition giaMan.c:82
#define Gia_ManForEachAnd(p, pObj, i)
Definition gia.h:1214
struct Gia_Obj_t_ Gia_Obj_t
Definition gia.h:76
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
Gia_Man_t * Gia_ManIsoCanonicize(Gia_Man_t *p, int fVerbose)
Definition giaIso.c:958
void Abc_FrameStoreStart(Abc_Frame_t *pAbc)
Definition mainUtils.c:309
#define assert(ex)
Definition util_old.h:213
Here is the call graph for this function:

◆ Abc_FrameStorePrint()

ABC_DLL void Abc_FrameStorePrint ( Abc_Frame_t * pAbc)
extern

Definition at line 336 of file mainUtils.c.

337{
338 if ( pAbc->pHash == NULL )
339 Abc_FrameStoreStart( pAbc );
340 int i, Entry, nAll = 0, Max = Vec_IntFindMax( pAbc->pHash->vValue );
341 Vec_Int_t * vCounts = Vec_IntStart( Max+1 );
342 Vec_IntForEachEntry( pAbc->pHash->vValue, Entry, i )
343 Vec_IntAddToEntry( vCounts, Entry, 1 );
344 printf( "Distribution of %d stored items by reference count (<ref_count>=<num_items>): ", Hsh_VecSize(pAbc->pHash) );
345 Vec_IntForEachEntry( vCounts, Entry, i )
346 if ( Entry )
347 printf( "%d=%d ", i, Entry ), nAll += i * Entry;
348 printf( "ALL=%d\n", nAll );
349 Vec_IntFree( vCounts );
350}
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition vecInt.h:54
Here is the call graph for this function:

◆ Abc_FrameStoreStart()

ABC_DLL void Abc_FrameStoreStart ( Abc_Frame_t * pAbc)
extern

Definition at line 309 of file mainUtils.c.

310{
311 Abc_FrameStoreStop( pAbc );
312 pAbc->pHash = Hsh_VecManStart( 1000 );
313 pAbc->pHash->vEntry = Vec_IntAlloc( 1000 );
314 pAbc->pHash->vValue = Vec_IntAlloc( 1000 );
315}
void Abc_FrameStoreStop(Abc_Frame_t *pAbc)
Definition mainUtils.c:303
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_FrameStoreStop()

ABC_DLL void Abc_FrameStoreStop ( Abc_Frame_t * pAbc)
extern

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

Synopsis []

Description []

SideEffects []

Definition at line 303 of file mainUtils.c.

304{
305 if ( pAbc->pHash )
306 Hsh_VecManStop( pAbc->pHash );
307 pAbc->pHash = NULL;
308}
Here is the caller graph for this function:

◆ Abc_UtilsGetUsersInput()

ABC_DLL char * Abc_UtilsGetUsersInput ( Abc_Frame_t * pAbc)
extern

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 77 of file mainUtils.c.

78{
79 static char Prompt[5000];
80 sprintf( Prompt, "abc %02d> ", pAbc->nSteps );
81#ifdef ABC_USE_READLINE
82 {
83 static char * line = NULL;
84 if (line != NULL) ABC_FREE(line);
85 line = readline(Prompt);
86 if (line == NULL){ printf("***EOF***\n"); exit(0); }
87 add_history(line);
88 return line;
89 }
90#else
91 {
92 char * pRetValue;
93 fprintf( pAbc->Out, "%s", Prompt );
94 pRetValue = fgets( Prompt, 5000, stdin );
95 return Prompt;
96 }
97#endif
98}
char * sprintf()
VOID_HACK exit()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_UtilsGetVersion()

ABC_DLL char * Abc_UtilsGetVersion ( Abc_Frame_t * pAbc)
extern

FUNCTION DEFINITIONS ///.

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 52 of file mainUtils.c.

53{
54 static char Version[1000];
55#if __GNUC__
56 #pragma GCC diagnostic push
57 #pragma GCC diagnostic ignored "-Wdate-time"
58#endif
59 sprintf(Version, "%s (compiled %s %s)", ABC_VERSION, __DATE__, __TIME__);
60#if __GNUC__
61 #pragma GCC diagnostic pop
62#endif
63 return Version;
64}
#define ABC_VERSION
INCLUDES ///.
Definition mainInt.h:49
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_UtilsPrintHello()

ABC_DLL void Abc_UtilsPrintHello ( Abc_Frame_t * pAbc)
extern

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 111 of file mainUtils.c.

112{
113 fprintf( pAbc->Out, "%s\n", pAbc->sVersion );
114}
Here is the caller graph for this function:

◆ Abc_UtilsPrintUsage()

ABC_DLL void Abc_UtilsPrintUsage ( Abc_Frame_t * pAbc,
char * ProgName )
extern

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 127 of file mainUtils.c.

128{
129 fprintf( pAbc->Err, "\n" );
130 fprintf( pAbc->Err,
131 "usage: %s [-c cmd] [-q cmd] [-C cmd] [-Q cmd] [-f script] [-h] [-o file] [-s] [-t type] [-T type] [-x] [-b] [file]\n",
132 ProgName);
133 fprintf( pAbc->Err, " -c cmd\texecute commands `cmd'\n");
134 fprintf( pAbc->Err, " -q cmd\texecute commands `cmd' quietly\n");
135 fprintf( pAbc->Err, " -C cmd\texecute commands `cmd', then continue in interactive mode\n");
136 fprintf( pAbc->Err, " -Q cmd\texecute commands `cmd' quietly, then continue in interactive mode\n");
137 fprintf( pAbc->Err, " -F script\texecute commands from a script file and echo commands\n");
138 fprintf( pAbc->Err, " -f script\texecute commands from a script file\n");
139 fprintf( pAbc->Err, " -h\t\tprint the command usage\n");
140 fprintf( pAbc->Err, " -o file\tspecify output filename to store the result\n");
141 fprintf( pAbc->Err, " -s\t\tdo not read any initialization file\n");
142 fprintf( pAbc->Err, " -t type\tspecify input type (blif_mv (default), blif_mvs, blif, or none)\n");
143 fprintf( pAbc->Err, " -T type\tspecify output type (blif_mv (default), blif_mvs, blif, or none)\n");
144 fprintf( pAbc->Err, " -x\t\tequivalent to '-t none -T none'\n");
145 fprintf( pAbc->Err, " -b\t\trunning in bridge mode\n");
146 fprintf( pAbc->Err, "\n" );
147}
Here is the caller graph for this function:

◆ Abc_UtilsSource()

ABC_DLL void Abc_UtilsSource ( Abc_Frame_t * pAbc)
extern

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 160 of file mainUtils.c.

161{
162#ifdef WIN32
163 if ( Cmd_CommandExecute(pAbc, "source abc.rc") )
164 {
165 if ( Cmd_CommandExecute(pAbc, "source ..\\abc.rc") == 0 )
166 printf( "Loaded \"abc.rc\" from the parent directory.\n" );
167 else if ( Cmd_CommandExecute(pAbc, "source ..\\..\\abc.rc") == 0 )
168 printf( "Loaded \"abc.rc\" from the grandparent directory.\n" );
169 }
170#else
171
172#if 0
173 {
174 char * sPath1, * sPath2;
175
176 // If .rc is present in both the home and current directories, then read
177 // it from the home directory. Otherwise, read it from wherever it's located.
178 sPath1 = Extra_UtilFileSearch(".rc", "~/", "r");
179 sPath2 = Extra_UtilFileSearch(".rc", ".", "r");
180
181 if ( sPath1 && sPath2 ) {
182 /* ~/.rc == .rc : Source the file only once */
183 (void) Cmd_CommandExecute(pAbc, "source -s ~/.rc");
184 }
185 else {
186 if (sPath1) {
187 (void) Cmd_CommandExecute(pAbc, "source -s ~/.rc");
188 }
189 if (sPath2) {
190 (void) Cmd_CommandExecute(pAbc, "source -s .rc");
191 }
192 }
193 if ( sPath1 ) ABC_FREE(sPath1);
194 if ( sPath2 ) ABC_FREE(sPath2);
195
196 /* execute the abc script which can be open with the "open_path" */
197 Cmd_CommandExecute( pAbc, "source -s abc.rc" );
198 }
199#endif
200
201 {
202 char * sPath1, * sPath2;
203 char * home;
204
205 // If .rc is present in both the home and current directories, then read
206 // it from the home directory. Otherwise, read it from wherever it's located.
207 home = getenv("HOME");
208 if (home){
209 char * sPath3 = ABC_ALLOC(char, strlen(home) + 2);
210 (void) sprintf(sPath3, "%s/", home);
211 sPath1 = Extra_UtilFileSearch(".abc.rc", sPath3, "r");
212 ABC_FREE(sPath3);
213 }else
214 sPath1 = NULL;
215
216 sPath2 = Extra_UtilFileSearch(".abc.rc", ".", "r");
217
218 if ( sPath1 && sPath2 ) {
219 /* ~/.rc == .rc : Source the file only once */
220 char *tmp_cmd = ABC_ALLOC(char, strlen(sPath1)+12);
221 (void) sprintf(tmp_cmd, "source -s %s", sPath1);
222 // (void) Cmd_CommandExecute(pAbc, "source -s ~/.abc.rc");
223 (void) Cmd_CommandExecute(pAbc, tmp_cmd);
224 ABC_FREE(tmp_cmd);
225 }
226 else {
227 if (sPath1) {
228 char *tmp_cmd = ABC_ALLOC(char, strlen(sPath1)+12);
229 (void) sprintf(tmp_cmd, "source -s %s", sPath1);
230 // (void) Cmd_CommandExecute(pAbc, "source -s ~/.abc.rc");
231 (void) Cmd_CommandExecute(pAbc, tmp_cmd);
232 ABC_FREE(tmp_cmd);
233 }
234 if (sPath2) {
235 char *tmp_cmd = ABC_ALLOC(char, strlen(sPath2)+12);
236 (void) sprintf(tmp_cmd, "source -s %s", sPath2);
237 // (void) Cmd_CommandExecute(pAbc, "source -s .abc.rc");
238 (void) Cmd_CommandExecute(pAbc, tmp_cmd);
239 ABC_FREE(tmp_cmd);
240 }
241 }
242 if ( sPath1 ) ABC_FREE(sPath1);
243 if ( sPath2 ) ABC_FREE(sPath2);
244
245 /* execute the abc script which can be open with the "open_path" */
246 Cmd_CommandExecute( pAbc, "source -s abc.rc" );
247 }
248
249#endif //WIN32
250}
#define ABC_ALLOC(type, num)
Definition abc_global.h:264
char * Extra_UtilFileSearch(char *file, char *path, char *mode)
int strlen()
char * getenv()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

ABC_DLL int main ( int argc,
char * argv[] )
extern

GLOBAL VARIABLES ///.

MACRO DEFINITIONS /// FUNCTION DEFINITIONS ///

GLOBAL VARIABLES ///.

CFile****************************************************************

FileName [mainMC.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [The main package.]

Synopsis [The main file for the model checker.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

Id
main.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis [The main() procedure.]

Description []

SideEffects []

SeeAlso []

GLOBAL VARIABLES ///.

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

Synopsis [The main() procedure.]

Description [This procedure compiles into a stand-alone program for DAG-aware rewriting of the AIGs. A BLIF or PLA file to be considered for rewriting should be given as a command-line argument. Implementation of the rewriting is inspired by the paper: Per Bjesse, Arne Boralv, "DAG-aware circuit compression for formal verification", Proc. ICCAD 2004.]

SideEffects []

SeeAlso []

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

Synopsis [Takes file with commands to be executed and the number of CPUs.]

Description []

SideEffects []

SeeAlso []

Definition at line 9 of file main.c.

10{
11 return ABC_NAMESPACE_PREFIX Abc_RealMain(argc, argv);
12}
#define ABC_NAMESPACE_PREFIX
ABC_NAMESPACE_IMPL_START int Abc_RealMain(int argc, char *argv[])
Definition mainReal.c:88
Here is the call graph for this function: