mirror of
https://github.com/Z3Prover/z3
synced 2025-09-05 17:47:41 +00:00
Fix missing boolean propagation after boolean conflict
Usually in SAT solving, the conflict clause has at least two false literals at the max level (otherwise, the last literal would have been propagated at an earlier level). But here we are adding clauses on demand; so after backtracking we may have the case that the conflict clause has exactly one undefined literal that must be propagated explicitly.
This commit is contained in:
parent
783bd60598
commit
0d56edb65c
7 changed files with 66 additions and 20 deletions
|
@ -131,7 +131,7 @@ namespace polysat {
|
|||
/** conflict because the constraint c is false under current variable assignment */
|
||||
void init(signed_constraint c);
|
||||
/** boolean conflict with the given clause */
|
||||
void init(clause const& cl);
|
||||
void init(clause& cl);
|
||||
/** conflict because there is no viable value for the variable v, by interval reasoning */
|
||||
void init_by_viable_interval(pvar v);
|
||||
/** conflict because there is no viable value for the variable v, by fallback solver */
|
||||
|
@ -157,11 +157,14 @@ namespace polysat {
|
|||
/** Evaluate constraint under assignment and insert it into conflict state. */
|
||||
void insert_eval(signed_constraint c);
|
||||
|
||||
/** Add a side lemma to the conflict; to be learned in addition to the main lemma after conflict resolution finishes. */
|
||||
/** Add a lemma to the conflict, to be added after conflict resolution */
|
||||
void add_lemma(char const* name, std::initializer_list<signed_constraint> cs);
|
||||
void add_lemma(char const* name, signed_constraint const* cs, size_t cs_len);
|
||||
void add_lemma(char const* name, clause_ref lemma);
|
||||
|
||||
/** Re-add a lemma to the conflict that we were unable to add after the previous conflict. */
|
||||
void restore_lemma(clause_ref lemma);
|
||||
|
||||
/** Remove c from core */
|
||||
void remove(signed_constraint c);
|
||||
void remove_var(pvar v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue