#include <stdbool.h>
#include "global.h"
Go to the source code of this file.
◆ kissat_find_and_gate()
| bool kissat_find_and_gate |
( |
struct kissat * | solver, |
|
|
unsigned | lit, |
|
|
unsigned | negative ) |
Definition at line 8 of file ands.c.
9 {
11 return false;
13 if (!marked)
14 return false;
15 if (marked < 2) {
17 return false;
18 }
19
20 unsigned not_lit =
NOT (
lit);
22
26
30 continue;
35 base = c;
37 if (other == not_lit)
38 continue;
42 base = 0;
43 break;
44 }
46 continue;
47 const unsigned not_other =
NOT (other);
48 signed char mark = marks[not_other];
50 continue;
51 base = 0;
52 break;
53 }
54 if (base)
55 break;
56 }
57 if (!base) {
59 return false;
60 }
61 LOGCLS (base,
"found and gate %s base clause",
LOGLIT (not_lit));
63 if (other == not_lit)
64 continue;
65 if (values[other])
66 continue;
67 const unsigned not_other =
NOT (other);
69 marks[not_other] = 0;
70 }
71 watch tmp = kissat_binary_watch (0);
75 continue;
78 if (marks[other]) {
79 marks[other] = 0;
80 continue;
81 }
84 }
85 tmp = kissat_large_watch (kissat_reference_clause (
solver, base));
89 return true;
90}
ABC_NAMESPACE_HEADER_START typedef word ward
ABC_NAMESPACE_IMPL_START typedef signed char value
void kissat_eliminate_clause(kissat *solver, clause *c, unsigned lit)
void kissat_unmark_binaries(kissat *solver, unsigned lit)
ABC_NAMESPACE_IMPL_START size_t kissat_mark_binaries(kissat *solver, unsigned lit)
#define GATE_ELIMINATED(...)
#define all_literals_in_clause(LIT, C)
#define KISSAT_assert(ignore)
ABC_NAMESPACE_HEADER_START typedef unsigned reference
#define all_binary_large_watches(WATCH, WATCHES)