21 #ifndef OR_TOOLS_SAT_SAT_INPROCESSING_H_
22 #define OR_TOOLS_SAT_SAT_INPROCESSING_H_
44 absl::Span<const Literal> clause);
97 blocked_clause_simplifier_(
99 bounded_variable_elimination_(
145 double total_dtime_ = 0.0;
154 int64 last_num_redundant_literals_ = 0;
155 int64 last_num_fixed_variables_ = 0;
198 return first_stamps_[
a.Index()] < first_stamps_[
b.Index()] &&
199 last_stamps_[
b.Index()] < last_stamps_[
a.Index()];
212 bool stamps_are_already_computed_ =
false;
216 int64 num_subsumed_clauses_ = 0;
217 int64 num_removed_literals_ = 0;
218 int64 num_fixed_ = 0;
226 std::vector<LiteralIndex> children_;
230 std::vector<LiteralIndex> dfs_stack_;
260 void InitializeForNewRound();
261 void ProcessLiteral(
Literal current_literal);
262 bool ClauseIsBlocked(
Literal current_literal,
263 absl::Span<const Literal> clause);
272 int32 num_blocked_clauses_ = 0;
273 int64 num_inspected_literals_ = 0;
281 std::deque<Literal> queue_;
285 DEFINE_INT_TYPE(ClauseIndex,
int32);
294 : parameters_(*
model->GetOrCreate<SatParameters>()),
305 int NumClausesContaining(
Literal l);
306 void UpdatePriorityQueue(BooleanVariable
var);
307 bool CrossProduct(BooleanVariable
var);
308 void DeleteClause(
SatClause* sat_clause);
310 void AddClause(absl::Span<const Literal> clause);
319 template <
bool score_only,
bool with_binary_only>
320 bool ResolveAllClauseContaining(
Literal lit);
322 const SatParameters& parameters_;
330 int propagation_index_;
333 int64 num_inspected_literals_ = 0;
334 int64 num_simplifications_ = 0;
335 int64 num_blocked_clauses_ = 0;
336 int64 num_eliminated_variables_ = 0;
337 int64 num_literals_diff_ = 0;
338 int64 num_clauses_diff_ = 0;
341 int64 score_threshold_;
345 std::vector<Literal> resolvant_;
349 struct VariableWithPriority {
354 int Index()
const {
return var.value(); }
355 bool operator<(
const VariableWithPriority& o)
const {
356 return priority < o.priority;
359 IntegerPriorityQueue<VariableWithPriority> queue_;
363 std::vector<BooleanVariable> need_to_be_updated_;
368 DEFINE_INT_TYPE(ClauseIndex,
int32);
378 #endif // OR_TOOLS_SAT_SAT_INPROCESSING_H_