Commit 643aef2e by Alan Mishchenko

Bug fix in &rex2gia.

parent bfebc075
...@@ -183,6 +183,7 @@ char * Gia_ManRexPreprocess( char * pStr ) ...@@ -183,6 +183,7 @@ char * Gia_ManRexPreprocess( char * pStr )
char * pCopy = ABC_CALLOC( char, strlen(pStr) * 2 + 10 ); char * pCopy = ABC_CALLOC( char, strlen(pStr) * 2 + 10 );
int i, k = 0; int i, k = 0;
pCopy[k++] = '('; pCopy[k++] = '(';
pCopy[k++] = '(';
for ( i = 0; pStr[i]; i++ ) for ( i = 0; pStr[i]; i++ )
{ {
if ( pStr[i] == '(' ) if ( pStr[i] == '(' )
...@@ -193,6 +194,7 @@ char * Gia_ManRexPreprocess( char * pStr ) ...@@ -193,6 +194,7 @@ char * Gia_ManRexPreprocess( char * pStr )
pCopy[k++] = pStr[i]; pCopy[k++] = pStr[i];
} }
pCopy[k++] = ')'; pCopy[k++] = ')';
pCopy[k++] = ')';
pCopy[k++] = '\0'; pCopy[k++] = '\0';
return pCopy; return pCopy;
} }
...@@ -217,7 +219,7 @@ Gia_Man_t * Gia_ManRex2Gia( char * pStrInit, int fOrder, int fVerbose ) ...@@ -217,7 +219,7 @@ Gia_Man_t * Gia_ManRex2Gia( char * pStrInit, int fOrder, int fVerbose )
} }
// start AIG // start AIG
pNew = Gia_ManStart( 1000 ); pNew = Gia_ManStart( 1000 );
pNew->pName = Abc_UtilStrsav( pStr ); pNew->pName = Abc_UtilStrsav( pStrInit );
for ( i = 0; i < Vec_IntSize(vAlphas) + nStates; i++ ) for ( i = 0; i < Vec_IntSize(vAlphas) + nStates; i++ )
Gia_ManAppendCi( pNew ); Gia_ManAppendCi( pNew );
// prepare automaton // prepare automaton
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment