SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
VarSchedulerMcsat.h
Go to the documentation of this file.
1 #include "../VarScheduler.h"
4 
5 
6 namespace smtrat {
7  /**
8  * Base class for all MCSAT variable scheduler.
9  *
10  * Should not be used directly.
11  */
13 
14  protected:
15  std::function<bool(Minisat::Var)> isTheoryVar;
16  std::function<carl::Variable(Minisat::Var)> carlVar;
17  std::function<Minisat::Var(carl::Variable)> minisatVar;
18  std::function<Model()> currentModel;
19  // std::function<const auto&()> booleanConstraintMap;
20 
21  public:
22  template<typename BaseModule>
23  VarSchedulerMcsatBase(BaseModule& baseModule) :
24  VarSchedulerBase(baseModule),
25  isTheoryVar([&baseModule](Minisat::Var v){ return baseModule.mMCSAT.isTheoryVar(v); }),
26  carlVar([&baseModule](Minisat::Var v){ return baseModule.mMCSAT.carlVar(v); }),
27  minisatVar([&baseModule](carl::Variable v){ return baseModule.mMCSAT.minisatVar(v); }),
28  currentModel([&baseModule](){ return baseModule.mMCSAT.model(); })
29  // booleanConstraintMap([&baseModule]() -> const auto& { return baseModule.mBooleanConstraintMap; })
30  {}
31  };
32 
33  /**
34  * Schedules theory variables statically.
35  *
36  * Should not be used directly.
37  */
38  template<mcsat::VariableOrdering vot>
40  std::vector<Minisat::Var> ordering;
41  std::vector<Minisat::Var>::const_iterator nextTheoryVar = ordering.end();
42  bool initialized = false;
43 
44  public:
45 
46  template<typename BaseModule>
47  explicit TheoryVarSchedulerStatic( BaseModule& baseModule ) :
48  VarSchedulerMcsatBase(baseModule)
49  {}
50 
52  if (!initialized) {
53  ordering.push_back(var);
54  } else {
55  assert(*(nextTheoryVar - 1) == var);
56  nextTheoryVar--;
57  }
58  }
59 
60  bool empty() {
61  return nextTheoryVar == ordering.end();
62  }
63 
64  /*
65  Minisat::Var top() {
66  return *nextTheoryVar;
67  }
68  */
69 
71  if (empty()) {
72  return Minisat::lit_Undef;
73  }
74  auto next = *nextTheoryVar;
75  nextTheoryVar++;
76  return Minisat::mkLit( next, true );
77  }
78 
79  /*
80  bool contains(Minisat::Var var) {
81  return std::find(ordering.begin(), ordering.end(), var) != ordering.end();
82  }
83  */
84 
85  void print() const {
86  std::cout << "Theory variable ordering: " << ordering << std::endl;
87  }
88 
89  template<typename Constraints>
90  void rebuildTheoryVars(const Constraints& c) {
91  assert(!initialized);
92  // const auto& c = booleanConstraintMap();
93  std::vector<carl::Variable> tordering = mcsat::calculate_variable_order<vot>(c);
94  assert(tordering.size() == ordering.size());
95  ordering.clear();
96  for (const auto& tvar : tordering) {
97  ordering.push_back(minisatVar(tvar));
98  }
99  nextTheoryVar = ordering.begin();
100  initialized = true;
101  }
102 
103  // helper
104  /**
105  * Level of the next theory variable.
106  */
107  size_t level() {
108  return nextTheoryVar - ordering.begin() + 1;
109  }
110 
111  /**
112  * Returns the level in which the given constraint is univariate
113  */
115  if (!isTheoryAbstraction(v))
116  return 0;
117  const auto& reabstraction = reabstractVariable(v);
118 
119  auto vars = carl::arithmetic_variables(reabstraction);
120  if (vars.empty())
121  return 0;
122  for (std::size_t i = ordering.size(); i > 0; i--) {
123  if (vars.has(carlVar(ordering[i-1]))) {
124  return i;
125  }
126  }
127  return 0;
128  }
129 
130  };
131 
132  /**
133  * Variable scheduling that all decides Boolean variables first before
134  * deciding any theory variable.
135  */
136  template<mcsat::VariableOrdering vot>
140 
141  public:
142  template<typename BaseModule>
143  explicit VarSchedulerMcsatBooleanFirst( BaseModule& baseModule ) :
144  VarSchedulerMcsatBase(baseModule),
145  boolean_ordering( baseModule ),
146  theory_ordering( baseModule )
147  {}
148 
149  void rebuild() {
151  }
152 
154  if (isTheoryVar(var)) {
155  theory_ordering.insert(var);
156  } else {
158  }
159  }
160 
161  /*
162  Minisat::Var top() {
163  if (!boolean_ordering.empty()) {
164  return boolean_ordering.top();
165  } else if (!theory_ordering.empty()) {
166  return theory_ordering.top();
167  } else {
168  return var_Undef;
169  }
170  }
171  */
172 
174  if (!boolean_ordering.empty()) {
175  SMTRAT_LOG_DEBUG("smtrat.sat.mcsat.scheduler", "Picking Boolean var");
176  return boolean_ordering.pop();
177  } else if (!theory_ordering.empty()) {
178  SMTRAT_LOG_DEBUG("smtrat.sat.mcsat.scheduler", "Picking theory var");
179  return theory_ordering.pop();
180  } else {
181  SMTRAT_LOG_DEBUG("smtrat.sat.mcsat.scheduler", "No variable available");
182  return Minisat::lit_Undef;
183  }
184  }
185 
186  bool empty() {
187  return boolean_ordering.empty() && theory_ordering.empty();
188  }
189 
190  /*
191  bool contains(Minisat::Var var) {
192  if (isTheoryVar(var)) {
193  return theory_ordering.contains(var);
194  } else {
195  return boolean_ordering.contains(var);
196  }
197  }
198  */
199 
200  void print() const {
202  theory_ordering.print();
203  }
204 
205  // Events called by SATModule
206 
209  }
210 
213  }
214 
217  }
218 
219  template<typename Constraints>
220  void rebuildTheoryVars(const Constraints& c) {
221  theory_ordering.rebuildTheoryVars(c);
222  }
223  };
224 
225  /**
226  * Variable scheduling that all decides theory variables first before
227  * deciding any Boolean variable.
228  */
229  // template<mcsat::VariableOrdering vot>
230  template<typename TheoryScheduler>
233  // TheoryVarSchedulerStatic<vot> theory_ordering;
234  TheoryScheduler theory_ordering;
235 
236  public:
237  template<typename BaseModule>
238  explicit VarSchedulerMcsatTheoryFirst( BaseModule& baseModule ) :
239  VarSchedulerMcsatBase(baseModule),
240  boolean_ordering( baseModule ),
241  theory_ordering( baseModule )
242  {}
243 
244  void rebuild() {
246  theory_ordering.rebuild();
247  }
248 
250  if (isTheoryVar(var)) {
251  theory_ordering.insert(var);
252  } else {
254  }
255  }
256 
257  /*
258  Minisat::Var top() {
259  if (!theory_ordering.empty()) {
260  return theory_ordering.top();
261  } else if (!boolean_ordering.empty()) {
262  return boolean_ordering.top();
263  } else {
264  return var_Undef;
265  }
266  }
267  */
268 
270  if (!theory_ordering.empty()) {
271  SMTRAT_LOG_DEBUG("smtrat.sat.mcsat.scheduler", "Picking theory var");
272  return theory_ordering.pop();
273  } else if (!boolean_ordering.empty()) {
274  SMTRAT_LOG_DEBUG("smtrat.sat.mcsat.scheduler", "Picking Boolean var");
275  return boolean_ordering.pop();
276  } else {
277  SMTRAT_LOG_DEBUG("smtrat.sat.mcsat.scheduler", "No variable available");
278  return Minisat::lit_Undef;
279  }
280  }
281 
282  bool empty() {
283  return boolean_ordering.empty() && theory_ordering.empty();
284  }
285 
286  /*
287  bool contains(Minisat::Var var) {
288  if (isTheoryVar(var)) {
289  return theory_ordering.contains(var);
290  } else {
291  return boolean_ordering.contains(var);
292  }
293  }
294  */
295 
296  void print() const {
298  theory_ordering.print();
299  }
300 
301  // Events called by SATModule
302 
305  theory_ordering.increaseActivity(var);
306  }
307 
310  theory_ordering.decreaseActivity(var);
311  }
312 
315  theory_ordering.rebuild();
316  }
317 
318  template<typename Constraints>
319  void rebuildTheoryVars(const Constraints& c) {
320  theory_ordering.rebuildTheoryVars(c);
321  }
322  };
323 
324  /**
325  * Decides only Constraints univariate in the current theory variable while the
326  * theory ordering is static.
327  */
328  template<int lookahead, mcsat::VariableOrdering vot>
332 
334  auto x_lvl = theory_ordering.univariateLevel(x);
335  auto y_lvl = theory_ordering.univariateLevel(y);
336  return x_lvl < y_lvl || (x_lvl == y_lvl && getActivity(x) > getActivity(y));
337  }
338 
340  static_assert(lookahead >= 1);
341  return theory_ordering.univariateLevel(x) <= theory_ordering.level() + lookahead;
342  }
343 
344  public:
345  template<typename BaseModule>
346  explicit VarSchedulerMcsatUnivariateConstraintsOnly( BaseModule& baseModule ) :
347  VarSchedulerMcsatBase(baseModule),
348  boolean_ordering( baseModule, [this](Minisat::Var x, Minisat::Var y) -> bool { return varCmp(x,y); } ),
349  theory_ordering( baseModule )
350  {}
351 
352  void rebuild() {
353  boolean_ordering.rebuild();
354  }
355 
357  if (isTheoryVar(var)) {
358  theory_ordering.insert(var);
359  } else {
360  boolean_ordering.insert(var);
361  }
362  }
363 
364  /*
365  Minisat::Var top() {
366  if (!boolean_ordering.empty()) {
367  if (varDecidable(boolean_ordering.top()))
368  return boolean_ordering.top();
369  else
370  assert(!theory_ordering.empty());
371  }
372  if (!theory_ordering.empty()) {
373  return theory_ordering.top();
374  }
375  return var_Undef;
376  }
377  */
378 
380  if (!boolean_ordering.empty()) {
381  if (varDecidable(boolean_ordering.top())) {
382  SMTRAT_LOG_DEBUG("smtrat.sat.mcsat.scheduler", "Picking Boolean var");
383  return boolean_ordering.pop();
384  } else {
385  SMTRAT_LOG_DEBUG("smtrat.sat.mcsat.scheduler", "Decision of next Boolean variable is deferred");
386  assert(!theory_ordering.empty());
387  }
388  }
389  if (!theory_ordering.empty()) {
390  SMTRAT_LOG_DEBUG("smtrat.sat.mcsat.scheduler", "Picking theory var");
391  return theory_ordering.pop();
392  }
393  SMTRAT_LOG_DEBUG("smtrat.sat.mcsat.scheduler", "No variable availabe");
394  return Minisat::lit_Undef;
395  }
396 
397  bool empty() {
398  return boolean_ordering.empty() && theory_ordering.empty();
399  }
400 
401  /*
402  bool contains(Minisat::Var var) {
403  if (isTheoryVar(var)) {
404  return theory_ordering.contains(var);
405  } else {
406  return boolean_ordering.contains(var);
407  }
408  }
409  */
410 
411  void print() const {
412  boolean_ordering.print();
413  theory_ordering.print();
414  }
415 
416  // Events called by SATModule
417 
419  boolean_ordering.increaseActivity(var);
420  }
421 
423  boolean_ordering.decreaseActivity(var);
424  }
425 
427  boolean_ordering.rebuild();
428  }
429 
430  template<typename Constraints>
431  void rebuildTheoryVars(const Constraints& c) {
432  theory_ordering.rebuildTheoryVars(c);
433  boolean_ordering.rebuild();
434  }
435  };
436 
437  /**
438  * Decides only Constraints occuring in clauses that are univariate in the current
439  * theory variable while the theory ordering is static.
440  * This corresponds to the original NLSAT strategy.
441  */
442  template<typename TheoryScheduler, bool respectActivities>
444  private:
446  const auto& x = mTheoryLevels.back().variable;
447 
448  for (int i = 0; i < getClause(cl).size(); i++) {
449  const auto& l = getClause(cl)[i];
450  if (isTheoryAbstraction(Minisat::var(l))) {
451  const auto& reabstraction = reabstractLiteral(l);
452 
453  const auto substituted = carl::substitute(reabstraction, currentModel());
454 
455  auto vars = carl::arithmetic_variables(substituted);
456 
457  auto size = vars.size();
458  for (auto iter = mTheoryLevels.begin(); iter != std::prev(mTheoryLevels.end()); iter++) {
459  if (vars.has(iter->variable)){
460  size --;
461  }
462  }
463 
464  if (size == 0)
465  continue;
466  if (size > 1 || !vars.has(x)) {
467  return false;
468  }
469  } else {
470  return false;
471  }
472  }
473  return true;
474  }
475 
477  for (int i = 0; i < getClause(cl).size(); i++) {
478  const auto& l = getClause(cl)[i];
479  if (isTheoryAbstraction(Minisat::var(l))) {
480  const auto& eval = carl::evaluate(reabstractLiteral(l), currentModel());
481  if (!eval.isBool()) {
482  return false;
483  }
484  } else {
485  return false;
486  }
487  }
488  return true;
489  }
490 
493  for (int i = 0; i < getClause(cl).size(); i++) {
494  auto lit = getClause(cl)[i];
495  if (getBoolLitValue(lit) == l_Undef) {
496  if (!respectActivities) {
497  return lit;
498  }
499  if (res == Minisat::lit_Undef || getActivity(Minisat::var(res)) < getActivity(Minisat::var(lit))) {
500  res = lit;
501  }
502  }
503  }
504  return res;
505  }
506 
507  struct TheoryLevel {
508  std::vector<Minisat::CRef> clauses;
509  carl::Variable variable;
510  };
511 
512  std::vector<Minisat::CRef> mUndecidedClauses;
513  std::vector<TheoryLevel> mTheoryLevels;
514 
515  TheoryScheduler theory_ordering;
516 
517 
519  assert(mTheoryLevels.back().variable != carl::Variable::NO_VARIABLE);
521  for (const auto& cl : mTheoryLevels.back().clauses) {
522  auto lit = undefLitIn(cl);
523  if (lit != Minisat::lit_Undef) {
524  if (!respectActivities) {
525  return lit;
526  }
527  if (res == Minisat::lit_Undef || getActivity(Minisat::var(res)) < getActivity(Minisat::var(lit))) {
528  res = lit;
529  }
530  }
531  }
532  return res;
533  }
534 
535 
537  assert(mTheoryLevels.back().variable == carl::Variable::NO_VARIABLE);
539  for (const auto& cl : mUndecidedClauses) {
540  auto lit = undefLitIn(cl);
541  if (lit != Minisat::lit_Undef) {
542  if (!respectActivities) {
543  return lit;
544  }
545  if (res == Minisat::lit_Undef || getActivity(Minisat::var(res)) < getActivity(Minisat::var(lit))) {
546  res = lit;
547  }
548  }
549  }
550  return res;
551  }
552 
553 
554  carl::Variable theoryDecision() {
555  // precondition: all clauses in mTheoryLevels.back().clauses should be satisfied (by Boolean/theory)!
556  assert(mTheoryLevels.back().variable != carl::Variable::NO_VARIABLE);
557  carl::Variable& v = mTheoryLevels.back().variable;
558  mTheoryLevels.emplace_back();
559  return v;
560  }
561 
562 
564  assert(mTheoryLevels.back().variable == carl::Variable::NO_VARIABLE);
565  for (auto cl = mUndecidedClauses.begin(); cl != mUndecidedClauses.end();) {
566  if (decidedByTheory(*cl)) {
567  mTheoryLevels[mTheoryLevels.size()-2].clauses.push_back(*cl);
568  cl = mUndecidedClauses.erase(cl);
569  } else {
570  cl++;
571  }
572  }
573  auto lit = theory_ordering.pop();
574  if (lit == Minisat::lit_Undef) {
575  return false;
576  }
577  mTheoryLevels.back().variable = carlVar(Minisat::var(lit));
578  for (auto cl = mUndecidedClauses.begin(); cl != mUndecidedClauses.end();) {
579  if (univariate(*cl)) {
580  mTheoryLevels.back().clauses.push_back(*cl);
581  cl = mUndecidedClauses.erase(cl);
582  } else {
583  cl++;
584  }
585  }
586  return true;
587  }
588 
589  void popTheoryLevel() {
590  assert(mTheoryLevels.size() > 1);
591 
592  if (mTheoryLevels.back().variable != carl::Variable::NO_VARIABLE) {
593  auto v = mTheoryLevels.back().variable;
594  theory_ordering.insert(minisatVar(v));
595  }
596 
597  mUndecidedClauses.insert(mUndecidedClauses.end(), mTheoryLevels.back().clauses.begin(), mTheoryLevels.back().clauses.end());
598  mTheoryLevels.pop_back();
599 
600  assert(mTheoryLevels.back().variable != carl::Variable::NO_VARIABLE);
601  }
602 
603  public:
604 
606  // We only allow attaching clauses of level >= current level
607  // which is the case for learned clauses.
608  if (univariate(cl)) {
609  mTheoryLevels.back().clauses.push_back(cl);
610  } else {
611  assert(!decidedByTheory(cl));
612  mUndecidedClauses.push_back(cl);
613  }
614  }
615 
617  mUndecidedClauses.erase(std::remove(mUndecidedClauses.begin(), mUndecidedClauses.end(), cl), mUndecidedClauses.end());
618  for (auto& level : mTheoryLevels) {
619  level.clauses.erase(std::remove(level.clauses.begin(), level.clauses.end(), cl), level.clauses.end());
620  }
621  }
622 
623  void relocateClauses(std::function<void(Minisat::CRef&)> relocate) {
624  for (auto& level : mTheoryLevels) {
625  for (auto& clause : level.clauses) {
626  relocate(clause);
627  }
628  }
629  for (auto& clause : mUndecidedClauses) {
630  relocate(clause);
631  }
632  }
633 
634 
635  public:
636  template<typename BaseModule>
637  explicit VarSchedulerMcsatUnivariateClausesOnly( BaseModule& baseModule ) :
638  VarSchedulerMcsatBase(baseModule),
639  theory_ordering( baseModule )
640  {
641  mTheoryLevels.emplace_back();
642  }
643 
644  void rebuild() {
645  theory_ordering.rebuild();
646  }
647 
649  if (isTheoryVar(var)) {
650  if (mTheoryLevels.back().variable != carl::Variable::NO_VARIABLE || mTheoryLevels.size() > 1) {
651  popTheoryLevel();
652  assert(mTheoryLevels.back().variable == carlVar(var));
653  } else {
654  theory_ordering.insert(var);
655  }
656  } else {
657  // do nothing
658  }
659  }
660 
662  if (mTheoryLevels.back().variable == carl::Variable::NO_VARIABLE) {
663  if (!pickNextTheoryVar()) {
664  // possibly undef, in this case, no decisions left
665  return pickBooleanVarFromUndecided();
666  }
667  }
668  auto res = pickBooleanVarFromCurrentLevel();
669  if (res != Minisat::lit_Undef) {
670  return res;
671  } else {
672  auto x = theoryDecision();
673  return Minisat::mkLit( minisatVar(x), true );
674  }
675  }
676 
677  bool empty() {
678  return theory_ordering.empty() && pickBooleanVarFromCurrentLevel() == Minisat::lit_Undef;
679  }
680 
681  void print() const {
682  theory_ordering.print();
683  for (const auto& level: mTheoryLevels) {
684  std::cout << "Clauses in " << level.variable << ": " << level.clauses << std::endl;
685  }
686  std::cout << "Undecided clauses: " << mUndecidedClauses << std::endl;
687  }
688 
689  // Events called by SATModule
690 
692  theory_ordering.increaseActivity(var);
693  }
694 
696  theory_ordering.decreaseActivity(var);
697  }
698 
700  theory_ordering.rebuild();
701  }
702 
703  template<typename Constraints>
704  void rebuildTheoryVars(const Constraints& c) {
705  assert(mTheoryLevels.size() == 1 && mTheoryLevels.back().variable == carl::Variable::NO_VARIABLE);
706  theory_ordering.rebuildTheoryVars(c);
707  pickNextTheoryVar();
708  }
709 
710  };
711 
712  /**
713  * Activity-based scheduler preferring initially theory variables.
714  */
715  template<mcsat::VariableOrdering vot>
717  bool initialized = false;
718  std::vector<Minisat::Var> theory_ordering;
720 
722  if (getActivity(x) != getActivity(y)) {
723  return getActivity(x) > getActivity(y);
724  } else if (isTheoryVar(x) && !isTheoryVar(y)) {
725  return true;
726  } else if (!isTheoryVar(x) && isTheoryVar(y)) {
727  return false;
728  } else if (isTheoryVar(x) && isTheoryVar(y)) {
729  auto ypos = std::find(theory_ordering.begin(), theory_ordering.end(), y);
730  assert(!initialized || ypos != theory_ordering.end());
731  return std::find(theory_ordering.begin(), ypos, x) != theory_ordering.end();
732  } else { // !isTheoryVar(x) && !isTheoryVar(y)
733  return false;
734  }
735  }
736 
737  public:
738 
739  template<typename BaseModule>
740  explicit VarSchedulerMcsatActivityPreferTheory( BaseModule& baseModule ) :
741  VarSchedulerMcsatBase(baseModule),
742  ordering( baseModule, [this](Minisat::Var x, Minisat::Var y) -> bool { return compareVars(x, y); } )
743  {}
744 
745  void rebuild() {
746  ordering.rebuild();
747  }
748 
750  ordering.insert(var);
751  }
752 
753  /*
754  Minisat::Var top() {
755  return ordering.top();
756  }
757  */
758 
760  return ordering.pop();
761  }
762 
763  bool empty() {
764  return ordering.empty();
765  }
766 
767  /*
768  bool contains(Minisat::Var var) {
769  return ordering.contains(var);
770  }
771  */
772 
773  void print() const {
774  ordering.print();
775  }
776 
777  // Events called by SATModule
778 
780  ordering.increaseActivity(var);
781  }
782 
784  ordering.decreaseActivity(var);
785  }
786 
788  ordering.rebuild();
789  }
790 
791  template<typename Constraints>
792  void rebuildTheoryVars(const Constraints& c) {
793  assert(!initialized);
794  std::vector<carl::Variable> tordering = mcsat::calculate_variable_order<vot>(c);
795  theory_ordering.clear();
796  for (const auto& tvar : tordering) {
797  theory_ordering.push_back(minisatVar(tvar));
798  }
799  initialized = true;
800  }
801  };
802 
803 }
#define l_Undef
Definition: SolverTypes.h:99
Schedules theory variables statically.
TheoryVarSchedulerStatic(BaseModule &baseModule)
void rebuildTheoryVars(const Constraints &c)
std::vector< Minisat::Var > ordering
size_t level()
Level of the next theory variable.
size_t univariateLevel(Minisat::Var v)
Returns the level in which the given constraint is univariate.
std::vector< Minisat::Var >::const_iterator nextTheoryVar
Base class for variable schedulers.
Definition: VarScheduler.h:15
std::function< bool(Minisat::Var)> isTheoryAbstraction
Definition: VarScheduler.h:23
std::function< const FormulaT &(Minisat::Var)> reabstractVariable
Definition: VarScheduler.h:24
std::function< double(Minisat::Var)> getActivity
Definition: VarScheduler.h:18
Activity-based scheduler preferring initially theory variables.
auto compareVars(Minisat::Var x, Minisat::Var y)
VarSchedulerMcsatActivityPreferTheory(BaseModule &baseModule)
Base class for all MCSAT variable scheduler.
std::function< carl::Variable(Minisat::Var)> carlVar
std::function< bool(Minisat::Var)> isTheoryVar
std::function< Model()> currentModel
VarSchedulerMcsatBase(BaseModule &baseModule)
std::function< Minisat::Var(carl::Variable)> minisatVar
Variable scheduling that all decides Boolean variables first before deciding any theory variable.
TheoryVarSchedulerStatic< vot > theory_ordering
VarSchedulerMcsatBooleanFirst(BaseModule &baseModule)
void rebuildTheoryVars(const Constraints &c)
Variable scheduling that all decides theory variables first before deciding any Boolean variable.
VarSchedulerMcsatTheoryFirst(BaseModule &baseModule)
void rebuildTheoryVars(const Constraints &c)
Decides only Constraints occuring in clauses that are univariate in the current theory variable while...
void relocateClauses(std::function< void(Minisat::CRef &)> relocate)
VarSchedulerMcsatUnivariateClausesOnly(BaseModule &baseModule)
Decides only Constraints univariate in the current theory variable while the theory ordering is stati...
bool varCmp(Minisat::Var x, Minisat::Var y)
VarSchedulerMcsatUnivariateConstraintsOnly(BaseModule &baseModule)
Minisat's activity-based variable scheduling.
Definition: VarScheduler.h:117
void increaseActivity(Minisat::Var var)
Definition: VarScheduler.h:195
void insert(Minisat::Var var)
Definition: VarScheduler.h:159
void decreaseActivity(Minisat::Var var)
Definition: VarScheduler.h:200
Definition: Alg.h:27
int Var
Definition: SolverTypes.h:42
int var(Lit p)
Definition: SolverTypes.h:64
static bool find(V &ts, const T &t)
Definition: Alg.h:47
RegionAllocator< uint32_t >::Ref CRef
Definition: SolverTypes.h:142
Lit mkLit(Var var, bool sign=false)
Definition: SolverTypes.h:60
const Lit lit_Undef
Definition: SolverTypes.h:72
static void remove(V &ts, const T &t)
Definition: Alg.h:36
Rational evaluate(carl::Variable v, const Poly &p, const Rational &r)
Definition: utils.h:11
bool substitute(const FormulaT &constr, const carl::Variable var, const carl::vs::Term< Poly > &term, FormulaT &result)
Definition: VSHelper.h:138
std::vector< carl::Variable > vars(const std::pair< QuantifierType, std::vector< carl::Variable >> &p)
Definition: QEQuery.h:43
Class to create the formulas for axioms.
carl::Model< Rational, Poly > Model
Definition: model.h:13
#define SMTRAT_LOG_DEBUG(channel, msg)
Definition: logging.h:35