abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
utilBridge.c
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [utilBridge.c]
4 
5  SystemName [ABC: Logic synthesis and verification system.]
6 
7  PackageName []
8 
9  Synopsis []
10 
11  Author [Alan Mishchenko]
12 
13  Affiliation [UC Berkeley]
14 
15  Date [Ver. 1.0. Started - June 20, 2005.]
16 
17  Revision [$Id: utilBridge.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
18 
19 ***********************************************************************/
20 
21 #include <stdio.h>
22 #include <string.h>
23 #include <stdlib.h>
24 #include <assert.h>
25 #if defined(LIN) || defined(LIN64)
26 #include <unistd.h>
27 #endif
28 
29 #include "aig/gia/gia.h"
30 
32 
33 ////////////////////////////////////////////////////////////////////////
34 /// DECLARATIONS ///
35 ////////////////////////////////////////////////////////////////////////
36 
37 #define BRIDGE_TEXT_MESSAGE 999996
38 
39 #define BRIDGE_ABORT 5
40 #define BRIDGE_PROGRESS 3
41 #define BRIDGE_RESULTS 101
42 #define BRIDGE_BAD_ABS 105
43 //#define BRIDGE_NETLIST 106
44 //#define BRIDGE_ABS_NETLIST 107
45 
46 #define BRIDGE_VALUE_X 0
47 #define BRIDGE_VALUE_0 2
48 #define BRIDGE_VALUE_1 3
49 
50 
51 ////////////////////////////////////////////////////////////////////////
52 /// FUNCTION DEFINITIONS ///
53 ////////////////////////////////////////////////////////////////////////
54 
55 /**Function*************************************************************
56 
57  Synopsis []
58 
59  Description []
60 
61  SideEffects []
62 
63  SeeAlso []
64 
65 ***********************************************************************/
67 {
68  Vec_Str_t * vStr;
69  Gia_Obj_t * pObj;
70  int i, uLit0, uLit1, nNodes;
71  assert( Gia_ManPoNum(p) > 0 );
72 
73  // start with const1 node (number 1)
74  nNodes = 1;
75  // assign literals(!!!) to the value field
76  Gia_ManConst0(p)->Value = Abc_Var2Lit( nNodes++, 1 );
77  Gia_ManForEachCi( p, pObj, i )
78  pObj->Value = Abc_Var2Lit( nNodes++, 0 );
79  Gia_ManForEachAnd( p, pObj, i )
80  pObj->Value = Abc_Var2Lit( nNodes++, 0 );
81 
82  // write header
83  vStr = Vec_StrAlloc( 1000 );
87 
88  // write the nodes
89  Gia_ManForEachAnd( p, pObj, i )
90  {
91  uLit0 = Gia_ObjFanin0Copy( pObj );
92  uLit1 = Gia_ObjFanin1Copy( pObj );
93  assert( uLit0 != uLit1 );
94  Gia_AigerWriteUnsigned( vStr, uLit0 << 1 );
95  Gia_AigerWriteUnsigned( vStr, uLit1 );
96  }
97 
98  // write latch drivers
99  Gia_ManForEachRi( p, pObj, i )
100  {
101  uLit0 = Gia_ObjFanin0Copy( pObj );
102  Gia_AigerWriteUnsigned( vStr, (uLit0 << 2) | BRIDGE_VALUE_0 );
103  }
104 
105  // write PO drivers
107  Gia_ManForEachPo( p, pObj, i )
108  {
109  uLit0 = Gia_ObjFanin0Copy( pObj );
110  // complement property output!!!
111  Gia_AigerWriteUnsigned( vStr, Abc_LitNot(uLit0) );
112  }
113  return vStr;
114 }
115 
116 /**Function*************************************************************
117 
118  Synopsis []
119 
120  Description []
121 
122  SideEffects []
123 
124  SeeAlso []
125 
126 ***********************************************************************/
127 void Gia_CreateHeader( FILE * pFile, int Type, int Size, unsigned char * pBuffer )
128 {
129  fprintf( pFile, "%.6d", Type );
130  fprintf( pFile, " " );
131  fprintf( pFile, "%.16d", Size );
132  fprintf( pFile, " " );
133 #if !defined(LIN) && !defined(LIN64)
134  {
135  int RetValue;
136  RetValue = fwrite( pBuffer, Size, 1, pFile );
137  assert( RetValue == 1 || Size == 0);
138  fflush( pFile );
139  }
140 #else
141  fflush(pFile);
142  int fd = fileno(pFile);
143 
144  ssize_t bytes_written = 0;
145  while (bytes_written < Size){
146  ssize_t n = write(fd, &pBuffer[bytes_written], Size - bytes_written);
147  if (n < 0){
148  fprintf(stderr, "BridgeMode: failed to send package; aborting\n"); fflush(stderr);
149  _exit(255);
150  }
151  bytes_written += n;
152  }
153 #endif
154 }
155 
156 
157 /**Function*************************************************************
158 
159  Synopsis []
160 
161  Description []
162 
163  SideEffects []
164 
165  SeeAlso []
166 
167 ***********************************************************************/
168 int Gia_ManToBridgeText( FILE * pFile, int Size, unsigned char * pBuffer )
169 {
170  Gia_CreateHeader( pFile, BRIDGE_TEXT_MESSAGE, Size, pBuffer );
171  return 1;
172 }
173 
174 
175 int Gia_ManToBridgeAbort( FILE * pFile, int Size, unsigned char * pBuffer )
176 {
177  Gia_CreateHeader( pFile, BRIDGE_ABORT, Size, pBuffer );
178  return 1;
179 }
180 
181 
182 int Gia_ManToBridgeProgress( FILE * pFile, int Size, unsigned char * pBuffer )
183 {
184  Gia_CreateHeader( pFile, BRIDGE_PROGRESS, Size, pBuffer );
185  return 1;
186 }
187 
188 
189 int Gia_ManToBridgeAbsNetlist( FILE * pFile, void * p, int pkg_type )
190 {
191  Vec_Str_t * vBuffer;
192  vBuffer = Gia_ManToBridgeVec( (Gia_Man_t *)p );
193  Gia_CreateHeader( pFile, pkg_type, Vec_StrSize(vBuffer), (unsigned char *)Vec_StrArray(vBuffer) );
194  Vec_StrFree( vBuffer );
195  return 1;
196 }
197 
198 
199 int Gia_ManToBridgeBadAbs( FILE * pFile )
200 {
201  Gia_CreateHeader( pFile, BRIDGE_BAD_ABS, 0, NULL );
202  return 1;
203 }
204 
205 
206 static int aigerNumSize( unsigned x )
207 {
208  int sz = 1;
209  while (x & ~0x7f)
210  {
211  sz++;
212  x >>= 7;
213  }
214  return sz;
215 }
216 
217 
218 /**Function*************************************************************
219 
220  Synopsis []
221 
222  Description []
223 
224  SideEffects []
225 
226  SeeAlso []
227 
228 ***********************************************************************/
229 void Gia_ManFromBridgeHolds( FILE * pFile, int iPoProved )
230 {
231  fprintf( pFile, "%.6d", 101 /*message type = Result*/);
232  fprintf( pFile, " " );
233  fprintf( pFile, "%.16d", 3 + aigerNumSize(iPoProved) /*size in bytes*/);
234  fprintf( pFile, " " );
235 
236  fputc( (char)BRIDGE_VALUE_1, pFile ); // true
237  fputc( (char)1, pFile ); // size of vector (Armin's encoding)
238  Gia_AigerWriteUnsignedFile( pFile, iPoProved ); // number of the property (Armin's encoding)
239  fputc( (char)0, pFile ); // no invariant
240  fflush(pFile);
241 }
242 void Gia_ManFromBridgeUnknown( FILE * pFile, int iPoUnknown )
243 {
244  fprintf( pFile, "%.6d", 101 /*message type = Result*/);
245  fprintf( pFile, " " );
246  fprintf( pFile, "%.16d", 2 + aigerNumSize(iPoUnknown) /*size in bytes*/);
247  fprintf( pFile, " " );
248 
249  fputc( (char)BRIDGE_VALUE_X, pFile ); // undef
250  fputc( (char)1, pFile ); // size of vector (Armin's encoding)
251  Gia_AigerWriteUnsignedFile( pFile, iPoUnknown ); // number of the property (Armin's encoding)
252  fflush(pFile);
253 }
254 void Gia_ManFromBridgeCex( FILE * pFile, Abc_Cex_t * pCex )
255 {
256  int i, f, iBit;//, RetValue;
257  Vec_Str_t * vStr = Vec_StrAlloc( 1000 );
258  Vec_StrPush( vStr, (char)BRIDGE_VALUE_0 ); // false
259  Vec_StrPush( vStr, (char)1 ); // size of vector (Armin's encoding)
260  Gia_AigerWriteUnsigned( vStr, pCex->iPo ); // number of the property (Armin's encoding)
261  Vec_StrPush( vStr, (char)1 ); // size of vector (Armin's encoding)
262  Gia_AigerWriteUnsigned( vStr, pCex->iFrame ); // depth
263 
264  Gia_AigerWriteUnsigned( vStr, 1 ); // concrete
265  Gia_AigerWriteUnsigned( vStr, pCex->iFrame + 1 ); // number of frames (1 more than depth)
266  iBit = pCex->nRegs;
267  for ( f = 0; f <= pCex->iFrame; f++ )
268  {
269  Gia_AigerWriteUnsigned( vStr, pCex->nPis ); // num of inputs
270  for ( i = 0; i < pCex->nPis; i++, iBit++ )
271  Vec_StrPush( vStr, (char)(Abc_InfoHasBit(pCex->pData, iBit) ? BRIDGE_VALUE_1:BRIDGE_VALUE_0) ); // value
272  }
273  assert( iBit == pCex->nBits );
274  Vec_StrPush( vStr, (char)1 ); // the number of frames (for a concrete counter-example)
275  Gia_AigerWriteUnsigned( vStr, pCex->nRegs ); // num of flops
276  for ( i = 0; i < pCex->nRegs; i++ )
277  Vec_StrPush( vStr, (char)BRIDGE_VALUE_0 ); // always zero!!!
278 // RetValue = fwrite( Vec_StrArray(vStr), Vec_StrSize(vStr), 1, pFile );
279  Gia_CreateHeader(pFile, 101/*type=Result*/, Vec_StrSize(vStr), (unsigned char*)Vec_StrArray(vStr));
280 
281  Vec_StrFree( vStr );
282  fflush(pFile);
283 }
284 int Gia_ManToBridgeResult( FILE * pFile, int Result, Abc_Cex_t * pCex, int iPoProved )
285 {
286  if ( Result == 0 ) // sat
287  Gia_ManFromBridgeCex( pFile, pCex );
288  else if ( Result == 1 ) // unsat
289  Gia_ManFromBridgeHolds( pFile, iPoProved );
290  else if ( Result == -1 ) // undef
291  Gia_ManFromBridgeUnknown( pFile, iPoProved );
292  else assert( 0 );
293  return 1;
294 }
295 
296 
297 /**Function*************************************************************
298 
299  Synopsis []
300 
301  Description []
302 
303  SideEffects []
304 
305  SeeAlso []
306 
307 ***********************************************************************/
308 Gia_Man_t * Gia_ManFromBridgeReadBody( int Size, unsigned char * pBuffer, Vec_Int_t ** pvInits )
309 {
310  int fHash = 0;
311  Vec_Int_t * vLits, * vInits;
312  Gia_Man_t * p = NULL;
313  unsigned char * pBufferPivot, * pBufferEnd = pBuffer + Size;
314  int i, nInputs, nFlops, nGates, nProps;
315  unsigned iFan0, iFan1;
316 
317  nInputs = Gia_AigerReadUnsigned( &pBuffer );
318  nFlops = Gia_AigerReadUnsigned( &pBuffer );
319  nGates = Gia_AigerReadUnsigned( &pBuffer );
320 
321  vLits = Vec_IntAlloc( 1000 );
322  Vec_IntPush( vLits, -999 );
323  Vec_IntPush( vLits, 1 );
324 
325  // start the AIG package
326  p = Gia_ManStart( nInputs + nFlops * 2 + nGates + 1 + 1 ); // PI+FO+FI+AND+PO+1
327  p->pName = Abc_UtilStrsav( "temp" );
328 
329  // create PIs
330  for ( i = 0; i < nInputs; i++ )
331  Vec_IntPush( vLits, Gia_ManAppendCi( p ) );
332 
333  // create flop outputs
334  for ( i = 0; i < nFlops; i++ )
335  Vec_IntPush( vLits, Gia_ManAppendCi( p ) );
336 
337  // create nodes
338  if ( fHash )
339  Gia_ManHashAlloc( p );
340  for ( i = 0; i < nGates; i++ )
341  {
342  iFan0 = Gia_AigerReadUnsigned( &pBuffer );
343  iFan1 = Gia_AigerReadUnsigned( &pBuffer );
344  assert( !(iFan0 & 1) );
345  iFan0 >>= 1;
346  iFan0 = Abc_LitNotCond( Vec_IntEntry(vLits, iFan0 >> 1), iFan0 & 1 );
347  iFan1 = Abc_LitNotCond( Vec_IntEntry(vLits, iFan1 >> 1), iFan1 & 1 );
348  if ( fHash )
349  Vec_IntPush( vLits, Gia_ManHashAnd(p, iFan0, iFan1) );
350  else
351  Vec_IntPush( vLits, Gia_ManAppendAnd(p, iFan0, iFan1) );
352 
353  }
354  if ( fHash )
355  Gia_ManHashStop( p );
356 
357  // remember where flops begin
358  pBufferPivot = pBuffer;
359  // scroll through flops
360  for ( i = 0; i < nFlops; i++ )
361  Gia_AigerReadUnsigned( &pBuffer );
362 
363  // create POs
364  nProps = Gia_AigerReadUnsigned( &pBuffer );
365 // assert( nProps == 1 );
366  for ( i = 0; i < nProps; i++ )
367  {
368  iFan0 = Gia_AigerReadUnsigned( &pBuffer );
369  iFan0 = Abc_LitNotCond( Vec_IntEntry(vLits, iFan0 >> 1), iFan0 & 1 );
370  // complement property output!!!
371  Gia_ManAppendCo( p, Abc_LitNot(iFan0) );
372  }
373  // make sure the end of buffer is reached
374  assert( pBufferEnd == pBuffer );
375 
376  // resetting to flops
377  pBuffer = pBufferPivot;
378  vInits = Vec_IntAlloc( nFlops );
379  for ( i = 0; i < nFlops; i++ )
380  {
381  iFan0 = Gia_AigerReadUnsigned( &pBuffer );
382  assert( (iFan0 & 3) == BRIDGE_VALUE_0 );
383  Vec_IntPush( vInits, iFan0 & 3 ); // 0 = X value; 1 = not used; 2 = false; 3 = true
384  iFan0 >>= 2;
385  iFan0 = Abc_LitNotCond( Vec_IntEntry(vLits, iFan0 >> 1), iFan0 & 1 );
386  Gia_ManAppendCo( p, iFan0 );
387  }
388  Gia_ManSetRegNum( p, nFlops );
389  Vec_IntFree( vLits );
390 
391  // remove wholes in the node list
392  if ( fHash )
393  {
394  Gia_Man_t * pTemp;
395  p = Gia_ManCleanup( pTemp = p );
396  Gia_ManStop( pTemp );
397  }
398 
399  // return
400  if ( pvInits )
401  *pvInits = vInits;
402  else
403  Vec_IntFree( vInits );
404  return p;
405 }
406 
407 
408 /**Function*************************************************************
409 
410  Synopsis []
411 
412  Description []
413 
414  SideEffects []
415 
416  SeeAlso []
417 
418 ***********************************************************************/
419 int Gia_ManFromBridgeReadPackage( FILE * pFile, int * pType, int * pSize, unsigned char ** ppBuffer )
420 {
421  char Temp[24];
422  int RetValue;
423  RetValue = fread( Temp, 24, 1, pFile );
424  if ( RetValue != 1 )
425  {
426  printf( "Gia_ManFromBridgeReadPackage(); Error 1: Something is wrong!\n" );
427  return 0;
428  }
429  Temp[6] = 0;
430  Temp[23]= 0;
431 
432  *pType = atoi( Temp );
433  *pSize = atoi( Temp + 7 );
434 
435  *ppBuffer = ABC_ALLOC( unsigned char, *pSize );
436  RetValue = fread( *ppBuffer, *pSize, 1, pFile );
437  if ( RetValue != 1 && *pSize != 0 )
438  {
439  ABC_FREE( *ppBuffer );
440  printf( "Gia_ManFromBridgeReadPackage(); Error 2: Something is wrong!\n" );
441  return 0;
442  }
443  return 1;
444 }
445 
446 /**Function*************************************************************
447 
448  Synopsis []
449 
450  Description []
451 
452  SideEffects []
453 
454  SeeAlso []
455 
456 ***********************************************************************/
457 Gia_Man_t * Gia_ManFromBridge( FILE * pFile, Vec_Int_t ** pvInit )
458 {
459  unsigned char * pBuffer;
460  int Type, Size, RetValue;
461  Gia_Man_t * p = NULL;
462 
463  RetValue = Gia_ManFromBridgeReadPackage( pFile, &Type, &Size, &pBuffer );
464  ABC_FREE( pBuffer );
465  if ( !RetValue )
466  return NULL;
467 
468  RetValue = Gia_ManFromBridgeReadPackage( pFile, &Type, &Size, &pBuffer );
469  if ( !RetValue )
470  return NULL;
471 
472  p = Gia_ManFromBridgeReadBody( Size, pBuffer, pvInit );
473  ABC_FREE( pBuffer );
474  if ( p == NULL )
475  return NULL;
476 
477  RetValue = Gia_ManFromBridgeReadPackage( pFile, &Type, &Size, &pBuffer );
478  ABC_FREE( pBuffer );
479  if ( !RetValue )
480  return NULL;
481 
482  return p;
483 }
484 
485 /*
486  {
487  extern void Gia_ManFromBridgeTest( char * pFileName );
488  Gia_ManFromBridgeTest( "C:\\_projects\\abc\\_TEST\\bug\\65\\par.dump" );
489  }
490 */
491 
492 /**Function*************************************************************
493 
494  Synopsis []
495 
496  Description []
497 
498  SideEffects []
499 
500  SeeAlso []
501 
502 ***********************************************************************/
503 void Gia_ManToBridgeAbsNetlistTest( char * pFileName, Gia_Man_t * p, int msg_type )
504 {
505  FILE * pFile = fopen( pFileName, "wb" );
506  if ( pFile == NULL )
507  {
508  printf( "Cannot open output file \"%s\".\n", pFileName );
509  return;
510  }
511  Gia_ManToBridgeAbsNetlist( pFile, p, msg_type );
512  fclose ( pFile );
513 }
514 
515 /**Function*************************************************************
516 
517  Synopsis []
518 
519  Description []
520 
521  SideEffects []
522 
523  SeeAlso []
524 
525 ***********************************************************************/
526 void Gia_ManFromBridgeTest( char * pFileName )
527 {
528  Gia_Man_t * p;
529  FILE * pFile = fopen( pFileName, "rb" );
530  if ( pFile == NULL )
531  {
532  printf( "Cannot open input file \"%s\".\n", pFileName );
533  return;
534  }
535 
536  p = Gia_ManFromBridge( pFile, NULL );
537  fclose ( pFile );
538 
539  Gia_ManPrintStats( p, NULL );
540  Gia_AigerWrite( p, "temp.aig", 0, 0 );
541 
543  Gia_ManStop( p );
544 }
545 
546 
547 
548 ////////////////////////////////////////////////////////////////////////
549 /// END OF FILE ///
550 ////////////////////////////////////////////////////////////////////////
551 
552 
static int Gia_ManAppendAnd(Gia_Man_t *p, int iLit0, int iLit1)
Definition: gia.h:592
static int aigerNumSize(unsigned x)
Definition: utilBridge.c:206
int Gia_ManToBridgeResult(FILE *pFile, int Result, Abc_Cex_t *pCex, int iPoProved)
DECLARATIONS ///.
Definition: utilBridge.c:284
#define BRIDGE_VALUE_1
Definition: utilBridge.c:48
void Gia_ManStop(Gia_Man_t *p)
Definition: giaMan.c:77
void Gia_CreateHeader(FILE *pFile, int Type, int Size, unsigned char *pBuffer)
Definition: utilBridge.c:127
void Gia_ManPrintStats(Gia_Man_t *p, Gps_Par_t *pPars)
Definition: giaMan.c:389
static int Gia_ManPoNum(Gia_Man_t *p)
Definition: gia.h:386
static int Gia_ManAppendCo(Gia_Man_t *p, int iLit0)
Definition: gia.h:703
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static char * Vec_StrArray(Vec_Str_t *p)
Definition: vecStr.h:272
static int Abc_InfoHasBit(unsigned *p, int i)
Definition: abc_global.h:258
#define BRIDGE_BAD_ABS
Definition: utilBridge.c:42
static int Gia_ManAppendCi(Gia_Man_t *p)
Definition: gia.h:583
Gia_Man_t * Gia_ManFromBridgeReadBody(int Size, unsigned char *pBuffer, Vec_Int_t **pvInits)
Definition: utilBridge.c:308
static int Abc_Var2Lit(int Var, int fCompl)
Definition: abc_global.h:263
void Gia_ManFromBridgeUnknown(FILE *pFile, int iPoUnknown)
Definition: utilBridge.c:242
int Gia_ManToBridgeBadAbs(FILE *pFile)
Definition: utilBridge.c:199
#define ABC_ALLOC(type, num)
Definition: abc_global.h:229
void Gia_ManSetRegNum(Gia_Man_t *p, int nRegs)
Definition: giaMan.c:628
static Vec_Str_t * Vec_StrAlloc(int nCap)
Definition: bblif.c:495
static void Gia_AigerWriteUnsigned(Vec_Str_t *vStr, unsigned x)
Definition: gia.h:848
static void Vec_StrPush(Vec_Str_t *p, char Entry)
Definition: vecStr.h:535
void Gia_ManToBridgeAbsNetlistTest(char *pFileName, Gia_Man_t *p, int msg_type)
Definition: utilBridge.c:503
static int Abc_LitNotCond(int Lit, int c)
Definition: abc_global.h:267
Definition: gia.h:75
#define BRIDGE_TEXT_MESSAGE
DECLARATIONS ///.
Definition: utilBridge.c:37
#define Gia_ManForEachCi(p, pObj, i)
Definition: gia.h:1016
static int Gia_ManAndNum(Gia_Man_t *p)
Definition: gia.h:389
#define BRIDGE_PROGRESS
Definition: utilBridge.c:40
char * pName
Definition: gia.h:97
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
int Gia_ManFromBridgeReadPackage(FILE *pFile, int *pType, int *pSize, unsigned char **ppBuffer)
Definition: utilBridge.c:419
static int Gia_ObjFanin1Copy(Gia_Obj_t *pObj)
Definition: gia.h:482
static void Vec_StrFree(Vec_Str_t *p)
Definition: bblif.c:616
static int Vec_IntEntry(Vec_Int_t *p, int i)
Definition: bblif.c:268
#define ABC_NAMESPACE_IMPL_END
Definition: abc_global.h:108
Gia_Man_t * Gia_ManStart(int nObjsMax)
DECLARATIONS ///.
Definition: giaMan.c:52
#define Gia_ManForEachAnd(p, pObj, i)
Definition: gia.h:1002
static void Vec_IntPush(Vec_Int_t *p, int Entry)
Definition: bblif.c:468
#define BRIDGE_VALUE_0
Definition: utilBridge.c:47
void Gia_AigerWrite(Gia_Man_t *p, char *pFileName, int fWriteSymbols, int fCompact)
Definition: giaAiger.c:1024
static int Gia_ObjFanin0Copy(Gia_Obj_t *pObj)
Definition: gia.h:481
#define BRIDGE_VALUE_X
Definition: utilBridge.c:46
#define BRIDGE_ABORT
Definition: utilBridge.c:39
#define ABC_NAMESPACE_IMPL_START
Definition: abc_global.h:107
static int Vec_StrSize(Vec_Str_t *p)
Definition: bblif.c:600
Vec_Str_t * Gia_ManToBridgeVec(Gia_Man_t *p)
FUNCTION DEFINITIONS ///.
Definition: utilBridge.c:66
static int Abc_LitNot(int Lit)
Definition: abc_global.h:266
int Gia_ManToBridgeAbsNetlist(FILE *pFile, void *p, int pkg_type)
Definition: utilBridge.c:189
void Gia_ManFromBridgeTest(char *pFileName)
Definition: utilBridge.c:526
int Gia_ManToBridgeProgress(FILE *pFile, int Size, unsigned char *pBuffer)
Definition: utilBridge.c:182
int Gia_ManToBridgeAbort(FILE *pFile, int Size, unsigned char *pBuffer)
Definition: utilBridge.c:175
#define ABC_FREE(obj)
Definition: abc_global.h:232
Definition: gia.h:95
static Gia_Obj_t * Gia_ManConst0(Gia_Man_t *p)
Definition: gia.h:400
Gia_Man_t * Gia_ManFromBridge(FILE *pFile, Vec_Int_t **pvInit)
Definition: utilBridge.c:457
static void Gia_AigerWriteUnsignedFile(FILE *pFile, unsigned x)
Definition: gia.h:860
#define assert(ex)
Definition: util_old.h:213
unsigned Value
Definition: gia.h:87
#define BRIDGE_ABS_NETLIST
Definition: abc_global.h:295
void Gia_ManFromBridgeHolds(FILE *pFile, int iPoProved)
Definition: utilBridge.c:229
static unsigned Gia_AigerReadUnsigned(unsigned char **ppPos)
Definition: gia.h:840
typedefABC_NAMESPACE_HEADER_START struct Abc_Cex_t_ Abc_Cex_t
INCLUDES ///.
Definition: utilCex.h:39
#define Gia_ManForEachRi(p, pObj, i)
Definition: gia.h:1040
void Gia_ManHashAlloc(Gia_Man_t *p)
Definition: giaHash.c:99
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
static int Gia_ManPiNum(Gia_Man_t *p)
Definition: gia.h:385
Gia_Man_t * Gia_ManCleanup(Gia_Man_t *p)
Definition: giaScl.c:84
char * Abc_UtilStrsav(char *s)
Definition: starter.c:47
#define Gia_ManForEachPo(p, pObj, i)
Definition: gia.h:1036
int Gia_ManHashAnd(Gia_Man_t *p, int iLit0, int iLit1)
Definition: giaHash.c:572
void Gia_ManFromBridgeCex(FILE *pFile, Abc_Cex_t *pCex)
Definition: utilBridge.c:254
int Gia_ManToBridgeText(FILE *pFile, int Size, unsigned char *pBuffer)
Definition: utilBridge.c:168
void Gia_ManHashStop(Gia_Man_t *p)
Definition: giaHash.c:142
static int Gia_ManRegNum(Gia_Man_t *p)
Definition: gia.h:387