mirror of
https://github.com/Z3Prover/z3
synced 2026-01-21 01:24:43 +00:00
Don't call assign_eh for internal constraints
This commit is contained in:
parent
c1f9a26f09
commit
0c44391b9e
3 changed files with 22 additions and 9 deletions
|
|
@ -62,6 +62,10 @@ namespace polysat {
|
|||
}
|
||||
|
||||
lbool solver::check_sat() {
|
||||
#ifndef NDEBUG
|
||||
SASSERT(!m_is_solving);
|
||||
flet<bool> save_(m_is_solving, true);
|
||||
#endif
|
||||
LOG("Starting");
|
||||
while (should_search()) {
|
||||
m_stats.m_num_iterations++;
|
||||
|
|
@ -136,6 +140,8 @@ namespace polysat {
|
|||
}
|
||||
|
||||
void solver::assign_eh(signed_constraint c, dependency dep) {
|
||||
// This method is part of the external interface and should not be used to create internal constraints during solving.
|
||||
SASSERT(!m_is_solving);
|
||||
backjump(base_level());
|
||||
SASSERT(at_base_level());
|
||||
SASSERT(c);
|
||||
|
|
@ -184,8 +190,8 @@ namespace polysat {
|
|||
if (!can_propagate())
|
||||
return;
|
||||
#ifndef NDEBUG
|
||||
SASSERT(!m_propagating);
|
||||
flet<bool> save_(m_propagating, true);
|
||||
SASSERT(!m_is_propagating);
|
||||
flet<bool> save_(m_is_propagating, true);
|
||||
#endif
|
||||
push_qhead();
|
||||
while (can_propagate()) {
|
||||
|
|
@ -1152,6 +1158,11 @@ namespace polysat {
|
|||
}
|
||||
}
|
||||
|
||||
void solver::add_clause(signed_constraint c1, bool is_redundant) {
|
||||
signed_constraint cs[1] = { c1 };
|
||||
add_clause(1, cs, is_redundant);
|
||||
}
|
||||
|
||||
void solver::add_clause(signed_constraint c1, signed_constraint c2, bool is_redundant) {
|
||||
signed_constraint cs[2] = { c1, c2 };
|
||||
add_clause(2, cs, is_redundant);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue