157 S[pObj->
iData] = Truth6[i];
165 return S[pObj->
iData];
184 return iSatVar + iSatVar + fCompl;
202 int c, k, Cube, OutLit, RetValue;
239 printf(
"FastCnfGeneration: Internal error!!!\n" );
243 if ( Truth == 0 || Truth == ~(
word)0 )
246 Vec_IntPush( vClauses, (Truth == 0) ? (OutLit ^ 1) : OutLit );
257 for ( k = 0; k < Vec_PtrSize(vLeaves); k++, Cube >>= 2 )
259 if ( (Cube & 3) == 0 )
261 assert( (Cube & 3) != 3 );
274 for ( k = 0; k < Vec_PtrSize(vLeaves); k++, Cube >>= 2 )
276 if ( (Cube & 3) == 0 )
278 assert( (Cube & 3) != 3 );
301 Aig_Obj_t * pObj, * pTemp, * pObjC, * pObj0, * pObj1;
369 nFans = 1 + (pObj0 == pObj1);
409 printf(
"PO-driver rule is violated %d times.\n", Counter );
431 printf(
"AND-gate rule is violated %d times.\n", Counter );
454 int i, RetValue, nSize = 0;
461 printf(
"Unusual 1!\n" );
463 printf(
"Unusual 2!\n" );
501 int nVars = 0, nClauses = 0;
525 printf(
"Vars = %d Clauses = %d\n", nVars, nClauses );
548 Vec_Int_t * vLits, * vClas, * vMap, * vTemp;
552 int i, k, nVars, Entry, OutLit, DriLit;
static int Cnf_ObjGetLit(Vec_Int_t *vMap, Aig_Obj_t *pObj, int fCompl)
ABC_NAMESPACE_IMPL_START void Cnf_CollectLeaves_rec(Aig_Obj_t *pRoot, Aig_Obj_t *pObj, Vec_Ptr_t *vSuper, int fStopCompl)
DECLARATIONS ///.
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
static Aig_Obj_t * Aig_ObjChild0(Aig_Obj_t *pObj)
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
static int Vec_PtrPushUnique(Vec_Ptr_t *p, void *Entry)
static int Aig_ObjIsTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
void Cnf_CollectVolume(Aig_Man_t *p, Aig_Obj_t *pRoot, Vec_Ptr_t *vLeaves, Vec_Ptr_t *vNodes)
static Aig_Obj_t * Aig_ObjFanin0(Aig_Obj_t *pObj)
Cnf_Dat_t * Cnf_DeriveFastClauses(Aig_Man_t *p, int nOutputs)
void Aig_ManCleanMarkB(Aig_Man_t *p)
static int Aig_IsComplement(Aig_Obj_t *p)
#define Aig_ManForEachCi(p, pObj, i)
ITERATORS ///.
static Aig_Obj_t * Aig_Regular(Aig_Obj_t *p)
static void Vec_PtrPush(Vec_Ptr_t *p, void *Entry)
#define Aig_ManForEachCo(p, pObj, i)
#define ABC_ALLOC(type, num)
int Cnf_CutCountClauses(Aig_Man_t *p, Vec_Ptr_t *vLeaves, Vec_Ptr_t *vNodes, Vec_Int_t *vCover)
static abctime Abc_Clock()
static Aig_Obj_t * Aig_ObjFanin1(Aig_Obj_t *pObj)
static int Vec_PtrSize(Vec_Ptr_t *p)
static Vec_Int_t * Vec_IntStartFull(int nSize)
static void Aig_ObjSetTravIdCurrent(Aig_Man_t *p, Aig_Obj_t *pObj)
void Cnf_CollectVolume_rec(Aig_Man_t *p, Aig_Obj_t *pObj, Vec_Ptr_t *vNodes)
void Aig_ManIncrementTravId(Aig_Man_t *p)
DECLARATIONS ///.
static int Aig_ObjIsNode(Aig_Obj_t *pObj)
static void Vec_IntWriteEntry(Vec_Int_t *p, int i, int Entry)
static int Aig_ManCoNum(Aig_Man_t *p)
static Vec_Int_t * Vec_IntStart(int nSize)
#define Aig_ManForEachNode(p, pObj, i)
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Aig_Obj_t * Aig_ObjRecognizeMux(Aig_Obj_t *pObj, Aig_Obj_t **ppObjT, Aig_Obj_t **ppObjE)
static void * Vec_PtrEntryLast(Vec_Ptr_t *p)
int Kit_TruthIsop(unsigned *puTruth, int nVars, Vec_Int_t *vMemory, int fTryBoth)
FUNCTION DEFINITIONS ///.
void Cnf_CollectLeaves(Aig_Obj_t *pRoot, Vec_Ptr_t *vSuper, int fStopCompl)
void Cnf_ComputeClauses(Aig_Man_t *p, Aig_Obj_t *pRoot, Vec_Ptr_t *vLeaves, Vec_Ptr_t *vNodes, Vec_Int_t *vMap, Vec_Int_t *vCover, Vec_Int_t *vClauses)
int Cnf_CountCnfSize(Aig_Man_t *p)
static int Vec_IntEntry(Vec_Int_t *p, int i)
unsigned __int64 word
DECLARATIONS ///.
#define ABC_NAMESPACE_IMPL_END
static Aig_Obj_t * Aig_ObjChild1(Aig_Obj_t *pObj)
static void Vec_IntPush(Vec_Int_t *p, int Entry)
word Cnf_CutDeriveTruth(Aig_Man_t *p, Vec_Ptr_t *vLeaves, Vec_Ptr_t *vNodes)
static int Aig_ObjFaninC0(Aig_Obj_t *pObj)
static int Aig_ManObjNumMax(Aig_Man_t *p)
static Aig_Obj_t * Aig_ManConst1(Aig_Man_t *p)
#define ABC_NAMESPACE_IMPL_START
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
static int Aig_ManRegNum(Aig_Man_t *p)
static ABC_NAMESPACE_IMPL_START word Truth[8]
DECLARATIONS ///.
static int Vec_IntSize(Vec_Int_t *p)
#define Aig_ManForEachObj(p, pObj, i)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
#define ABC_CONST(number)
PARAMETERS ///.
void Aig_ManCleanMarkAB(Aig_Man_t *p)
int Aig_ObjIsMuxType(Aig_Obj_t *pObj)
void Aig_ManCleanMarkA(Aig_Man_t *p)
#define ABC_CALLOC(type, num)
static int Aig_ObjFaninC1(Aig_Obj_t *pObj)
static int Aig_ObjId(Aig_Obj_t *pObj)
static void Vec_PtrClear(Vec_Ptr_t *p)
#define Aig_ManForEachLiSeq(p, pObj, i)
#define Aig_ManForEachNodeReverse(p, pObj, i)
static int Aig_ObjRefs(Aig_Obj_t *pObj)
Cnf_Dat_t * Cnf_DeriveFast(Aig_Man_t *p, int nOutputs)
static void Vec_IntFree(Vec_Int_t *p)
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
static int Aig_ObjIsCi(Aig_Obj_t *pObj)
static void Vec_IntClear(Vec_Int_t *p)
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
void Cnf_DeriveFastMark(Aig_Man_t *p)
static void Vec_PtrFree(Vec_Ptr_t *p)