104 int first_literal_index;
126 ClauseIndex deleted_index = ClauseIndex(std::numeric_limits<int>::max());
130 std::vector<ClauseIndex> deleted_clauses;
133 bool is_needed_for_proof =
false;
137 bool tmp_is_needed_for_proof_step =
false;
139 Clause(
int first_literal_index,
int num_literals);
142 bool IsDeleted(ClauseIndex clause_index)
const;
151 struct LiteralToAssign {
159 ClauseIndex source_clause_index;
165 explicit ClauseHash(
DratChecker* checker) : checker(checker) {}
166 std::size_t operator()(ClauseIndex clause_index)
const;
172 explicit ClauseEquiv(
DratChecker* checker) : checker(checker) {}
173 bool operator()(ClauseIndex clause_index1, ClauseIndex clause_index2)
const;
177 ClauseIndex AddClause(absl::Span<const Literal> clause);
180 void RemoveLastClause();
183 absl::Span<const Literal> Literals(
const Clause& clause)
const;
189 void WatchClause(ClauseIndex clause_index);
196 bool HasRupProperty(ClauseIndex num_clauses,
197 absl::Span<const Literal> clause);
207 ClauseIndex AssignAndPropagate(ClauseIndex num_clauses, Literal literal,
208 ClauseIndex source_clause_index);
215 void MarkAsNeededForProof(Clause* clause);
220 std::vector<std::vector<Literal>> GetClausesNeededForProof(
221 ClauseIndex begin, ClauseIndex end)
const;
223 void LogStatistics(int64_t duration_nanos)
const;
227 ClauseIndex first_infered_clause_index_;
230 util_intops::StrongVector<ClauseIndex, Clause> clauses_;
236 absl::flat_hash_set<ClauseIndex, ClauseHash, ClauseEquiv> clause_set_;
239 std::vector<Literal> literals_;
249 std::vector<Literal> assigned_;
252 VariablesAssignment assignment_;
257 util_intops::StrongVector<BooleanVariable, ClauseIndex> assignment_source_;
266 std::vector<LiteralToAssign> high_priority_literals_to_assign_;
270 std::vector<LiteralToAssign> low_priority_literals_to_assign_;
280 util_intops::StrongVector<LiteralIndex, std::vector<ClauseIndex>>
286 std::vector<ClauseIndex> single_literal_clauses_;
290 std::vector<ClauseIndex> unit_stack_;
293 VariablesAssignment tmp_assignment_;