48 static char buffer[1024];
51 for (t = buffer; *t != 0; ++t) *t = (*t ==
'|') ?
'_' : *t;
55 static int hasPrefix(
const char *needle,
const char *haystack)
78 fprintf( stdout,
"Io_WriteSmv(): Signal names in this benchmark contain parantheses making them impossible to reproduce in the SMV format. Use \"short_names\".\n" );
81 pFile = fopen( pFileName,
"w" );
84 fprintf( stdout,
"Io_WriteSmv(): Cannot open the output file.\n" );
93 printf(
"Io_WriteSmv: EXDC is not written (warning).\n" );
117 fprintf( pFile,
"MODULE main\n");
118 fprintf ( pFile,
"\n" );
120 fprintf( pFile,
"VAR -- inputs\n");
122 fprintf( pFile,
" %s : boolean;\n",
124 fprintf ( pFile,
"\n" );
126 fprintf( pFile,
"VAR -- state variables\n");
128 fprintf( pFile,
" %s : boolean;\n",
130 fprintf ( pFile,
"\n" );
139 fprintf( pFile,
"DEFINE\n");
147 fprintf ( pFile,
"\n" );
149 fprintf( pFile,
"ASSIGN\n");
152 int Reset = (int)(ABC_PTRUINT_T)
Abc_ObjData( pNode );
158 fprintf( pFile,
" init(%s) := %d;\n",
162 fprintf( pFile,
" next(%s) := ",
164 fprintf( pFile,
"%s;\n",
168 fprintf ( pFile,
"\n" );
175 fprintf( pFile,
"FAIRNESS %s;\n", n );
180 fprintf( pFile,
"INVARSPEC %s;\n", n );
184 fprintf( pFile,
"LTLSPEC G F %s;\n", n );
212 fprintf( pFile,
" := 1;\n" );
214 else if ( nFanins == 1 )
254 if ( *pName ==
'(' || *pName ==
')' )
static Abc_Obj_t * Abc_ObjFanin1(Abc_Obj_t *pObj)
static int Abc_NtkObjNumMax(Abc_Ntk_t *pNtk)
static Abc_Ntk_t * Abc_NtkExdc(Abc_Ntk_t *pNtk)
static int Io_WriteSmvOneNode(FILE *pFile, Abc_Obj_t *pNode)
static int Abc_ObjFaninNum(Abc_Obj_t *pObj)
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
static int Io_WriteSmvOne(FILE *pFile, Abc_Ntk_t *pNtk)
ABC_DLL int Abc_NodeIsBuf(Abc_Obj_t *pNode)
static int hasPrefix(const char *needle, const char *haystack)
static int Abc_ObjIsNode(Abc_Obj_t *pObj)
#define ABC_NAMESPACE_IMPL_END
char * Nm_ManFindNameById(Nm_Man_t *p, int ObjId)
#define Abc_NtkForEachLatch(pNtk, pObj, i)
#define Abc_NtkForEachNode(pNtk, pNode, i)
#define ABC_NAMESPACE_IMPL_START
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
static int Abc_NtkIsSopNetlist(Abc_Ntk_t *pNtk)
static ABC_NAMESPACE_IMPL_START int Io_WriteSmvCheckNames(Abc_Ntk_t *pNtk)
DECLARATIONS ///.
static char * cleanUNSAFE(const char *s)
FUNCTION DEFINITIONS ///.
int Io_WriteSmv(Abc_Ntk_t *pNtk, char *pFileName)
ABC_DLL int Abc_NodeIsConst1(Abc_Obj_t *pNode)
static void * Abc_ObjData(Abc_Obj_t *pObj)
#define Abc_NtkForEachPo(pNtk, pPo, i)
#define Abc_NtkForEachObj(pNtk, pObj, i)
ITERATORS ///.
static Abc_Obj_t * Abc_ObjFanout0(Abc_Obj_t *pObj)
#define Abc_NtkForEachPi(pNtk, pPi, i)