Bug fix in &rex2gia.

This commit is contained in:
Alan Mishchenko 2015-09-23 13:23:33 -07:00
parent bfebc0751c
commit 643aef2ecd
1 changed files with 3 additions and 1 deletions

View File

@ -183,6 +183,7 @@ char * Gia_ManRexPreprocess( char * pStr )
char * pCopy = ABC_CALLOC( char, strlen(pStr) * 2 + 10 );
int i, k = 0;
pCopy[k++] = '(';
pCopy[k++] = '(';
for ( i = 0; pStr[i]; i++ )
{
if ( pStr[i] == '(' )
@ -193,6 +194,7 @@ char * Gia_ManRexPreprocess( char * pStr )
pCopy[k++] = pStr[i];
}
pCopy[k++] = ')';
pCopy[k++] = ')';
pCopy[k++] = '\0';
return pCopy;
}
@ -217,7 +219,7 @@ Gia_Man_t * Gia_ManRex2Gia( char * pStrInit, int fOrder, int fVerbose )
}
// start AIG
pNew = Gia_ManStart( 1000 );
pNew->pName = Abc_UtilStrsav( pStr );
pNew->pName = Abc_UtilStrsav( pStrInit );
for ( i = 0; i < Vec_IntSize(vAlphas) + nStates; i++ )
Gia_ManAppendCi( pNew );
// prepare automaton