3#ifndef Glucose_CGlucoseCore_h
4#define Glucose_CGlucoseCore_h
87 jheap .clear_( fCleanMemory );
101 while( !
jheap.empty() ){
102 next =
jheap.removeMin(index);
171 int i, nJustFail = 0;
172 for(i=0; i<
trail.size(); i++){
179 printf(
"\t%8d is not justified (value=%d, level=%3d)\n", x,
l_True ==
value(x)? 1: 0,
vardata[x].
level), nJustFail ++ ;
185 printf(
"%d just-fails\n", nJustFail);
246 int mincap =
var(lit1) <
var(lit2)?
var(lit2):
var(lit1);
247 mincap = (v < mincap? mincap: v) + 1;
358 lbool val0, val1, valo;
359 val0 =
value(faninLit );
360 val1 =
value(faninLitP);
372 if(
l_False == (valo ^ (val0 == val1)) )
407 lbool val0, val1, valo;
419 if(
l_False == (valo ^ (val0 == val1)) )
470 ca[
itpc].header.size = sz;
477 lbool val0, val1, valo;
506 assert( t == var0 || t == var1 );
514 c[1].x ^= c[0].x, c[0].x ^= c[1].x, c[1].x ^= c[0].x;
569 if(
toLit(~0) == prev )
return;
577 while(
toLit(~0) != w ){
597 jheap .prelocate( base_var_num );
598 jlevel .prelocate( base_var_num );
599 jnext .prelocate( base_var_num );
601 watches .prelocate( base_var_num << 1 );
604 decision .prelocate( base_var_num );
605 trail .prelocate( base_var_num );
606 assigns .prelocate( base_var_num );
607 vardata .prelocate( base_var_num );
608 activity .prelocate( base_var_num );
611 seen .prelocate( base_var_num );
612 permDiff .prelocate( base_var_num );
613 polarity .prelocate( base_var_num );
652 for(i = 0; i <
vMarked.size(); i ++){
691 for(i = 0; i <
vMarked.size(); i ++)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
ABC_NAMESPACE_IMPL_START typedef signed char value
CRef interpret(Var v, Var t)
OccLists< Lit, vec< Watcher >, WatcherDeleted > watchesBin
Lit pickJustLit(int &index)
CRef gatePropagateCheckFanout(Var v, Lit lfo)
bool isGateCRef(CRef cr) const
static VarData mkVarData(CRef cr, int l)
vec< unsigned int > permDiff
void addJwatch(Var host, Var member, int index)
void markApprox(Var v0, Var v1, int nlim)
Var getFaninVar1(Var v) const
vec< unsigned > var2TravId
Lit maxActiveLit(Lit lit0, Lit lit1) const
OccLists< Lit, vec< Watcher >, WatcherDeleted > watches
CRef gatePropagateCheckThis(Var v)
void ResetJustData(bool fCleanMemory)
CRef getConfClause(CRef r)
void prelocate(int var_num)
int decisionLevel() const
void markTill(Var v0, int nlim)
Var CRef2Var(CRef cr) const
Heap2< JustOrderLt2, JustKey > jheap
Var getFaninVar0(Var v) const
CRef Var2CRef(Var v) const
bool isJReason(Var v) const
Lit getFaninPlt0(Var v) const
CRef gatePropagate(Lit p)
void pushJustQueue(Var v, int index)
void uncheckedEnqueue2(Lit p, CRef from=CRef_Undef)
void setVarFaninLits(Var v, Lit lit1, Lit lit2)
Lit getFaninLit1(Var v) const
bool isTwoFanin(Var v) const
bool isRoundWatch(Var v) const
bool getFaninC1(Var v) const
Lit gateJustFanin(Var v) const
Lit getFaninPlt1(Var v) const
vec< NodeData > var2NodeData
void updateJustActivity(Var v)
bool getFaninC0(Var v) const
void gateAddJwatch(Var v, int index)
Lit getFaninLit0(Var v) const
Lit mkLit(Var var, bool sign=false)
void sort(T *array, int size, LessThan lt)
RegionAllocator< uint32_t >::Ref CRef