abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Minisat::Solver Class Reference

#include <Solver.h>

Inherited by Minisat::SimpSolver.

Data Structures

struct  VarData
 
struct  VarOrderLt
 
struct  Watcher
 
struct  WatcherDeleted
 

Public Member Functions

 Solver ()
 
virtual ~Solver ()
 
Var newVar (bool polarity=true, bool dvar=true)
 
bool addClause (const vec< Lit > &ps)
 
bool addEmptyClause ()
 
bool addClause (Lit p)
 
bool addClause (Lit p, Lit q)
 
bool addClause (Lit p, Lit q, Lit r)
 
bool addClause_ (vec< Lit > &ps)
 
bool simplify ()
 
bool solve (const vec< Lit > &assumps)
 
lbool solveLimited (const vec< Lit > &assumps)
 
bool solve ()
 
bool solve (Lit p)
 
bool solve (Lit p, Lit q)
 
bool solve (Lit p, Lit q, Lit r)
 
bool okay () const
 
void toDimacs (FILE *f, const vec< Lit > &assumps)
 
void toDimacs (const char *file, const vec< Lit > &assumps)
 
void toDimacs (FILE *f, Clause &c, vec< Var > &map, Var &max)
 
void toDimacs (const char *file)
 
void toDimacs (const char *file, Lit p)
 
void toDimacs (const char *file, Lit p, Lit q)
 
void toDimacs (const char *file, Lit p, Lit q, Lit r)
 
void setPolarity (Var v, bool b)
 
void setDecisionVar (Var v, bool b)
 
lbool value (Var x) const
 
lbool value (Lit p) const
 
lbool modelValue (Var x) const
 
lbool modelValue (Lit p) const
 
int nAssigns () const
 
int nClauses () const
 
int nLearnts () const
 
int nVars () const
 
int nFreeVars () const
 
void setConfBudget (int64_t x)
 
void setPropBudget (int64_t x)
 
void budgetOff ()
 
void interrupt ()
 
void clearInterrupt ()
 
virtual void garbageCollect ()
 
void checkGarbage (double gf)
 
void checkGarbage ()
 

Data Fields

vec< lboolmodel
 
vec< Litconflict
 
int verbosity
 
double var_decay
 
double clause_decay
 
double random_var_freq
 
double random_seed
 
bool luby_restart
 
int ccmin_mode
 
int phase_saving
 
bool rnd_pol
 
bool rnd_init_act
 
double garbage_frac
 
int restart_first
 
double restart_inc
 
double learntsize_factor
 
double learntsize_inc
 
int learntsize_adjust_start_confl
 
double learntsize_adjust_inc
 
uint64_t solves
 
uint64_t starts
 
uint64_t decisions
 
uint64_t rnd_decisions
 
uint64_t propagations
 
uint64_t conflicts
 
uint64_t dec_vars
 
uint64_t clauses_literals
 
uint64_t learnts_literals
 
uint64_t max_literals
 
uint64_t tot_literals
 

Protected Member Functions

void insertVarOrder (Var x)
 
Lit pickBranchLit ()
 
void newDecisionLevel ()
 
void uncheckedEnqueue (Lit p, CRef from=CRef_Undef)
 
bool enqueue (Lit p, CRef from=CRef_Undef)
 
CRef propagate ()
 
void cancelUntil (int level)
 
void analyze (CRef confl, vec< Lit > &out_learnt, int &out_btlevel)
 
void analyzeFinal (Lit p, vec< Lit > &out_conflict)
 
bool litRedundant (Lit p, uint32_t abstract_levels)
 
lbool search (int nof_conflicts)
 
lbool solve_ ()
 
void reduceDB ()
 
void removeSatisfied (vec< CRef > &cs)
 
void rebuildOrderHeap ()
 
void varDecayActivity ()
 
void varBumpActivity (Var v, double inc)
 
void varBumpActivity (Var v)
 
void claDecayActivity ()
 
void claBumpActivity (Clause &c)
 
void attachClause (CRef cr)
 
void detachClause (CRef cr, bool strict=false)
 
void removeClause (CRef cr)
 
bool locked (const Clause &c) const
 
bool satisfied (const Clause &c) const
 
void relocAll (ClauseAllocator &to)
 
int decisionLevel () const
 
uint32_t abstractLevel (Var x) const
 
CRef reason (Var x) const
 
int level (Var x) const
 
double progressEstimate () const
 
bool withinBudget () const
 

Static Protected Member Functions

static VarData mkVarData (CRef cr, int l)
 
static double drand (double &seed)
 
static int irand (double &seed, int size)
 

Protected Attributes

bool ok
 
vec< CRefclauses
 
vec< CReflearnts
 
double cla_inc
 
vec< double > activity
 
double var_inc
 
OccLists< Lit, vec< Watcher >
, WatcherDeleted
watches
 
vec< lboolassigns
 
vec< char > polarity
 
vec< char > decision
 
vec< Littrail
 
vec< int > trail_lim
 
vec< VarDatavardata
 
int qhead
 
int simpDB_assigns
 
int64_t simpDB_props
 
vec< Litassumptions
 
Heap< VarOrderLtorder_heap
 
double progress_estimate
 
bool remove_satisfied
 
ClauseAllocator ca
 
vec< char > seen
 
vec< Litanalyze_stack
 
vec< Litanalyze_toclear
 
vec< Litadd_tmp
 
double max_learnts
 
double learntsize_adjust_confl
 
int learntsize_adjust_cnt
 
int64_t conflict_budget
 
int64_t propagation_budget
 
bool asynch_interrupt
 

Detailed Description

Definition at line 36 of file Solver.h.

Constructor & Destructor Documentation

Solver::Solver ( )

Definition at line 51 of file Solver.cpp.

51  :
52 
53  // Parameters (user settable):
54  //
55  verbosity (0)
63  , rnd_pol (false)
68 
69  // Parameters (the rest):
70  //
71  , learntsize_factor((double)1/(double)3), learntsize_inc(1.1)
72 
73  // Parameters (experimental):
74  //
76  , learntsize_adjust_inc (1.5)
77 
78  // Statistics: (formerly in 'SolverStats')
79  //
82 
83  , ok (true)
84  , cla_inc (1)
85  , var_inc (1)
86  , watches (WatcherDeleted(ca))
87  , qhead (0)
88  , simpDB_assigns (-1)
89  , simpDB_props (0)
90  , order_heap (VarOrderLt(activity))
91  , progress_estimate (0)
92  , remove_satisfied (true)
93 
94  // Resource constraints:
95  //
96  , conflict_budget (-1)
97  , propagation_budget (-1)
98  , asynch_interrupt (false)
99 {}
double clause_decay
Definition: Solver.h:118
double learntsize_inc
Definition: Solver.h:131
ClauseAllocator ca
Definition: Solver.h:193
bool luby_restart
Definition: Solver.h:121
static DoubleOption opt_clause_decay(_cat,"cla-decay","The clause activity decay factor", 0.999, DoubleRange(0, false, 1, false))
static DoubleOption opt_random_seed(_cat,"rnd-seed","Used by the random variable selection", 91648253, DoubleRange(0, false, HUGE_VAL, false))
int restart_first
Definition: Solver.h:128
double learntsize_adjust_inc
Definition: Solver.h:134
static IntOption opt_phase_saving(_cat,"phase-saving","Controls the level of phase saving (0=none, 1=limited, 2=full)", 2, IntRange(0, 2))
double learntsize_factor
Definition: Solver.h:130
int ccmin_mode
Definition: Solver.h:122
double cla_inc
Definition: Solver.h:174
int learntsize_adjust_start_confl
Definition: Solver.h:133
uint64_t starts
Definition: Solver.h:138
int64_t conflict_budget
Definition: Solver.h:209
static BoolOption opt_rnd_init_act(_cat,"rnd-init","Randomize the initial activity", false)
uint64_t dec_vars
Definition: Solver.h:139
uint64_t learnts_literals
Definition: Solver.h:139
bool asynch_interrupt
Definition: Solver.h:211
uint64_t decisions
Definition: Solver.h:138
static DoubleOption opt_restart_inc(_cat,"rinc","Restart interval increase factor", 2, DoubleRange(1, false, HUGE_VAL, false))
double random_var_freq
Definition: Solver.h:119
static IntOption opt_restart_first(_cat,"rfirst","The base restart interval", 100, IntRange(1, INT32_MAX))
double progress_estimate
Definition: Solver.h:190
uint64_t clauses_literals
Definition: Solver.h:139
double garbage_frac
Definition: Solver.h:126
int phase_saving
Definition: Solver.h:123
bool rnd_init_act
Definition: Solver.h:125
static DoubleOption opt_garbage_frac(_cat,"gc-frac","The fraction of wasted memory allowed before a garbage collection is triggered", 0.20, DoubleRange(0, false, HUGE_VAL, false))
int64_t propagation_budget
Definition: Solver.h:210
uint64_t propagations
Definition: Solver.h:138
vec< double > activity
Definition: Solver.h:175
OccLists< Lit, vec< Watcher >, WatcherDeleted > watches
Definition: Solver.h:178
static DoubleOption opt_var_decay(_cat,"var-decay","The variable activity decay factor", 0.95, DoubleRange(0, false, 1, false))
int simpDB_assigns
Definition: Solver.h:186
static BoolOption opt_luby_restart(_cat,"luby","Use the Luby restart sequence", true)
double var_decay
Definition: Solver.h:117
static IntOption opt_ccmin_mode(_cat,"ccmin-mode","Controls conflict clause minimization (0=none, 1=basic, 2=deep)", 2, IntRange(0, 2))
uint64_t solves
Definition: Solver.h:138
double restart_inc
Definition: Solver.h:129
uint64_t max_literals
Definition: Solver.h:139
int64_t simpDB_props
Definition: Solver.h:187
static DoubleOption opt_random_var_freq(_cat,"rnd-freq","The frequency with which the decision heuristic tries to choose a random variable", 0, DoubleRange(0, true, 1, true))
double var_inc
Definition: Solver.h:176
Heap< VarOrderLt > order_heap
Definition: Solver.h:189
uint64_t rnd_decisions
Definition: Solver.h:138
double random_seed
Definition: Solver.h:120
uint64_t conflicts
Definition: Solver.h:138
uint64_t tot_literals
Definition: Solver.h:139
bool remove_satisfied
Definition: Solver.h:191
bool rnd_pol
Definition: Solver.h:124
Solver::~Solver ( )
virtual

Definition at line 102 of file Solver.cpp.

103 {
104 }

Member Function Documentation

uint32_t Minisat::Solver::abstractLevel ( Var  x) const
inlineprotected

Definition at line 320 of file Solver.h.

320 { return 1 << (level(x) & 31); }
int level(Var x) const
Definition: Solver.h:278
bool Minisat::Solver::addClause ( const vec< Lit > &  ps)
inline

Definition at line 311 of file Solver.h.

311 { ps.copyTo(add_tmp); return addClause_(add_tmp); }
bool addClause_(vec< Lit > &ps)
Definition: Solver.cpp:132
vec< Lit > add_tmp
Definition: Solver.h:201
bool Minisat::Solver::addClause ( Lit  p)
inline

Definition at line 313 of file Solver.h.

313 { add_tmp.clear(); add_tmp.push(p); return addClause_(add_tmp); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
bool addClause_(vec< Lit > &ps)
Definition: Solver.cpp:132
vec< Lit > add_tmp
Definition: Solver.h:201
bool Minisat::Solver::addClause ( Lit  p,
Lit  q 
)
inline

Definition at line 314 of file Solver.h.

314 { add_tmp.clear(); add_tmp.push(p); add_tmp.push(q); return addClause_(add_tmp); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
bool addClause_(vec< Lit > &ps)
Definition: Solver.cpp:132
vec< Lit > add_tmp
Definition: Solver.h:201
bool Minisat::Solver::addClause ( Lit  p,
Lit  q,
Lit  r 
)
inline

Definition at line 315 of file Solver.h.

315 { add_tmp.clear(); add_tmp.push(p); add_tmp.push(q); add_tmp.push(r); return addClause_(add_tmp); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
bool addClause_(vec< Lit > &ps)
Definition: Solver.cpp:132
vec< Lit > add_tmp
Definition: Solver.h:201
bool Solver::addClause_ ( vec< Lit > &  ps)

Definition at line 132 of file Solver.cpp.

133 {
134  assert(decisionLevel() == 0);
135  if (!ok) return false;
136 
137  // Check if clause is satisfied and remove false/duplicate literals:
138  sort(ps);
139  Lit p; int i, j;
140  for (i = j = 0, p = lit_Undef; i < ps.size(); i++)
141  if (value(ps[i]) == l_True || ps[i] == ~p)
142  return true;
143  else if (value(ps[i]) != l_False && ps[i] != p)
144  ps[j++] = p = ps[i];
145  ps.shrink(i - j);
146 
147  if (ps.size() == 0)
148  return ok = false;
149  else if (ps.size() == 1){
150  uncheckedEnqueue(ps[0]);
151  return ok = (propagate() == CRef_Undef);
152  }else{
153  CRef cr = ca.alloc(ps, false);
154  clauses.push(cr);
155  attachClause(cr);
156  }
157 
158  return true;
159 }
RegionAllocator< uint32_t >::Ref CRef
Definition: SolverTypes.h:120
ClauseAllocator ca
Definition: Solver.h:193
void sort(T *array, int size, LessThan lt)
Definition: Sort.h:57
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define l_True
Definition: SolverTypes.h:84
CRef alloc(const Lits &ps, bool learnt=false)
Definition: SolverTypes.h:209
void attachClause(CRef cr)
Definition: Solver.cpp:162
void push(void)
Definition: Vec.h:73
int size(void) const
Definition: Vec.h:63
const CRef CRef_Undef
Definition: SolverTypes.h:193
int decisionLevel() const
Definition: Solver.h:319
vec< CRef > clauses
Definition: Solver.h:172
void shrink(int nelems)
Definition: Vec.h:64
lbool value(Var x) const
Definition: Solver.h:321
#define l_False
Definition: SolverTypes.h:85
void uncheckedEnqueue(Lit p, CRef from=CRef_Undef)
Definition: Solver.cpp:429
const Lit lit_Undef
Definition: SolverTypes.h:72
#define assert(ex)
Definition: util_old.h:213
CRef propagate()
Definition: Solver.cpp:449
bool Minisat::Solver::addEmptyClause ( )
inline

Definition at line 312 of file Solver.h.

312 { add_tmp.clear(); return addClause_(add_tmp); }
bool addClause_(vec< Lit > &ps)
Definition: Solver.cpp:132
vec< Lit > add_tmp
Definition: Solver.h:201
void Solver::analyze ( CRef  confl,
vec< Lit > &  out_learnt,
int &  out_btlevel 
)
protected

Definition at line 264 of file Solver.cpp.

265 {
266  int pathC = 0;
267  Lit p = lit_Undef;
268 
269  // Generate conflict clause:
270  //
271  out_learnt.push(); // (leave room for the asserting literal)
272  int index = trail.size() - 1;
273 
274  do{
275  assert(confl != CRef_Undef); // (otherwise should be UIP)
276  Clause& c = ca[confl];
277 
278  if (c.learnt())
279  claBumpActivity(c);
280 
281  for (int j = (p == lit_Undef) ? 0 : 1; j < c.size(); j++){
282  Lit q = c[j];
283 
284  if (!seen[var(q)] && level(var(q)) > 0){
285  varBumpActivity(var(q));
286  seen[var(q)] = 1;
287  if (level(var(q)) >= decisionLevel())
288  pathC++;
289  else
290  out_learnt.push(q);
291  }
292  }
293 
294  // Select next clause to look at:
295  while (!seen[var(trail[index--])]);
296  p = trail[index+1];
297  confl = reason(var(p));
298  seen[var(p)] = 0;
299  pathC--;
300 
301  }while (pathC > 0);
302  out_learnt[0] = ~p;
303 
304  // Simplify conflict clause:
305  //
306  int i, j;
307  out_learnt.copyTo(analyze_toclear);
308  if (ccmin_mode == 2){
309  uint32_t abstract_level = 0;
310  for (i = 1; i < out_learnt.size(); i++)
311  abstract_level |= abstractLevel(var(out_learnt[i])); // (maintain an abstraction of levels involved in conflict)
312 
313  for (i = j = 1; i < out_learnt.size(); i++)
314  if (reason(var(out_learnt[i])) == CRef_Undef || !litRedundant(out_learnt[i], abstract_level))
315  out_learnt[j++] = out_learnt[i];
316 
317  }else if (ccmin_mode == 1){
318  for (i = j = 1; i < out_learnt.size(); i++){
319  Var x = var(out_learnt[i]);
320 
321  if (reason(x) == CRef_Undef)
322  out_learnt[j++] = out_learnt[i];
323  else{
324  Clause& c = ca[reason(var(out_learnt[i]))];
325  for (int k = 1; k < c.size(); k++)
326  if (!seen[var(c[k])] && level(var(c[k])) > 0){
327  out_learnt[j++] = out_learnt[i];
328  break; }
329  }
330  }
331  }else
332  i = j = out_learnt.size();
333 
334  max_literals += out_learnt.size();
335  out_learnt.shrink(i - j);
336  tot_literals += out_learnt.size();
337 
338  // Find correct backtrack level:
339  //
340  if (out_learnt.size() == 1)
341  out_btlevel = 0;
342  else{
343  int max_i = 1;
344  // Find the first literal assigned at the next-highest level:
345  for (int i = 2; i < out_learnt.size(); i++)
346  if (level(var(out_learnt[i])) > level(var(out_learnt[max_i])))
347  max_i = i;
348  // Swap-in this literal at index 1:
349  Lit p = out_learnt[max_i];
350  out_learnt[max_i] = out_learnt[1];
351  out_learnt[1] = p;
352  out_btlevel = level(var(p));
353  }
354 
355  for (j = 0; j < analyze_toclear.size(); j++) seen[var(analyze_toclear[j])] = 0; // ('seen[]' is now cleared)
356 }
ClauseAllocator ca
Definition: Solver.h:193
CRef reason(Var x) const
Definition: Solver.h:277
int level(Var x) const
Definition: Solver.h:278
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int var(Lit p)
Definition: SolverTypes.h:62
void claBumpActivity(Clause &c)
Definition: Solver.h:297
int ccmin_mode
Definition: Solver.h:122
unsigned learnt
Definition: SolverTypes.h:126
void copyTo(vec< T > &copy) const
Definition: Vec.h:90
void push(void)
Definition: Vec.h:73
int size(void) const
Definition: Vec.h:63
bool litRedundant(Lit p, uint32_t abstract_levels)
Definition: Solver.cpp:361
const CRef CRef_Undef
Definition: SolverTypes.h:193
int decisionLevel() const
Definition: Solver.h:319
vec< char > seen
Definition: Solver.h:198
void shrink(int nelems)
Definition: Vec.h:64
vec< Lit > analyze_toclear
Definition: Solver.h:200
int Var
Definition: SolverTypes.h:42
const Lit lit_Undef
Definition: SolverTypes.h:72
uint32_t abstractLevel(Var x) const
Definition: Solver.h:320
vec< Lit > trail
Definition: Solver.h:182
uint64_t max_literals
Definition: Solver.h:139
#define assert(ex)
Definition: util_old.h:213
void varBumpActivity(Var v, double inc)
Definition: Solver.h:285
uint64_t tot_literals
Definition: Solver.h:139
void Solver::analyzeFinal ( Lit  p,
vec< Lit > &  out_conflict 
)
protected

Definition at line 399 of file Solver.cpp.

400 {
401  out_conflict.clear();
402  out_conflict.push(p);
403 
404  if (decisionLevel() == 0)
405  return;
406 
407  seen[var(p)] = 1;
408 
409  for (int i = trail.size()-1; i >= trail_lim[0]; i--){
410  Var x = var(trail[i]);
411  if (seen[x]){
412  if (reason(x) == CRef_Undef){
413  assert(level(x) > 0);
414  out_conflict.push(~trail[i]);
415  }else{
416  Clause& c = ca[reason(x)];
417  for (int j = 1; j < c.size(); j++)
418  if (level(var(c[j])) > 0)
419  seen[var(c[j])] = 1;
420  }
421  seen[x] = 0;
422  }
423  }
424 
425  seen[var(p)] = 0;
426 }
ClauseAllocator ca
Definition: Solver.h:193
CRef reason(Var x) const
Definition: Solver.h:277
int level(Var x) const
Definition: Solver.h:278
int var(Lit p)
Definition: SolverTypes.h:62
void push(void)
Definition: Vec.h:73
vec< int > trail_lim
Definition: Solver.h:183
const CRef CRef_Undef
Definition: SolverTypes.h:193
int decisionLevel() const
Definition: Solver.h:319
vec< char > seen
Definition: Solver.h:198
void clear(bool dealloc=false)
Definition: Vec.h:121
int Var
Definition: SolverTypes.h:42
vec< Lit > trail
Definition: Solver.h:182
#define assert(ex)
Definition: util_old.h:213
void Solver::attachClause ( CRef  cr)
protected

Definition at line 162 of file Solver.cpp.

162  {
163  const Clause& c = ca[cr];
164  assert(c.size() > 1);
165  watches[~c[0]].push(Watcher(cr, c[1]));
166  watches[~c[1]].push(Watcher(cr, c[0]));
167  if (c.learnt()) learnts_literals += c.size();
168  else clauses_literals += c.size(); }
ClauseAllocator ca
Definition: Solver.h:193
unsigned learnt
Definition: SolverTypes.h:126
uint64_t learnts_literals
Definition: Solver.h:139
uint64_t clauses_literals
Definition: Solver.h:139
OccLists< Lit, vec< Watcher >, WatcherDeleted > watches
Definition: Solver.h:178
#define assert(ex)
Definition: util_old.h:213
void Minisat::Solver::budgetOff ( )
inline

Definition at line 343 of file Solver.h.

int64_t conflict_budget
Definition: Solver.h:209
int64_t propagation_budget
Definition: Solver.h:210
void Solver::cancelUntil ( int  level)
protected

Definition at line 207 of file Solver.cpp.

207  {
208  if (decisionLevel() > level){
209  for (int c = trail.size()-1; c >= trail_lim[level]; c--){
210  Var x = var(trail[c]);
211  assigns [x] = l_Undef;
212  if (phase_saving > 1 || (phase_saving == 1) && c > trail_lim.last())
213  polarity[x] = sign(trail[c]);
214  insertVarOrder(x); }
215  qhead = trail_lim[level];
216  trail.shrink(trail.size() - trail_lim[level]);
218  } }
int level(Var x) const
Definition: Solver.h:278
#define l_Undef
Definition: SolverTypes.h:86
int var(Lit p)
Definition: SolverTypes.h:62
vec< char > polarity
Definition: Solver.h:180
bool sign(Lit p)
Definition: SolverTypes.h:61
void insertVarOrder(Var x)
Definition: Solver.h:280
vec< int > trail_lim
Definition: Solver.h:183
int size(void) const
Definition: Vec.h:63
int decisionLevel() const
Definition: Solver.h:319
void shrink(int nelems)
Definition: Vec.h:64
int phase_saving
Definition: Solver.h:123
int Var
Definition: SolverTypes.h:42
vec< Lit > trail
Definition: Solver.h:182
vec< lbool > assigns
Definition: Solver.h:179
const T & last(void) const
Definition: Vec.h:82
void Minisat::Solver::checkGarbage ( double  gf)
inline

Definition at line 305 of file Solver.h.

305  {
306  if (ca.wasted() > ca.size() * gf)
307  garbageCollect(); }
uint32_t size() const
Definition: Alloc.h:56
uint32_t wasted() const
Definition: Alloc.h:57
ClauseAllocator ca
Definition: Solver.h:193
virtual void garbageCollect()
Definition: Solver.cpp:913
void Minisat::Solver::checkGarbage ( void  )
inline

Definition at line 304 of file Solver.h.

void checkGarbage()
Definition: Solver.h:304
double garbage_frac
Definition: Solver.h:126
void Minisat::Solver::claBumpActivity ( Clause c)
inlineprotected

Definition at line 297 of file Solver.h.

297  {
298  if ( (c.activity() += cla_inc) > 1e20 ) {
299  // Rescale:
300  for (int i = 0; i < learnts.size(); i++)
301  ca[learnts[i]].activity() *= (float)1e-20;
302  cla_inc *= 1e-20; } }
ClauseAllocator ca
Definition: Solver.h:193
double cla_inc
Definition: Solver.h:174
int size(void) const
Definition: Vec.h:63
vec< double > activity
Definition: Solver.h:175
vec< CRef > learnts
Definition: Solver.h:173
void Minisat::Solver::claDecayActivity ( )
inlineprotected

Definition at line 296 of file Solver.h.

296 { cla_inc *= (1 / clause_decay); }
double clause_decay
Definition: Solver.h:118
double cla_inc
Definition: Solver.h:174
void Minisat::Solver::clearInterrupt ( )
inline

Definition at line 342 of file Solver.h.

342 { asynch_interrupt = false; }
bool asynch_interrupt
Definition: Solver.h:211
int Minisat::Solver::decisionLevel ( ) const
inlineprotected

Definition at line 319 of file Solver.h.

319 { return trail_lim.size(); }
vec< int > trail_lim
Definition: Solver.h:183
int size(void) const
Definition: Vec.h:63
void Solver::detachClause ( CRef  cr,
bool  strict = false 
)
protected

Definition at line 171 of file Solver.cpp.

171  {
172  const Clause& c = ca[cr];
173  assert(c.size() > 1);
174 
175  if (strict){
176  remove(watches[~c[0]], Watcher(cr, c[1]));
177  remove(watches[~c[1]], Watcher(cr, c[0]));
178  }else{
179  // Lazy detaching: (NOTE! Must clean all watcher lists before garbage collecting this clause)
180  watches.smudge(~c[0]);
181  watches.smudge(~c[1]);
182  }
183 
184  if (c.learnt()) learnts_literals -= c.size();
185  else clauses_literals -= c.size(); }
ClauseAllocator ca
Definition: Solver.h:193
unsigned learnt
Definition: SolverTypes.h:126
uint64_t learnts_literals
Definition: Solver.h:139
uint64_t clauses_literals
Definition: Solver.h:139
OccLists< Lit, vec< Watcher >, WatcherDeleted > watches
Definition: Solver.h:178
#define assert(ex)
Definition: util_old.h:213
static double Minisat::Solver::drand ( double &  seed)
inlinestaticprotected

Definition at line 262 of file Solver.h.

262  {
263  seed *= 1389796;
264  int q = (int)(seed / 2147483647);
265  seed -= (double)q * 2147483647;
266  return seed / 2147483647; }
bool Minisat::Solver::enqueue ( Lit  p,
CRef  from = CRef_Undef 
)
inlineprotected

Definition at line 310 of file Solver.h.

310 { return value(p) != l_Undef ? value(p) != l_False : (uncheckedEnqueue(p, from), true); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define l_Undef
Definition: SolverTypes.h:86
lbool value(Var x) const
Definition: Solver.h:321
#define l_False
Definition: SolverTypes.h:85
void uncheckedEnqueue(Lit p, CRef from=CRef_Undef)
Definition: Solver.cpp:429
void Solver::garbageCollect ( )
virtual

Reimplemented in Minisat::SimpSolver.

Definition at line 913 of file Solver.cpp.

914 {
915  // Initialize the next region to a size corresponding to the estimated utilization degree. This
916  // is not precise but should avoid some unnecessary reallocations for the new region:
917  ClauseAllocator to(ca.size() - ca.wasted());
918 
919  relocAll(to);
920  if (verbosity >= 2)
921  printf("| Garbage collection: %12d bytes => %12d bytes |\n",
923  to.moveTo(ca);
924 }
uint32_t size() const
Definition: Alloc.h:56
uint32_t wasted() const
Definition: Alloc.h:57
ClauseAllocator ca
Definition: Solver.h:193
void relocAll(ClauseAllocator &to)
Definition: Solver.cpp:876
void Minisat::Solver::insertVarOrder ( Var  x)
inlineprotected

Definition at line 280 of file Solver.h.

280  {
281  if (!order_heap.inHeap(x) && decision[x]) order_heap.insert(x); }
vec< char > decision
Definition: Solver.h:181
Heap< VarOrderLt > order_heap
Definition: Solver.h:189
void Minisat::Solver::interrupt ( )
inline

Definition at line 341 of file Solver.h.

341 { asynch_interrupt = true; }
bool asynch_interrupt
Definition: Solver.h:211
static int Minisat::Solver::irand ( double &  seed,
int  size 
)
inlinestaticprotected

Definition at line 269 of file Solver.h.

269  {
270  return (int)(drand(seed) * size); }
static int size
Definition: cuddSign.c:86
static double drand(double &seed)
Definition: Solver.h:262
int Minisat::Solver::level ( Var  x) const
inlineprotected

Definition at line 278 of file Solver.h.

278 { return vardata[x].level; }
vec< VarData > vardata
Definition: Solver.h:184
bool Solver::litRedundant ( Lit  p,
uint32_t  abstract_levels 
)
protected

Definition at line 361 of file Solver.cpp.

362 {
363  analyze_stack.clear(); analyze_stack.push(p);
364  int top = analyze_toclear.size();
365  while (analyze_stack.size() > 0){
367  Clause& c = ca[reason(var(analyze_stack.last()))]; analyze_stack.pop();
368 
369  for (int i = 1; i < c.size(); i++){
370  Lit p = c[i];
371  if (!seen[var(p)] && level(var(p)) > 0){
372  if (reason(var(p)) != CRef_Undef && (abstractLevel(var(p)) & abstract_levels) != 0){
373  seen[var(p)] = 1;
374  analyze_stack.push(p);
375  analyze_toclear.push(p);
376  }else{
377  for (int j = top; j < analyze_toclear.size(); j++)
378  seen[var(analyze_toclear[j])] = 0;
379  analyze_toclear.shrink(analyze_toclear.size() - top);
380  return false;
381  }
382  }
383  }
384  }
385 
386  return true;
387 }
ClauseAllocator ca
Definition: Solver.h:193
CRef reason(Var x) const
Definition: Solver.h:277
int level(Var x) const
Definition: Solver.h:278
int var(Lit p)
Definition: SolverTypes.h:62
vec< Lit > analyze_stack
Definition: Solver.h:199
const CRef CRef_Undef
Definition: SolverTypes.h:193
vec< char > seen
Definition: Solver.h:198
vec< Lit > analyze_toclear
Definition: Solver.h:200
uint32_t abstractLevel(Var x) const
Definition: Solver.h:320
#define assert(ex)
Definition: util_old.h:213
bool Minisat::Solver::locked ( const Clause c) const
inlineprotected

Definition at line 316 of file Solver.h.

316 { return value(c[0]) == l_True && reason(var(c[0])) != CRef_Undef && ca.lea(reason(var(c[0]))) == &c; }
ClauseAllocator ca
Definition: Solver.h:193
CRef reason(Var x) const
Definition: Solver.h:277
int var(Lit p)
Definition: SolverTypes.h:62
#define l_True
Definition: SolverTypes.h:84
Clause * lea(Ref r)
Definition: SolverTypes.h:224
const CRef CRef_Undef
Definition: SolverTypes.h:193
lbool value(Var x) const
Definition: Solver.h:321
static VarData Minisat::Solver::mkVarData ( CRef  cr,
int  l 
)
inlinestaticprotected

Definition at line 146 of file Solver.h.

146 { VarData d = {cr, l}; return d; }
lbool Minisat::Solver::modelValue ( Var  x) const
inline

Definition at line 323 of file Solver.h.

323 { return model[x]; }
vec< lbool > model
Definition: Solver.h:110
lbool Minisat::Solver::modelValue ( Lit  p) const
inline

Definition at line 324 of file Solver.h.

324 { return model[var(p)] ^ sign(p); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int var(Lit p)
Definition: SolverTypes.h:62
bool sign(Lit p)
Definition: SolverTypes.h:61
vec< lbool > model
Definition: Solver.h:110
int Minisat::Solver::nAssigns ( ) const
inline

Definition at line 325 of file Solver.h.

325 { return trail.size(); }
vec< Lit > trail
Definition: Solver.h:182
int Minisat::Solver::nClauses ( ) const
inline

Definition at line 326 of file Solver.h.

326 { return clauses.size(); }
int size(void) const
Definition: Vec.h:63
vec< CRef > clauses
Definition: Solver.h:172
void Minisat::Solver::newDecisionLevel ( )
inlineprotected

Definition at line 317 of file Solver.h.

317 { trail_lim.push(trail.size()); }
void push(void)
Definition: Vec.h:73
vec< int > trail_lim
Definition: Solver.h:183
vec< Lit > trail
Definition: Solver.h:182
Var Solver::newVar ( bool  polarity = true,
bool  dvar = true 
)

Definition at line 114 of file Solver.cpp.

115 {
116  int v = nVars();
117  watches .init(mkLit(v, false));
118  watches .init(mkLit(v, true ));
119  assigns .push(l_Undef);
120  vardata .push(mkVarData(CRef_Undef, 0));
121  //activity .push(0);
122  activity .push(rnd_init_act ? drand(random_seed) * 0.00001 : 0);
123  seen .push(0);
124  polarity .push(sign);
125  decision .push();
126  trail .capacity(v+1);
127  setDecisionVar(v, dvar);
128  return v;
129 }
#define l_Undef
Definition: SolverTypes.h:86
vec< char > polarity
Definition: Solver.h:180
bool sign(Lit p)
Definition: SolverTypes.h:61
Lit mkLit(Var var, bool sign)
Definition: SolverTypes.h:58
void setDecisionVar(Var v, bool b)
Definition: Solver.h:331
void push(void)
Definition: Vec.h:73
int nVars() const
Definition: Solver.h:328
const CRef CRef_Undef
Definition: SolverTypes.h:193
vec< char > seen
Definition: Solver.h:198
vec< VarData > vardata
Definition: Solver.h:184
bool rnd_init_act
Definition: Solver.h:125
static double drand(double &seed)
Definition: Solver.h:262
vec< double > activity
Definition: Solver.h:175
OccLists< Lit, vec< Watcher >, WatcherDeleted > watches
Definition: Solver.h:178
vec< Lit > trail
Definition: Solver.h:182
vec< char > decision
Definition: Solver.h:181
vec< lbool > assigns
Definition: Solver.h:179
static VarData mkVarData(CRef cr, int l)
Definition: Solver.h:146
double random_seed
Definition: Solver.h:120
int Minisat::Solver::nFreeVars ( ) const
inline

Definition at line 329 of file Solver.h.

329 { return (int)dec_vars - (trail_lim.size() == 0 ? trail.size() : trail_lim[0]); }
uint64_t dec_vars
Definition: Solver.h:139
vec< int > trail_lim
Definition: Solver.h:183
int size(void) const
Definition: Vec.h:63
vec< Lit > trail
Definition: Solver.h:182
int Minisat::Solver::nLearnts ( ) const
inline

Definition at line 327 of file Solver.h.

327 { return learnts.size(); }
int size(void) const
Definition: Vec.h:63
vec< CRef > learnts
Definition: Solver.h:173
int Minisat::Solver::nVars ( ) const
inline

Definition at line 328 of file Solver.h.

328 { return vardata.size(); }
vec< VarData > vardata
Definition: Solver.h:184
bool Minisat::Solver::okay ( ) const
inline

Definition at line 358 of file Solver.h.

358 { return ok; }
Lit Solver::pickBranchLit ( )
protected

Definition at line 225 of file Solver.cpp.

226 {
227  Var next = var_Undef;
228 
229  // Random decision:
230  if (drand(random_seed) < random_var_freq && !order_heap.empty()){
231  next = order_heap[irand(random_seed,order_heap.size())];
232  if (value(next) == l_Undef && decision[next])
233  rnd_decisions++; }
234 
235  // Activity based decision:
236  while (next == var_Undef || value(next) != l_Undef || !decision[next])
237  if (order_heap.empty()){
238  next = var_Undef;
239  break;
240  }else
241  next = order_heap.removeMin();
242 
243  return next == var_Undef ? lit_Undef : mkLit(next, rnd_pol ? drand(random_seed) < 0.5 : polarity[next]);
244 }
#define l_Undef
Definition: SolverTypes.h:86
vec< char > polarity
Definition: Solver.h:180
Lit mkLit(Var var, bool sign)
Definition: SolverTypes.h:58
double random_var_freq
Definition: Solver.h:119
static double drand(double &seed)
Definition: Solver.h:262
lbool value(Var x) const
Definition: Solver.h:321
static int irand(double &seed, int size)
Definition: Solver.h:269
int Var
Definition: SolverTypes.h:42
const Lit lit_Undef
Definition: SolverTypes.h:72
#define var_Undef
Definition: SolverTypes.h:43
vec< char > decision
Definition: Solver.h:181
Heap< VarOrderLt > order_heap
Definition: Solver.h:189
uint64_t rnd_decisions
Definition: Solver.h:138
double random_seed
Definition: Solver.h:120
bool rnd_pol
Definition: Solver.h:124
double Solver::progressEstimate ( ) const
protected

Definition at line 708 of file Solver.cpp.

709 {
710  double progress = 0;
711  double F = 1.0 / nVars();
712 
713  for (int i = 0; i <= decisionLevel(); i++){
714  int beg = i == 0 ? 0 : trail_lim[i - 1];
715  int end = i == decisionLevel() ? trail.size() : trail_lim[i];
716  progress += pow(F, i) * (end - beg);
717  }
718 
719  return progress / nVars();
720 }
vec< int > trail_lim
Definition: Solver.h:183
int nVars() const
Definition: Solver.h:328
int decisionLevel() const
Definition: Solver.h:319
vec< Lit > trail
Definition: Solver.h:182
CRef Solver::propagate ( )
protected

Definition at line 449 of file Solver.cpp.

450 {
451  CRef confl = CRef_Undef;
452  int num_props = 0;
453  watches.cleanAll();
454 
455  while (qhead < trail.size()){
456  Lit p = trail[qhead++]; // 'p' is enqueued fact to propagate.
457  vec<Watcher>& ws = watches[p];
458  Watcher *i, *j, *end;
459  num_props++;
460 
461  for (i = j = (Watcher*)ws, end = i + ws.size(); i != end;){
462  // Try to avoid inspecting the clause:
463  Lit blocker = i->blocker;
464  if (value(blocker) == l_True){
465  *j++ = *i++; continue; }
466 
467  // Make sure the false literal is data[1]:
468  CRef cr = i->cref;
469  Clause& c = ca[cr];
470  Lit false_lit = ~p;
471  if (c[0] == false_lit)
472  c[0] = c[1], c[1] = false_lit;
473  assert(c[1] == false_lit);
474  i++;
475 
476  // If 0th watch is true, then clause is already satisfied.
477  Lit first = c[0];
478  Watcher w = Watcher(cr, first);
479  if (first != blocker && value(first) == l_True){
480  *j++ = w; continue; }
481 
482  // Look for new watch:
483  for (int k = 2; k < c.size(); k++)
484  if (value(c[k]) != l_False){
485  c[1] = c[k]; c[k] = false_lit;
486  watches[~c[1]].push(w);
487  goto NextClause; }
488 
489  // Did not find watch -- clause is unit under assignment:
490  *j++ = w;
491  if (value(first) == l_False){
492  confl = cr;
493  qhead = trail.size();
494  // Copy the remaining watches:
495  while (i < end)
496  *j++ = *i++;
497  }else
498  uncheckedEnqueue(first, cr);
499 
500  NextClause:;
501  }
502  ws.shrink(i - j);
503  }
504  propagations += num_props;
505  simpDB_props -= num_props;
506 
507  return confl;
508 }
RegionAllocator< uint32_t >::Ref CRef
Definition: SolverTypes.h:120
ClauseAllocator ca
Definition: Solver.h:193
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define l_True
Definition: SolverTypes.h:84
int size(void) const
Definition: Vec.h:63
const CRef CRef_Undef
Definition: SolverTypes.h:193
void shrink(int nelems)
Definition: Vec.h:64
uint64_t propagations
Definition: Solver.h:138
OccLists< Lit, vec< Watcher >, WatcherDeleted > watches
Definition: Solver.h:178
lbool value(Var x) const
Definition: Solver.h:321
#define l_False
Definition: SolverTypes.h:85
void uncheckedEnqueue(Lit p, CRef from=CRef_Undef)
Definition: Solver.cpp:429
vec< Lit > trail
Definition: Solver.h:182
#define assert(ex)
Definition: util_old.h:213
int64_t simpDB_props
Definition: Solver.h:187
CRef Minisat::Solver::reason ( Var  x) const
inlineprotected

Definition at line 277 of file Solver.h.

277 { return vardata[x].reason; }
vec< VarData > vardata
Definition: Solver.h:184
void Solver::rebuildOrderHeap ( )
protected

Definition at line 559 of file Solver.cpp.

560 {
561  vec<Var> vs;
562  for (Var v = 0; v < nVars(); v++)
563  if (decision[v] && value(v) == l_Undef)
564  vs.push(v);
565  order_heap.build(vs);
566 }
#define l_Undef
Definition: SolverTypes.h:86
void push(void)
Definition: Vec.h:73
int nVars() const
Definition: Solver.h:328
lbool value(Var x) const
Definition: Solver.h:321
int Var
Definition: SolverTypes.h:42
vec< char > decision
Definition: Solver.h:181
Heap< VarOrderLt > order_heap
Definition: Solver.h:189
void Solver::reduceDB ( )
protected

Definition at line 525 of file Solver.cpp.

526 {
527  int i, j;
528  double extra_lim = cla_inc / learnts.size(); // Remove any clause below this activity
529 
531  // Don't delete binary or locked clauses. From the rest, delete clauses from the first half
532  // and clauses with activity smaller than 'extra_lim':
533  for (i = j = 0; i < learnts.size(); i++){
534  Clause& c = ca[learnts[i]];
535  if (c.size() > 2 && !locked(c) && (i < learnts.size() / 2 || c.activity() < extra_lim))
536  removeClause(learnts[i]);
537  else
538  learnts[j++] = learnts[i];
539  }
540  learnts.shrink(i - j);
541  checkGarbage();
542 }
bool locked(const Clause &c) const
Definition: Solver.h:316
ClauseAllocator ca
Definition: Solver.h:193
void sort(T *array, int size, LessThan lt)
Definition: Sort.h:57
double cla_inc
Definition: Solver.h:174
int size(void) const
Definition: Vec.h:63
float & activity()
Definition: SolverTypes.h:181
void checkGarbage()
Definition: Solver.h:304
void removeClause(CRef cr)
Definition: Solver.cpp:188
vec< CRef > learnts
Definition: Solver.h:173
void Solver::relocAll ( ClauseAllocator to)
protected

Definition at line 876 of file Solver.cpp.

877 {
878  // All watchers:
879  //
880  // for (int i = 0; i < watches.size(); i++)
881  watches.cleanAll();
882  for (int v = 0; v < nVars(); v++)
883  for (int s = 0; s < 2; s++){
884  Lit p = mkLit(v, s);
885  // printf(" >>> RELOCING: %s%d\n", sign(p)?"-":"", var(p)+1);
886  vec<Watcher>& ws = watches[p];
887  for (int j = 0; j < ws.size(); j++)
888  ca.reloc(ws[j].cref, to);
889  }
890 
891  // All reasons:
892  //
893  int i;
894  for (i = 0; i < trail.size(); i++){
895  Var v = var(trail[i]);
896 
897  if (reason(v) != CRef_Undef && (ca[reason(v)].reloced() || locked(ca[reason(v)])))
898  ca.reloc(vardata[v].reason, to);
899  }
900 
901  // All learnt:
902  //
903  for (i = 0; i < learnts.size(); i++)
904  ca.reloc(learnts[i], to);
905 
906  // All original:
907  //
908  for (i = 0; i < clauses.size(); i++)
909  ca.reloc(clauses[i], to);
910 }
bool locked(const Clause &c) const
Definition: Solver.h:316
ClauseAllocator ca
Definition: Solver.h:193
CRef reason(Var x) const
Definition: Solver.h:277
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int var(Lit p)
Definition: SolverTypes.h:62
Lit mkLit(Var var, bool sign)
Definition: SolverTypes.h:58
int nVars() const
Definition: Solver.h:328
int size(void) const
Definition: Vec.h:63
const CRef CRef_Undef
Definition: SolverTypes.h:193
vec< CRef > clauses
Definition: Solver.h:172
vec< VarData > vardata
Definition: Solver.h:184
void reloc(CRef &cr, ClauseAllocator &to)
Definition: SolverTypes.h:234
OccLists< Lit, vec< Watcher >, WatcherDeleted > watches
Definition: Solver.h:178
vec< CRef > learnts
Definition: Solver.h:173
int Var
Definition: SolverTypes.h:42
vec< Lit > trail
Definition: Solver.h:182
void Solver::removeClause ( CRef  cr)
protected

Definition at line 188 of file Solver.cpp.

188  {
189  Clause& c = ca[cr];
190  detachClause(cr);
191  // Don't leave pointers to free'd memory!
192  if (locked(c)) vardata[var(c[0])].reason = CRef_Undef;
193  c.mark(1);
194  ca._free(cr);
195 }
bool locked(const Clause &c) const
Definition: Solver.h:316
ClauseAllocator ca
Definition: Solver.h:193
int var(Lit p)
Definition: SolverTypes.h:62
void detachClause(CRef cr, bool strict=false)
Definition: Solver.cpp:171
const CRef CRef_Undef
Definition: SolverTypes.h:193
vec< VarData > vardata
Definition: Solver.h:184
void _free(CRef cid)
Definition: SolverTypes.h:228
void Solver::removeSatisfied ( vec< CRef > &  cs)
protected

Definition at line 545 of file Solver.cpp.

546 {
547  int i, j;
548  for (i = j = 0; i < cs.size(); i++){
549  Clause& c = ca[cs[i]];
550  if (satisfied(c))
551  removeClause(cs[i]);
552  else
553  cs[j++] = cs[i];
554  }
555  cs.shrink(i - j);
556 }
ClauseAllocator ca
Definition: Solver.h:193
int size(void) const
Definition: Vec.h:63
void removeClause(CRef cr)
Definition: Solver.cpp:188
bool satisfied(const Clause &c) const
Definition: Solver.cpp:198
bool Solver::satisfied ( const Clause c) const
protected

Definition at line 198 of file Solver.cpp.

198  {
199  for (int i = 0; i < c.size(); i++)
200  if (value(c[i]) == l_True)
201  return true;
202  return false; }
#define l_True
Definition: SolverTypes.h:84
lbool value(Var x) const
Definition: Solver.h:321
lbool Solver::search ( int  nof_conflicts)
protected

Definition at line 614 of file Solver.cpp.

615 {
616  assert(ok);
617  int backtrack_level;
618  int conflictC = 0;
619  vec<Lit> learnt_clause;
620  starts++;
621 
622  for (;;){
623  CRef confl = propagate();
624  if (confl != CRef_Undef){
625  // CONFLICT
626  conflicts++; conflictC++;
627  if (decisionLevel() == 0) return l_False;
628 
629  learnt_clause.clear();
630  analyze(confl, learnt_clause, backtrack_level);
631  cancelUntil(backtrack_level);
632 
633  if (learnt_clause.size() == 1){
634  uncheckedEnqueue(learnt_clause[0]);
635  }else{
636  CRef cr = ca.alloc(learnt_clause, true);
637  learnts.push(cr);
638  attachClause(cr);
639  claBumpActivity(ca[cr]);
640  uncheckedEnqueue(learnt_clause[0], cr);
641  }
642 
645 
646  if (--learntsize_adjust_cnt == 0){
650 
651  if (verbosity >= 1)
652  printf("| %9d | %7d %8d %8d | %8d %8d %6.0f | %6.3f %% |\n",
653  (int)conflicts,
654  (int)dec_vars - (trail_lim.size() == 0 ? trail.size() : trail_lim[0]), nClauses(), (int)clauses_literals,
655  (int)max_learnts, nLearnts(), ((double)((int64_t)learnts_literals))/nLearnts(), progressEstimate()*100);
656  }
657 
658  }else{
659  // NO CONFLICT
660  if (nof_conflicts >= 0 && conflictC >= nof_conflicts || !withinBudget()){
661  // Reached bound on number of conflicts:
663  cancelUntil(0);
664  return l_Undef; }
665 
666  // Simplify the set of problem clauses:
667  if (decisionLevel() == 0 && !simplify())
668  return l_False;
669 
670  if (learnts.size()-nAssigns() >= max_learnts)
671  // Reduce the set of learnt clauses:
672  reduceDB();
673 
674  Lit next = lit_Undef;
675  while (decisionLevel() < assumptions.size()){
676  // Perform user provided assumption:
678  if (value(p) == l_True){
679  // Dummy decision level:
681  }else if (value(p) == l_False){
682  analyzeFinal(~p, conflict);
683  return l_False;
684  }else{
685  next = p;
686  break;
687  }
688  }
689 
690  if (next == lit_Undef){
691  // New variable decision:
692  decisions++;
693  next = pickBranchLit();
694 
695  if (next == lit_Undef)
696  // Model found:
697  return l_True;
698  }
699 
700  // Increase decision level and enqueue 'next'
702  uncheckedEnqueue(next);
703  }
704  }
705 }
RegionAllocator< uint32_t >::Ref CRef
Definition: SolverTypes.h:120
double learntsize_inc
Definition: Solver.h:131
void reduceDB()
Definition: Solver.cpp:525
ClauseAllocator ca
Definition: Solver.h:193
int learntsize_adjust_cnt
Definition: Solver.h:205
bool simplify()
Definition: Solver.cpp:577
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define l_Undef
Definition: SolverTypes.h:86
double learntsize_adjust_inc
Definition: Solver.h:134
bool withinBudget() const
Definition: Solver.h:344
double max_learnts
Definition: Solver.h:203
void claDecayActivity()
Definition: Solver.h:296
void claBumpActivity(Clause &c)
Definition: Solver.h:297
vec< Lit > conflict
Definition: Solver.h:111
#define l_True
Definition: SolverTypes.h:84
void newDecisionLevel()
Definition: Solver.h:317
CRef alloc(const Lits &ps, bool learnt=false)
Definition: SolverTypes.h:209
uint64_t starts
Definition: Solver.h:138
void attachClause(CRef cr)
Definition: Solver.cpp:162
void cancelUntil(int level)
Definition: Solver.cpp:207
uint64_t dec_vars
Definition: Solver.h:139
void push(void)
Definition: Vec.h:73
vec< int > trail_lim
Definition: Solver.h:183
int size(void) const
Definition: Vec.h:63
Lit pickBranchLit()
Definition: Solver.cpp:225
uint64_t learnts_literals
Definition: Solver.h:139
const CRef CRef_Undef
Definition: SolverTypes.h:193
int decisionLevel() const
Definition: Solver.h:319
uint64_t decisions
Definition: Solver.h:138
vec< Lit > assumptions
Definition: Solver.h:188
double progress_estimate
Definition: Solver.h:190
int nAssigns() const
Definition: Solver.h:325
uint64_t clauses_literals
Definition: Solver.h:139
void clear(bool dealloc=false)
Definition: Vec.h:121
int nClauses() const
Definition: Solver.h:326
lbool value(Var x) const
Definition: Solver.h:321
void varDecayActivity()
Definition: Solver.h:283
vec< CRef > learnts
Definition: Solver.h:173
#define l_False
Definition: SolverTypes.h:85
void analyzeFinal(Lit p, vec< Lit > &out_conflict)
Definition: Solver.cpp:399
void uncheckedEnqueue(Lit p, CRef from=CRef_Undef)
Definition: Solver.cpp:429
const Lit lit_Undef
Definition: SolverTypes.h:72
void analyze(CRef confl, vec< Lit > &out_learnt, int &out_btlevel)
Definition: Solver.cpp:264
vec< Lit > trail
Definition: Solver.h:182
#define assert(ex)
Definition: util_old.h:213
int nLearnts() const
Definition: Solver.h:327
double progressEstimate() const
Definition: Solver.cpp:708
CRef propagate()
Definition: Solver.cpp:449
uint64_t conflicts
Definition: Solver.h:138
double learntsize_adjust_confl
Definition: Solver.h:204
void Minisat::Solver::setConfBudget ( int64_t  x)
inline

Definition at line 339 of file Solver.h.

339 { conflict_budget = conflicts + x; }
int64_t conflict_budget
Definition: Solver.h:209
uint64_t conflicts
Definition: Solver.h:138
void Minisat::Solver::setDecisionVar ( Var  v,
bool  b 
)
inline

Definition at line 331 of file Solver.h.

332 {
333  if ( b && !decision[v]) dec_vars++;
334  else if (!b && decision[v]) dec_vars--;
335 
336  decision[v] = b;
337  insertVarOrder(v);
338 }
void insertVarOrder(Var x)
Definition: Solver.h:280
uint64_t dec_vars
Definition: Solver.h:139
vec< char > decision
Definition: Solver.h:181
void Minisat::Solver::setPolarity ( Var  v,
bool  b 
)
inline

Definition at line 330 of file Solver.h.

330 { polarity[v] = b; }
vec< char > polarity
Definition: Solver.h:180
void Minisat::Solver::setPropBudget ( int64_t  x)
inline

Definition at line 340 of file Solver.h.

int64_t propagation_budget
Definition: Solver.h:210
uint64_t propagations
Definition: Solver.h:138
bool Solver::simplify ( )

Definition at line 577 of file Solver.cpp.

578 {
579  assert(decisionLevel() == 0);
580 
581  if (!ok || propagate() != CRef_Undef)
582  return ok = false;
583 
584  if (nAssigns() == simpDB_assigns || (simpDB_props > 0))
585  return true;
586 
587  // Remove satisfied clauses:
589  if (remove_satisfied) // Can be turned off.
591  checkGarbage();
593 
595  simpDB_props = clauses_literals + learnts_literals; // (shouldn't depend on stats really, but it will do for now)
596 
597  return true;
598 }
void removeSatisfied(vec< CRef > &cs)
Definition: Solver.cpp:545
uint64_t learnts_literals
Definition: Solver.h:139
const CRef CRef_Undef
Definition: SolverTypes.h:193
int decisionLevel() const
Definition: Solver.h:319
void checkGarbage()
Definition: Solver.h:304
vec< CRef > clauses
Definition: Solver.h:172
void rebuildOrderHeap()
Definition: Solver.cpp:559
int nAssigns() const
Definition: Solver.h:325
uint64_t clauses_literals
Definition: Solver.h:139
int simpDB_assigns
Definition: Solver.h:186
vec< CRef > learnts
Definition: Solver.h:173
#define assert(ex)
Definition: util_old.h:213
int64_t simpDB_props
Definition: Solver.h:187
CRef propagate()
Definition: Solver.cpp:449
bool remove_satisfied
Definition: Solver.h:191
bool Minisat::Solver::solve ( const vec< Lit > &  assumps)
inline

Definition at line 356 of file Solver.h.

356 { budgetOff(); assumps.copyTo(assumptions); return solve_() == l_True; }
void budgetOff()
Definition: Solver.h:343
#define l_True
Definition: SolverTypes.h:84
vec< Lit > assumptions
Definition: Solver.h:188
lbool solve_()
Definition: Solver.cpp:751
bool Minisat::Solver::solve ( )
inline

Definition at line 352 of file Solver.h.

352 { budgetOff(); assumptions.clear(); return solve_() == l_True; }
void budgetOff()
Definition: Solver.h:343
#define l_True
Definition: SolverTypes.h:84
vec< Lit > assumptions
Definition: Solver.h:188
lbool solve_()
Definition: Solver.cpp:751
bool Minisat::Solver::solve ( Lit  p)
inline

Definition at line 353 of file Solver.h.

353 { budgetOff(); assumptions.clear(); assumptions.push(p); return solve_() == l_True; }
void budgetOff()
Definition: Solver.h:343
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define l_True
Definition: SolverTypes.h:84
vec< Lit > assumptions
Definition: Solver.h:188
lbool solve_()
Definition: Solver.cpp:751
bool Minisat::Solver::solve ( Lit  p,
Lit  q 
)
inline

Definition at line 354 of file Solver.h.

354 { budgetOff(); assumptions.clear(); assumptions.push(p); assumptions.push(q); return solve_() == l_True; }
void budgetOff()
Definition: Solver.h:343
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define l_True
Definition: SolverTypes.h:84
vec< Lit > assumptions
Definition: Solver.h:188
lbool solve_()
Definition: Solver.cpp:751
bool Minisat::Solver::solve ( Lit  p,
Lit  q,
Lit  r 
)
inline

Definition at line 355 of file Solver.h.

355 { budgetOff(); assumptions.clear(); assumptions.push(p); assumptions.push(q); assumptions.push(r); return solve_() == l_True; }
void budgetOff()
Definition: Solver.h:343
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define l_True
Definition: SolverTypes.h:84
vec< Lit > assumptions
Definition: Solver.h:188
lbool solve_()
Definition: Solver.cpp:751
lbool Solver::solve_ ( )
protected

Definition at line 751 of file Solver.cpp.

752 {
753  model.clear();
754  conflict.clear();
755  if (!ok) return l_False;
756 
757  solves++;
758 
762  lbool status = l_Undef;
763 
764  if (verbosity >= 1){
765  printf("============================[ Search Statistics ]==============================\n");
766  printf("| Conflicts | ORIGINAL | LEARNT | Progress |\n");
767  printf("| | Vars Clauses Literals | Limit Clauses Lit/Cl | |\n");
768  printf("===============================================================================\n");
769  }
770 
771  // Search:
772  int curr_restarts = 0;
773  while (status == l_Undef){
774  double rest_base = luby_restart ? luby(restart_inc, curr_restarts) : pow(restart_inc, curr_restarts);
775  status = search(rest_base * restart_first);
776  if (!withinBudget()) break;
777  curr_restarts++;
778  }
779 
780  if (verbosity >= 1)
781  printf("===============================================================================\n");
782 
783 
784  if (status == l_True){
785  // Extend & copy model:
786  model.growTo(nVars());
787  for (int i = 0; i < nVars(); i++) model[i] = value(i);
788  }else if (status == l_False && conflict.size() == 0)
789  ok = false;
790 
791  cancelUntil(0);
792  return status;
793 }
int learntsize_adjust_cnt
Definition: Solver.h:205
bool luby_restart
Definition: Solver.h:121
int restart_first
Definition: Solver.h:128
#define l_Undef
Definition: SolverTypes.h:86
bool withinBudget() const
Definition: Solver.h:344
double max_learnts
Definition: Solver.h:203
double learntsize_factor
Definition: Solver.h:130
vec< Lit > conflict
Definition: Solver.h:111
#define l_True
Definition: SolverTypes.h:84
int learntsize_adjust_start_confl
Definition: Solver.h:133
lbool search(int nof_conflicts)
Definition: Solver.cpp:614
void cancelUntil(int level)
Definition: Solver.cpp:207
int nVars() const
Definition: Solver.h:328
int nClauses() const
Definition: Solver.h:326
vec< lbool > model
Definition: Solver.h:110
lbool value(Var x) const
Definition: Solver.h:321
uint64_t solves
Definition: Solver.h:138
static double luby(double y, int x)
Definition: Solver.cpp:734
#define l_False
Definition: SolverTypes.h:85
double restart_inc
Definition: Solver.h:129
double learntsize_adjust_confl
Definition: Solver.h:204
lbool Minisat::Solver::solveLimited ( const vec< Lit > &  assumps)
inline

Definition at line 357 of file Solver.h.

357 { assumps.copyTo(assumptions); return solve_(); }
vec< Lit > assumptions
Definition: Solver.h:188
lbool solve_()
Definition: Solver.cpp:751
void Solver::toDimacs ( FILE *  f,
const vec< Lit > &  assumps 
)

Definition at line 831 of file Solver.cpp.

832 {
833  // Handle case when solver is in contradictory state:
834  if (!ok){
835  fprintf(f, "p cnf 1 2\n1 0\n-1 0\n");
836  return; }
837 
838  vec<Var> map; Var max = 0;
839 
840  // Cannot use removeClauses here because it is not safe
841  // to deallocate them at this point. Could be improved.
842  int i, cnt = 0;
843  for (i = 0; i < clauses.size(); i++)
844  if (!satisfied(ca[clauses[i]]))
845  cnt++;
846 
847  for (i = 0; i < clauses.size(); i++)
848  if (!satisfied(ca[clauses[i]])){
849  Clause& c = ca[clauses[i]];
850  for (int j = 0; j < c.size(); j++)
851  if (value(c[j]) != l_False)
852  mapVar(var(c[j]), map, max);
853  }
854 
855  // Assumptions are added as unit clauses:
856  cnt += assumptions.size();
857 
858  fprintf(f, "p cnf %d %d\n", max, cnt);
859 
860  for (i = 0; i < assumptions.size(); i++){
862  fprintf(f, "%s%d 0\n", sign(assumptions[i]) ? "-" : "", mapVar(var(assumptions[i]), map, max)+1);
863  }
864 
865  for (i = 0; i < clauses.size(); i++)
866  toDimacs(f, ca[clauses[i]], map, max);
867 
868  if (verbosity > 0)
869  printf("Wrote %d clauses with %d variables.\n", cnt, max);
870 }
ClauseAllocator ca
Definition: Solver.h:193
int var(Lit p)
Definition: SolverTypes.h:62
void map()
bool sign(Lit p)
Definition: SolverTypes.h:61
static Var mapVar(Var x, vec< Var > &map, Var &max)
Definition: Solver.cpp:800
int size(void) const
Definition: Vec.h:63
vec< Lit > assumptions
Definition: Solver.h:188
vec< CRef > clauses
Definition: Solver.h:172
static double max
Definition: cuddSubsetHB.c:134
void toDimacs(FILE *f, const vec< Lit > &assumps)
Definition: Solver.cpp:831
lbool value(Var x) const
Definition: Solver.h:321
#define l_False
Definition: SolverTypes.h:85
int Var
Definition: SolverTypes.h:42
#define assert(ex)
Definition: util_old.h:213
bool satisfied(const Clause &c) const
Definition: Solver.cpp:198
void Solver::toDimacs ( const char *  file,
const vec< Lit > &  assumps 
)

Definition at line 821 of file Solver.cpp.

822 {
823  FILE* f = fopen(file, "wr");
824  if (f == NULL)
825  fprintf(stderr, "could not open file %s\n", file), exit(1);
826  toDimacs(f, assumps);
827  fclose(f);
828 }
VOID_HACK exit()
void toDimacs(FILE *f, const vec< Lit > &assumps)
Definition: Solver.cpp:831
void Solver::toDimacs ( FILE *  f,
Clause c,
vec< Var > &  map,
Var max 
)

Definition at line 810 of file Solver.cpp.

811 {
812  if (satisfied(c)) return;
813 
814  for (int i = 0; i < c.size(); i++)
815  if (value(c[i]) != l_False)
816  fprintf(f, "%s%d ", sign(c[i]) ? "-" : "", mapVar(var(c[i]), map, max)+1);
817  fprintf(f, "0\n");
818 }
int var(Lit p)
Definition: SolverTypes.h:62
bool sign(Lit p)
Definition: SolverTypes.h:61
static Var mapVar(Var x, vec< Var > &map, Var &max)
Definition: Solver.cpp:800
static double max
Definition: cuddSubsetHB.c:134
lbool value(Var x) const
Definition: Solver.h:321
#define l_False
Definition: SolverTypes.h:85
bool satisfied(const Clause &c) const
Definition: Solver.cpp:198
void Minisat::Solver::toDimacs ( const char *  file)
inline

Definition at line 360 of file Solver.h.

360 { vec<Lit> as; toDimacs(file, as); }
void toDimacs(FILE *f, const vec< Lit > &assumps)
Definition: Solver.cpp:831
void Minisat::Solver::toDimacs ( const char *  file,
Lit  p 
)
inline

Definition at line 361 of file Solver.h.

361 { vec<Lit> as; as.push(p); toDimacs(file, as); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void toDimacs(FILE *f, const vec< Lit > &assumps)
Definition: Solver.cpp:831
void Minisat::Solver::toDimacs ( const char *  file,
Lit  p,
Lit  q 
)
inline

Definition at line 362 of file Solver.h.

362 { vec<Lit> as; as.push(p); as.push(q); toDimacs(file, as); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void toDimacs(FILE *f, const vec< Lit > &assumps)
Definition: Solver.cpp:831
void Minisat::Solver::toDimacs ( const char *  file,
Lit  p,
Lit  q,
Lit  r 
)
inline

Definition at line 363 of file Solver.h.

363 { vec<Lit> as; as.push(p); as.push(q); as.push(r); toDimacs(file, as); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void toDimacs(FILE *f, const vec< Lit > &assumps)
Definition: Solver.cpp:831
void Solver::uncheckedEnqueue ( Lit  p,
CRef  from = CRef_Undef 
)
protected

Definition at line 429 of file Solver.cpp.

430 {
431  assert(value(p) == l_Undef);
432  assigns[var(p)] = lbool(!sign(p));
433  vardata[var(p)] = mkVarData(from, decisionLevel());
434  trail.push_(p);
435 }
char lbool
Definition: satVec.h:133
#define l_Undef
Definition: SolverTypes.h:86
int var(Lit p)
Definition: SolverTypes.h:62
bool sign(Lit p)
Definition: SolverTypes.h:61
int decisionLevel() const
Definition: Solver.h:319
vec< VarData > vardata
Definition: Solver.h:184
lbool value(Var x) const
Definition: Solver.h:321
vec< Lit > trail
Definition: Solver.h:182
#define assert(ex)
Definition: util_old.h:213
vec< lbool > assigns
Definition: Solver.h:179
static VarData mkVarData(CRef cr, int l)
Definition: Solver.h:146
lbool Minisat::Solver::value ( Var  x) const
inline

Definition at line 321 of file Solver.h.

321 { return assigns[x]; }
vec< lbool > assigns
Definition: Solver.h:179
lbool Minisat::Solver::value ( Lit  p) const
inline

Definition at line 322 of file Solver.h.

322 { return assigns[var(p)] ^ sign(p); }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int var(Lit p)
Definition: SolverTypes.h:62
bool sign(Lit p)
Definition: SolverTypes.h:61
vec< lbool > assigns
Definition: Solver.h:179
void Minisat::Solver::varBumpActivity ( Var  v,
double  inc 
)
inlineprotected

Definition at line 285 of file Solver.h.

285  {
286  if ( (activity[v] += inc) > 1e100 ) {
287  // Rescale:
288  for (int i = 0; i < nVars(); i++)
289  activity[i] *= 1e-100;
290  var_inc *= 1e-100; }
291 
292  // Update order_heap with respect to new activity:
293  if (order_heap.inHeap(v))
294  order_heap.decrease(v); }
int nVars() const
Definition: Solver.h:328
vec< double > activity
Definition: Solver.h:175
double var_inc
Definition: Solver.h:176
Heap< VarOrderLt > order_heap
Definition: Solver.h:189
void Minisat::Solver::varBumpActivity ( Var  v)
inlineprotected

Definition at line 284 of file Solver.h.

284 { varBumpActivity(v, var_inc); }
double var_inc
Definition: Solver.h:176
void varBumpActivity(Var v, double inc)
Definition: Solver.h:285
void Minisat::Solver::varDecayActivity ( )
inlineprotected

Definition at line 283 of file Solver.h.

283 { var_inc *= (1 / var_decay); }
double var_decay
Definition: Solver.h:117
double var_inc
Definition: Solver.h:176
bool Minisat::Solver::withinBudget ( ) const
inlineprotected

Definition at line 344 of file Solver.h.

344  {
345  return !asynch_interrupt &&
346  (conflict_budget < 0 || conflicts < (uint64_t)conflict_budget) &&
347  (propagation_budget < 0 || propagations < (uint64_t)propagation_budget); }
int64_t conflict_budget
Definition: Solver.h:209
bool asynch_interrupt
Definition: Solver.h:211
int64_t propagation_budget
Definition: Solver.h:210
uint64_t propagations
Definition: Solver.h:138
uint64_t conflicts
Definition: Solver.h:138

Field Documentation

vec<double> Minisat::Solver::activity
protected

Definition at line 175 of file Solver.h.

vec<Lit> Minisat::Solver::add_tmp
protected

Definition at line 201 of file Solver.h.

vec<Lit> Minisat::Solver::analyze_stack
protected

Definition at line 199 of file Solver.h.

vec<Lit> Minisat::Solver::analyze_toclear
protected

Definition at line 200 of file Solver.h.

vec<lbool> Minisat::Solver::assigns
protected

Definition at line 179 of file Solver.h.

vec<Lit> Minisat::Solver::assumptions
protected

Definition at line 188 of file Solver.h.

bool Minisat::Solver::asynch_interrupt
protected

Definition at line 211 of file Solver.h.

ClauseAllocator Minisat::Solver::ca
protected

Definition at line 193 of file Solver.h.

int Minisat::Solver::ccmin_mode

Definition at line 122 of file Solver.h.

double Minisat::Solver::cla_inc
protected

Definition at line 174 of file Solver.h.

double Minisat::Solver::clause_decay

Definition at line 118 of file Solver.h.

vec<CRef> Minisat::Solver::clauses
protected

Definition at line 172 of file Solver.h.

uint64_t Minisat::Solver::clauses_literals

Definition at line 139 of file Solver.h.

vec<Lit> Minisat::Solver::conflict

Definition at line 111 of file Solver.h.

int64_t Minisat::Solver::conflict_budget
protected

Definition at line 209 of file Solver.h.

uint64_t Minisat::Solver::conflicts

Definition at line 138 of file Solver.h.

uint64_t Minisat::Solver::dec_vars

Definition at line 139 of file Solver.h.

vec<char> Minisat::Solver::decision
protected

Definition at line 181 of file Solver.h.

uint64_t Minisat::Solver::decisions

Definition at line 138 of file Solver.h.

double Minisat::Solver::garbage_frac

Definition at line 126 of file Solver.h.

vec<CRef> Minisat::Solver::learnts
protected

Definition at line 173 of file Solver.h.

uint64_t Minisat::Solver::learnts_literals

Definition at line 139 of file Solver.h.

int Minisat::Solver::learntsize_adjust_cnt
protected

Definition at line 205 of file Solver.h.

double Minisat::Solver::learntsize_adjust_confl
protected

Definition at line 204 of file Solver.h.

double Minisat::Solver::learntsize_adjust_inc

Definition at line 134 of file Solver.h.

int Minisat::Solver::learntsize_adjust_start_confl

Definition at line 133 of file Solver.h.

double Minisat::Solver::learntsize_factor

Definition at line 130 of file Solver.h.

double Minisat::Solver::learntsize_inc

Definition at line 131 of file Solver.h.

bool Minisat::Solver::luby_restart

Definition at line 121 of file Solver.h.

double Minisat::Solver::max_learnts
protected

Definition at line 203 of file Solver.h.

uint64_t Minisat::Solver::max_literals

Definition at line 139 of file Solver.h.

vec<lbool> Minisat::Solver::model

Definition at line 110 of file Solver.h.

bool Minisat::Solver::ok
protected

Definition at line 171 of file Solver.h.

Heap<VarOrderLt> Minisat::Solver::order_heap
protected

Definition at line 189 of file Solver.h.

int Minisat::Solver::phase_saving

Definition at line 123 of file Solver.h.

vec<char> Minisat::Solver::polarity
protected

Definition at line 180 of file Solver.h.

double Minisat::Solver::progress_estimate
protected

Definition at line 190 of file Solver.h.

int64_t Minisat::Solver::propagation_budget
protected

Definition at line 210 of file Solver.h.

uint64_t Minisat::Solver::propagations

Definition at line 138 of file Solver.h.

int Minisat::Solver::qhead
protected

Definition at line 185 of file Solver.h.

double Minisat::Solver::random_seed

Definition at line 120 of file Solver.h.

double Minisat::Solver::random_var_freq

Definition at line 119 of file Solver.h.

bool Minisat::Solver::remove_satisfied
protected

Definition at line 191 of file Solver.h.

int Minisat::Solver::restart_first

Definition at line 128 of file Solver.h.

double Minisat::Solver::restart_inc

Definition at line 129 of file Solver.h.

uint64_t Minisat::Solver::rnd_decisions

Definition at line 138 of file Solver.h.

bool Minisat::Solver::rnd_init_act

Definition at line 125 of file Solver.h.

bool Minisat::Solver::rnd_pol

Definition at line 124 of file Solver.h.

vec<char> Minisat::Solver::seen
protected

Definition at line 198 of file Solver.h.

int Minisat::Solver::simpDB_assigns
protected

Definition at line 186 of file Solver.h.

int64_t Minisat::Solver::simpDB_props
protected

Definition at line 187 of file Solver.h.

uint64_t Minisat::Solver::solves

Definition at line 138 of file Solver.h.

uint64_t Minisat::Solver::starts

Definition at line 138 of file Solver.h.

uint64_t Minisat::Solver::tot_literals

Definition at line 139 of file Solver.h.

vec<Lit> Minisat::Solver::trail
protected

Definition at line 182 of file Solver.h.

vec<int> Minisat::Solver::trail_lim
protected

Definition at line 183 of file Solver.h.

double Minisat::Solver::var_decay

Definition at line 117 of file Solver.h.

double Minisat::Solver::var_inc
protected

Definition at line 176 of file Solver.h.

vec<VarData> Minisat::Solver::vardata
protected

Definition at line 184 of file Solver.h.

int Minisat::Solver::verbosity

Definition at line 116 of file Solver.h.

OccLists<Lit, vec<Watcher>, WatcherDeleted> Minisat::Solver::watches
protected

Definition at line 178 of file Solver.h.


The documentation for this class was generated from the following files: