mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 03:45:51 +00:00
use appropriate MaxSAT solver even if there are no soft constraints. Also avoid PB constraints when all soft constraints are false. Reported by Klaus Becker
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
b19fbe4429
commit
653416153d
2 changed files with 4 additions and 10 deletions
|
@ -159,12 +159,7 @@ namespace opt {
|
|||
symbol const& maxsat_engine = m_c.maxsat_engine();
|
||||
IF_VERBOSE(1, verbose_stream() << "(maxsmt)\n";);
|
||||
TRACE("opt", tout << "maxsmt\n";);
|
||||
if (m_soft_constraints.empty()) {
|
||||
TRACE("opt", tout << "no constraints\n";);
|
||||
m_msolver = 0;
|
||||
is_sat = s().check_sat(0, 0);
|
||||
}
|
||||
else if (maxsat_engine == symbol("maxres")) {
|
||||
if (m_soft_constraints.empty() || maxsat_engine == symbol("maxres")) {
|
||||
m_msolver = mk_maxres(m_c, m_weights, m_soft_constraints);
|
||||
}
|
||||
else if (maxsat_engine == symbol("pd-maxres")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue