21 #ifndef ABC__sat__bsat__satMem_h
22 #define ABC__sat__bsat__satMem_h
37 #define LEARNT_MAX_START_DEFAULT 10000
38 #define LEARNT_MAX_INCRE_DEFAULT 1000
39 #define LEARNT_MAX_RATIO_DEFAULT 50
117 #define Sat_MemForEachClause( p, c, i, k ) \
118 for ( i = 0; i <= p->iPage[0]; i += 2 ) \
119 for ( k = 2; k < Sat_MemLimit(p->pPages[i]) && ((c) = Sat_MemClause( p, i, k )); k += Sat_MemClauseSize(c) ) if ( i == 0 && k == 2 ) {} else
122 #define Sat_MemForEachClause2( p, c, i, k ) \
123 for ( i = 0; i <= p->iPage[0]; i += 2 ) \
124 for ( k = 2; k < Sat_MemLimit(p->pPages[i]) && ((c) = Sat_MemClause( p, i, k )); k += Sat_MemClauseSize2(c) ) if ( i == 0 && k == 2 ) {} else
126 #define Sat_MemForEachLearned( p, c, i, k ) \
127 for ( i = 1; i <= p->iPage[1]; i += 2 ) \
128 for ( k = 2; k < Sat_MemLimit(p->pPages[i]) && ((c) = Sat_MemClause( p, i, k )); k += Sat_MemClauseSize(c) )
195 assert( nPageSize > 8 && nPageSize < 32 );
199 p->
uPageMask = (unsigned)((1 << nPageSize) - 1);
327 memcpy( c->
lits, pArray,
sizeof(
int) * nSize );
368 clause * c, * cPivot = NULL;
369 int i, k, iNew = 1, kNew = 2, nInts, fStartLooking,
Counter = 0;
395 if ( cPivot && cPivot == c )
412 if ( kNew + nInts >= (1 << p->
nPageSize) )
426 if ( i != iNew || k != kNew )
static int Sat_MemCountL(Sat_Mem_t *p)
FUNCTION DECLARATIONS ///.
static double Sat_MemMemoryAll(Sat_Mem_t *p)
static lit * clause_end(clause *c)
#define ABC_REALLOC(type, obj, num)
static cla Sat_MemHandCurrent(Sat_Mem_t *p, int lrn)
static void Sat_MemRestart(Sat_Mem_t *p)
static int Sat_MemHandShift(Sat_Mem_t *p, cla h)
#define ABC_ALLOC(type, num)
static void Sat_MemShrink(Sat_Mem_t *p, int h, int lrn)
static void clause_set_id(clause *c, int id)
static void Sat_MemFree_(Sat_Mem_t *p)
static int clause_id(clause *c)
static clause * Sat_MemClause(Sat_Mem_t *p, int i, int k)
#define Sat_MemForEachLearned(p, c, i, k)
static void clause_print(clause *c)
static int clause_size(clause *c)
static int clause_learnt_h(Sat_Mem_t *p, cla h)
static int Sat_MemHandPage(Sat_Mem_t *p, cla h)
static int Sat_MemIntSize(int size, int lrn)
static double Sat_MemMemoryAllUsed(Sat_Mem_t *p)
static int clause_learnt(clause *c)
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
static int Sat_MemLimit(int *p)
static Sat_Mem_t * Sat_MemAlloc(int nPageSize)
#define ABC_NAMESPACE_HEADER_END
static void Sat_MemFree(Sat_Mem_t *p)
static double Sat_MemMemoryUsed(Sat_Mem_t *p, int lrn)
static int clause_is_lit(cla h)
static clause * Sat_MemClauseHand(Sat_Mem_t *p, cla h)
static lit * clause_begin(clause *c)
static void Sat_MemRollBack(Sat_Mem_t *p)
static lit clause_read_lit(cla h)
#define ABC_CALLOC(type, num)
static int clause_from_lit(lit l)
GLOBAL VARIABLES ///.
static void Sat_MemAlloc_(Sat_Mem_t *p, int nPageSize)
static int Sat_MemIncLimit(int *p, int nInts)
static int Sat_MemEntryNum(Sat_Mem_t *p, int lrn)
static int Sat_MemClauseSize(clause *p)
static int Sat_MemAppend(Sat_Mem_t *p, int *pArray, int nSize, int lrn, int fPlus1)
static int Sat_MemClauseSize2(clause *p)
static int Sat_MemClauseUsed(Sat_Mem_t *p, cla h)
static int Sat_MemCompactLearned(Sat_Mem_t *p, int fDoMove)
static void Sat_MemWriteLimit(int *p, int nInts)
static void Sat_MemBookMark(Sat_Mem_t *p)
static cla Sat_MemHand(Sat_Mem_t *p, int i, int k)
static double Sat_MemMemoryHand(Sat_Mem_t *p, cla h)