3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 03:45:51 +00:00

refactor weighted-maxsat into separate files

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-07-28 08:31:57 -07:00
parent 9f1b2ccfc4
commit 4ab27eff78
20 changed files with 2179 additions and 1446 deletions

View file

@ -22,7 +22,13 @@ Notes:
#include "fu_malik.h"
#include "core_maxsat.h"
#include "maxres.h"
#include "weighted_maxsat.h"
#include "dual_maxres.h"
#include "maxhs.h"
#include "bcd2.h"
#include "wpm2.h"
#include "pbmax.h"
#include "wmax.h"
#include "maxsls.h"
#include "ast_pp.h"
#include "opt_params.hpp"
#include "pb_decl_plugin.h"
@ -173,6 +179,9 @@ namespace opt {
else if (m_maxsat_engine == symbol("maxres")) {
m_msolver = mk_maxres(m, s, m_params, m_weights, m_soft_constraints);
}
else if (m_maxsat_engine == symbol("dual-maxres")) {
m_msolver = mk_dual_maxres(m, s, m_params, m_weights, m_soft_constraints);
}
else if (m_maxsat_engine == symbol("pbmax")) {
m_msolver = mk_pbmax(m, s, m_params, m_weights, m_soft_constraints);
}
@ -182,8 +191,8 @@ namespace opt {
else if (m_maxsat_engine == symbol("bcd2")) {
m_msolver = mk_bcd2(m, s, m_params, m_weights, m_soft_constraints);
}
else if (m_maxsat_engine == symbol("hsmax")) {
m_msolver = mk_hsmax(m, s, m_params, m_weights, m_soft_constraints);
else if (m_maxsat_engine == symbol("maxhs")) {
m_msolver = mk_maxhs(m, s, m_params, m_weights, m_soft_constraints);
}
else if (m_maxsat_engine == symbol("sls")) {
// NB: this is experimental one-round version of SLS
@ -196,7 +205,7 @@ namespace opt {
m_msolver = alloc(fu_malik, m, *m_s, m_soft_constraints);
}
else {
if (m_maxsat_engine != symbol::null) {
if (m_maxsat_engine != symbol::null && m_maxsat_engine != symbol("wmax")) {
warning_msg("solver %s is not recognized, using default 'wmax'",
m_maxsat_engine.str().c_str());
}