18 int res =
queue.unassigned;
22 stats.searched += searched;
25 LOG (
"next queue decision variable %d bumped %" PRId64
"", res,
38 (void)
scores.pop_front ();
40 LOG (
"next decision variable %d with score %g", res,
score (res));
58 const int initial_phase =
opts.phase ? 1 : -1;
65 phase = initial_phase;
81 phase = initial_phase;
115 int lit_idx = abs (
lit);
116 int other_idx = abs (other);
118 return stab[lit_idx] >
stab[other_idx];
120 return btab[lit_idx] >
btab[other_idx];
133 const signed char tmp =
val (
lit);
135 LOG (
"assumption %d falsified",
lit);
137 }
else if (tmp > 0) {
138 LOG (
"assumption %d already satisfied",
lit);
140 LOG (
"added pseudo decision level");
143 LOG (
"deciding assumption %d",
lit);
148 int satisfied_lit = 0;
149 int unassigned_lit = 0;
150 int previous_lit = 0;
152 const size_t size_constraint =
constraint.size ();
154#ifndef CADICAL_NDEBUG
159 for (
size_t i = 0; i != size_constraint; i++) {
167 const signed char tmp =
val (
lit);
169 LOG (
"constraint literal %d falsified",
lit);
174 LOG (
"constraint literal %d satisfied",
lit);
180 LOG (
"constraint literal %d unassigned",
lit);
183 unassigned_lit =
lit;
190 LOG (
"literal %d satisfies constraint and "
191 "is implied by assumptions",
195 LOG (
"added pseudo decision level for constraint");
204 if (size_constraint) {
206 for (
size_t i = 0; i + 1 != size_constraint; i++)
209 constraint[size_constraint - 1] = previous_lit;
212 if (unassigned_lit) {
214 LOG (
"deciding %d to satisfy constraint", unassigned_lit);
219 LOG (
"failing constraint");
225#ifndef CADICAL_NDEBUG
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define CADICAL_assert(ignore)
int next_decision_variable_with_best_score()
void update_queue_unassigned(int idx)
int next_decision_variable()
void new_trail_level(int lit)
bool better_decision(int lit, int other)
int decide_phase(int idx, bool target)
void search_assume_decision(int decision)
signed char val(int lit) const
int likely_phase(int idx)
vector< int > assumptions
int next_decision_variable_on_queue()
int64_t & bumped(int lit)