35 LOG (
"checking that all clauses contain a negative literal");
45 bool satisfied =
false, found_negative_literal =
false;
46 for (
const auto &
lit : *c) {
47 const signed char tmp =
val (
lit);
56 found_negative_literal =
true;
61 LOG (c,
"found purely positively");
64 VERBOSE (1,
"all clauses contain a negative literal");
65 for (
auto idx :
vars) {
74 LOG (
"propagation failed including redundant clauses");
77 stats.lucky.constant.zero++;
82 LOG (
"checking that all clauses contain a positive literal");
92 bool satisfied =
false, found_positive_literal =
false;
93 for (
const auto &
lit : *c) {
94 const signed char tmp =
val (
lit);
103 found_positive_literal =
true;
108 LOG (c,
"found purely negatively");
111 VERBOSE (1,
"all clauses contain a positive literal");
112 for (
auto idx :
vars) {
121 LOG (
"propagation failed including redundant clauses");
124 stats.lucky.constant.one++;
147 LOG (
"lucky inconsistency backward assigning to true");
155 LOG (
"checking increasing variable index false assignment");
159 for (
auto idx :
vars) {
173 VERBOSE (1,
"forward assuming variables false satisfies formula");
175 stats.lucky.forward.zero++;
180 LOG (
"checking increasing variable index true assignment");
184 for (
auto idx :
vars) {
198 VERBOSE (1,
"forward assuming variables true satisfies formula");
200 stats.lucky.forward.one++;
207 LOG (
"checking decreasing variable index false assignment");
211 for (
int idx =
max_var; idx > 0; idx--) {
225 VERBOSE (1,
"backward assuming variables false satisfies formula");
227 stats.lucky.backward.zero++;
232 LOG (
"checking decreasing variable index true assignment");
236 for (
int idx =
max_var; idx > 0; idx--) {
250 VERBOSE (1,
"backward assuming variables true satisfies formula");
252 stats.lucky.backward.one++;
265 LOG (
"checking that all clauses are positive horn satisfiable");
268 for (
const auto &c :
clauses) {
275 int positive_literal = 0;
277 for (
const auto &
lit : *c) {
278 const signed char tmp =
val (
lit);
287 positive_literal =
lit;
292 if (!positive_literal) {
293 LOG (c,
"no positive unassigned literal in");
297 LOG (c,
"found positive literal %d in", positive_literal);
301 LOG (
"propagation of positive literal %d leads to conflict",
305 for (
auto idx :
vars) {
313 LOG (
"propagation of remaining literal %d leads to conflict", -idx);
316 VERBOSE (1,
"clauses are positive horn satisfied");
319 stats.lucky.horn.positive++;
324 LOG (
"checking that all clauses are negative horn satisfiable");
327 for (
const auto &c :
clauses) {
334 int negative_literal = 0;
336 for (
const auto &
lit : *c) {
337 const signed char tmp =
val (
lit);
346 negative_literal =
lit;
351 if (!negative_literal) {
354 LOG (c,
"no negative unassigned literal in");
358 LOG (c,
"found negative literal %d in", negative_literal);
362 LOG (
"propagation of negative literal %d leads to conflict",
366 for (
auto idx :
vars) {
374 LOG (
"propagation of remaining literal %d leads to conflict", idx);
377 VERBOSE (1,
"clauses are negative horn satisfied");
380 stats.lucky.horn.negative++;
404 const int64_t active_before =
stats.active;
423 stats.lucky.succeeded++;
427 const int64_t units = active_before -
stats.active;
430 LOG (
"lucky %zd units", units);
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
#define CADICAL_assert(ignore)
int forward_false_satisfiable()
int positive_horn_satisfiable()
int backward_false_satisfiable()
int forward_true_satisfiable()
bool searching_lucky_phases
void report(char type, int verbose_level=0)
int backward_true_satisfiable()
int negative_horn_satisfiable()
bool terminated_asynchronously(int factor=1)
void search_assume_decision(int decision)
signed char val(int lit) const
bool lucky_propagate_discrepency(int)
vector< int > assumptions
void backtrack(int target_level=0)
vector< Clause * > clauses
void require_mode(Mode m) const
int trivially_true_satisfiable()
int trivially_false_satisfiable()
volatile bool termination_forced