Var x = var(trail[c]);
assigns [x] = l_Undef;
if (marker[x] == 2) marker[x] = 1;
- if (phase_saving > 1 || (phase_saving == 1) && c > trail_lim.last())
- polarity[x] = sign(trail[c]);
+ if (phase_saving > 1
+ || ((phase_saving == 1) && c > trail_lim.last()))
+ {
+ polarity[x] = sign(trail[c]);
+ }
insertVarOrder(x); }
qhead = trail_lim[level];
trail.shrink(trail.size() - trail_lim[level]);
cancelUntil(assumptions.size());
throw e;
}
-
- if (decisionLevel() > assumptions.size() && nof_conflicts >= 0 && conflictC >= nof_conflicts ||
- !isWithinBudget) {
- // Reached bound on number of conflicts:
- Debug("bvminisat::search") << OUTPUT_TAG << " restarting " << std::endl;
- progress_estimate = progressEstimate();
- cancelUntil(assumptions.size());
- return l_Undef;
+
+ if ((decisionLevel() > assumptions.size() && nof_conflicts >= 0
+ && conflictC >= nof_conflicts)
+ || !isWithinBudget)
+ {
+ // Reached bound on number of conflicts:
+ Debug("bvminisat::search")
+ << OUTPUT_TAG << " restarting " << std::endl;
+ progress_estimate = progressEstimate();
+ cancelUntil(assumptions.size());
+ return l_Undef;
}
-
+
// Simplify the set of problem clauses:
if (decisionLevel() == 0 && !simplify()) {
Debug("bvminisat::search") << OUTPUT_TAG << " base level conflict, we're unsat" << std::endl;
const Clause& ps = ps_smallest ? _qs : _ps;
const Clause& qs = ps_smallest ? _ps : _qs;
- for (int i = 0; i < qs.size(); i++){
- if (var(qs[i]) != v){
- for (int j = 0; j < ps.size(); j++)
- if (var(ps[j]) == var(qs[i]))
- if (ps[j] == ~qs[i])
- return false;
- else
- goto next;
- out_clause.push(qs[i]);
+ for (int i = 0; i < qs.size(); i++)
+ {
+ if (var(qs[i]) != v)
+ {
+ for (int j = 0; j < ps.size(); j++)
+ {
+ if (var(ps[j]) == var(qs[i]))
+ {
+ if (ps[j] == ~qs[i])
+ return false;
+ else
+ goto next;
+ }
}
- next:;
+ out_clause.push(qs[i]);
+ }
+ next:;
}
for (int i = 0; i < ps.size(); i++)
size = ps.size()-1;
- for (int i = 0; i < qs.size(); i++){
- if (var(__qs[i]) != v){
- for (int j = 0; j < ps.size(); j++)
- if (var(__ps[j]) == var(__qs[i]))
- if (__ps[j] == ~__qs[i])
- return false;
- else
- goto next;
- size++;
+ for (int i = 0; i < qs.size(); i++)
+ {
+ if (var(__qs[i]) != v)
+ {
+ for (int j = 0; j < ps.size(); j++)
+ {
+ if (var(__ps[j]) == var(__qs[i]))
+ {
+ if (__ps[j] == ~__qs[i])
+ return false;
+ else
+ goto next;
+ }
}
- next:;
+ size++;
+ }
+ next:;
}
return true;
check_type = CHECK_WITH_THEORY;
}
- if (nof_conflicts >= 0 && conflictC >= nof_conflicts ||
- !withinBudget(options::satConflictStep())) {
- // Reached bound on number of conflicts:
- progress_estimate = progressEstimate();
- cancelUntil(0);
- // [mdeters] notify theory engine of restarts for deferred
- // theory processing
- proxy->notifyRestart();
- return l_Undef;
+ if ((nof_conflicts >= 0 && conflictC >= nof_conflicts)
+ || !withinBudget(options::satConflictStep()))
+ {
+ // Reached bound on number of conflicts:
+ progress_estimate = progressEstimate();
+ cancelUntil(0);
+ // [mdeters] notify theory engine of restarts for deferred
+ // theory processing
+ proxy->notifyRestart();
+ return l_Undef;
}
// Simplify the set of problem clauses:
const Clause& ps = ps_smallest ? _qs : _ps;
const Clause& qs = ps_smallest ? _ps : _qs;
- for (int i = 0; i < qs.size(); i++){
- if (var(qs[i]) != v){
- for (int j = 0; j < ps.size(); j++)
- if (var(ps[j]) == var(qs[i]))
- if (ps[j] == ~qs[i])
- return false;
- else
- goto next;
- out_clause.push(qs[i]);
+ for (int i = 0; i < qs.size(); i++)
+ {
+ if (var(qs[i]) != v)
+ {
+ for (int j = 0; j < ps.size(); j++)
+ {
+ if (var(ps[j]) == var(qs[i]))
+ {
+ if (ps[j] == ~qs[i])
+ return false;
+ else
+ goto next;
+ }
}
- next:;
+ out_clause.push(qs[i]);
+ }
+ next:;
}
for (int i = 0; i < ps.size(); i++)
size = ps.size()-1;
- for (int i = 0; i < qs.size(); i++){
- if (var(__qs[i]) != v){
- for (int j = 0; j < ps.size(); j++)
- if (var(__ps[j]) == var(__qs[i]))
- if (__ps[j] == ~__qs[i])
- return false;
- else
- goto next;
- size++;
+ for (int i = 0; i < qs.size(); i++)
+ {
+ if (var(__qs[i]) != v)
+ {
+ for (int j = 0; j < ps.size(); j++)
+ {
+ if (var(__ps[j]) == var(__qs[i]))
+ {
+ if (__ps[j] == ~__qs[i])
+ return false;
+ else
+ goto next;
+ }
}
- next:;
+ size++;
+ }
+ next:;
}
return true;
}
Debug("constraints::wffp") << "final sum: " << lhs << " <= " << rhs << endl;
// 0 = lhs <= rhs < 0
- return
- (lhs.isNull() || Constant::isMember(lhs) && Constant(lhs).isZero() ) &&
- rhs.sgn() < 0;
+ return (lhs.isNull() || (Constant::isMember(lhs) && Constant(lhs).isZero()))
+ && rhs.sgn() < 0;
#else /* IS_PROOFS_BUILD */
return true;