51 if ( Abc_NtkIsStrash(pNtk) )
52 printf(
"Io_WriteCnf() warning: Generating CNF by applying heuristic AIG to CNF conversion.\n" );
54 printf(
"Io_WriteCnf() warning: Generating CNF by convering logic nodes into CNF clauses.\n" );
55 if ( Abc_NtkPoNum(pNtk) != 1 )
57 fprintf( stdout,
"Io_WriteCnf(): Currently can only process the miter (the network with one PO).\n" );
60 if ( Abc_NtkLatchNum(pNtk) != 0 )
62 fprintf( stdout,
"Io_WriteCnf(): Currently can only process the miter for combinational circuits.\n" );
65 if ( Abc_NtkNodeNum(pNtk) == 0 )
67 fprintf( stdout,
"The network has no logic nodes. No CNF file is generaled.\n" );
71 if ( Abc_NtkIsLogic(pNtk) )
77 fprintf( stdout,
"The problem is trivially UNSAT. No CNF file is generated.\n" );
108 fprintf( pFile,
"c PI variable numbers: <PI_name> <SAT_var_number>\n" );
110 fprintf( pFile,
"c %s %d\n",
Abc_ObjName(pObj), Vec_IntEntry(vCiIds, i) + (
int)(incrementVars > 0) );
111 Vec_IntFree( vCiIds );
Vec_Int_t * Abc_NtkGetCiSatVarNums(Abc_Ntk_t *pNtk)
struct Abc_Obj_t_ Abc_Obj_t
ABC_DLL void * Abc_NtkMiterSatCreate(Abc_Ntk_t *pNtk, int fAllPrimes)
ABC_DLL int Abc_NtkToBdd(Abc_Ntk_t *pNtk)
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
struct Abc_Ntk_t_ Abc_Ntk_t
#define Abc_NtkForEachCi(pNtk, pCi, i)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
void Io_WriteCnfOutputPiMapping(FILE *pFile, int incrementVars)
int Io_WriteCnf(Abc_Ntk_t *pNtk, char *pFileName, int fAllPrimes)
FUNCTION DEFINITIONS ///.
void sat_solver_delete(sat_solver *s)
void Sat_SolverWriteDimacs(sat_solver *p, char *pFileName, lit *assumptionsBegin, lit *assumptionsEnd, int incrementVars)