Commit aa9c87cf by Alan Mishchenko

Extending verification status file format to allow for SAT status without CEX.

parent 4bd54729
...@@ -156,11 +156,17 @@ int Abc_NtkReadLogFile( char * pFileName, Abc_Cex_t ** ppCex, int * pnFrames ) ...@@ -156,11 +156,17 @@ int Abc_NtkReadLogFile( char * pFileName, Abc_Cex_t ** ppCex, int * pnFrames )
nFrames = atoi( pToken ); nFrames = atoi( pToken );
pToken = strtok( NULL, " \t\n" ); pToken = strtok( NULL, " \t\n" );
pToken = strtok( NULL, " \t\n" ); pToken = strtok( NULL, " \t\n" );
if ( pToken != NULL )
{
iPo = atoi( pToken ); iPo = atoi( pToken );
pToken = strtok( NULL, " \t\n" ); pToken = strtok( NULL, " \t\n" );
if ( pToken ) if ( pToken )
nFrames2 = atoi( pToken ); nFrames2 = atoi( pToken );
} }
else
printf( "Warning! The current status is SAT but the current CEX is not given.\n" );
}
else if ( !strncmp( Buffer, "snl_UNK", strlen("snl_UNK") ) ) else if ( !strncmp( Buffer, "snl_UNK", strlen("snl_UNK") ) )
{ {
Status = -1; Status = -1;
...@@ -193,16 +199,19 @@ int Abc_NtkReadLogFile( char * pFileName, Abc_Cex_t ** ppCex, int * pnFrames ) ...@@ -193,16 +199,19 @@ int Abc_NtkReadLogFile( char * pFileName, Abc_Cex_t ** ppCex, int * pnFrames )
if ( nRegs < 0 ) if ( nRegs < 0 )
{ {
printf( "Cannot read register number.\n" ); printf( "Cannot read register number.\n" );
Vec_IntFree( vNums );
return -1; return -1;
} }
if ( Vec_IntSize(vNums)-nRegs == 0 ) if ( Vec_IntSize(vNums)-nRegs == 0 )
{ {
printf( "Cannot read counter example.\n" ); printf( "Cannot read counter example.\n" );
Vec_IntFree( vNums );
return -1; return -1;
} }
if ( (Vec_IntSize(vNums)-nRegs) % (iFrameCex + 1) != 0 ) if ( (Vec_IntSize(vNums)-nRegs) % (iFrameCex + 1) != 0 )
{ {
printf( "Incorrect number of bits.\n" ); printf( "Incorrect number of bits.\n" );
Vec_IntFree( vNums );
return -1; return -1;
} }
pCex = Abc_CexAlloc( nRegs, (Vec_IntSize(vNums)-nRegs)/(iFrameCex + 1), iFrameCex + 1 ); pCex = Abc_CexAlloc( nRegs, (Vec_IntSize(vNums)-nRegs)/(iFrameCex + 1), iFrameCex + 1 );
...@@ -218,6 +227,8 @@ int Abc_NtkReadLogFile( char * pFileName, Abc_Cex_t ** ppCex, int * pnFrames ) ...@@ -218,6 +227,8 @@ int Abc_NtkReadLogFile( char * pFileName, Abc_Cex_t ** ppCex, int * pnFrames )
else else
ABC_FREE( pCex ); ABC_FREE( pCex );
} }
else
Vec_IntFree( vNums );
if ( pnFrames ) if ( pnFrames )
*pnFrames = nFrames; *pnFrames = nFrames;
return Status; return Status;
......
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