22 #ifndef Minisat_SolverTypes_h
23 #define Minisat_SolverTypes_h
43 #define var_Undef (-1)
84 #define l_True (lbool((uint8_t)0)) // gcc does not do constant propagation if these are real constants.
85 #define l_False (lbool((uint8_t)1))
86 #define l_Undef (lbool((uint8_t)2))
102 uint8_t sel = (this->
value << 1) | (b.
value << 3);
103 uint8_t v = (0xF7F755F4 >> sel) & 3;
107 uint8_t sel = (this->
value << 1) | (b.
value << 3);
108 uint8_t v = (0xFCFCF400 >> sel) & 3;
139 header.has_extra = use_extra;
143 for (
int i = 0; i < ps.size(); i++)
157 for (
int i = 0; i <
size(); i++)
197 return (
sizeof(
Clause) + (
sizeof(
Lit) * (size + (
int)has_extra))) /
sizeof(uint32_t); }
212 assert(
sizeof(
float) ==
sizeof(uint32_t));
216 new (
lea(cid))
Clause(ps, use_extra, learnt);
245 to[cr].mark(c.
mark());
246 if (to[cr].learnt()) to[cr].activity() = c.
activity();
247 else if (to[cr].has_extra()) to[cr].calcAbstraction();
255 template<
class Idx,
class Vec,
class Deleted>
272 void clean (
const Idx& idx);
288 template<
class Idx,
class Vec,
class Deleted>
291 for (
int i = 0; i < dirties.size(); i++)
293 if (dirty[
toInt(dirties[i])])
299 template<
class Idx,
class Vec,
class Deleted>
304 for (i = j = 0; i < vec.size(); i++)
305 if (!deleted(vec[i]))
308 dirty[
toInt(idx)] = 0;
377 const Lit* c = (
const Lit*)(*
this);
378 const Lit* d = (
const Lit*)other;
380 for (
unsigned i = 0; i <
header.size; i++) {
382 for (
unsigned j = 0; j < other.
header.
size; j++)
385 else if (ret ==
lit_Undef && c[i] == ~d[j]){
RegionAllocator< uint32_t >::Ref CRef
void insert(CRef cr, const T &t)
void insert(const K &k, const D &d)
const vec< Pair > & bucket(int i) const
const Clause & operator[](Ref r) const
lbool operator||(lbool b) const
OccLists(const Deleted &d)
void clean(const Idx &idx)
Clause(const V &ps, bool use_extra, bool learnt)
bool operator==(Lit p) const
void clear(bool free=true)
Map< CRef, T, CRefHash > HashTable
union Minisat::Clause::@62 data[0]
CRef alloc(const Lits &ps, bool learnt=false)
Lit mkLit(Var var, bool sign)
Vec & operator[](const Idx &idx)
friend lbool toLbool(int v)
uint32_t abstraction() const
Lit operator^(Lit p, bool b)
bool peek(const K &k, D &d) const
bool operator==(lbool b) const
void moveTo(RegionAllocator &to)
friend Lit mkLit(Var var, bool sign=false)
const vec< typename HashTable::Pair > & bucket(int i) const
Clause & operator[](Ref r)
void clear(bool dealloc=false)
void reloc(CRef &cr, ClauseAllocator &to)
uint32_t operator()(CRef cr) const
lbool operator^(bool b) const
bool operator!=(Lit p) const
static int clauseWord32Size(int size, bool has_extra)
void init(const Idx &idx)
bool operator<(Lit p) const
friend int toInt(lbool l)
void smudge(const Idx &idx)
void moveTo(ClauseAllocator &to)
struct Minisat::Clause::@61 header
bool operator!=(lbool b) const
Lit subsumes(const Clause &other) const
void growTo(CRef cr, const T &t)
ClauseAllocator(uint32_t start_cap)
const T & operator[](CRef cr) const
lbool operator&&(lbool b) const
const Clause * lea(Ref r) const
Vec & lookup(const Idx &idx)