3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-27 08:28:44 +00:00

check pb solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-02-28 14:28:03 -08:00
parent e76cea4684
commit a2dddbd7a5
3 changed files with 8 additions and 31 deletions

View file

@ -191,20 +191,14 @@ namespace sat {
// PB parameters // PB parameters
s = p.pb_solver(); s = p.pb_solver();
if (s == symbol("circuit")) if (s != symbol("circuit") &&
m_pb_solver = PB_CIRCUIT; s != symbol("sorting") &&
else if (s == symbol("sorting")) s != symbol("totalizer") &&
m_pb_solver = PB_SORTING; s != symbol("solver") &&
else if (s == symbol("totalizer")) s != symbol("segmented") &&
m_pb_solver = PB_TOTALIZER; s != symbol("binary_merge")) {
else if (s == symbol("solver"))
m_pb_solver = PB_SOLVER;
else if (s == symbol("segmented"))
m_pb_solver = PB_SEGMENTED;
else if (s == symbol("binary_merge"))
m_pb_solver == PB_BINARY_MERGE;
else
throw sat_param_exception("invalid PB solver: solver, totalizer, circuit, sorting, segmented, binary_merge"); throw sat_param_exception("invalid PB solver: solver, totalizer, circuit, sorting, segmented, binary_merge");
}
s = p.pb_resolve(); s = p.pb_resolve();
if (s == "cardinality") if (s == "cardinality")

View file

@ -52,15 +52,6 @@ namespace sat {
BH_LRB BH_LRB
}; };
enum pb_solver {
PB_SOLVER,
PB_CIRCUIT,
PB_SORTING,
PB_TOTALIZER,
PB_SEGMENTED,
PB_BINARY_MERGE
};
enum pb_resolve { enum pb_resolve {
PB_CARDINALITY, PB_CARDINALITY,
PB_ROUNDING PB_ROUNDING
@ -183,9 +174,6 @@ namespace sat {
void updt_params(params_ref const & p); void updt_params(params_ref const & p);
static void collect_param_descrs(param_descrs & d); static void collect_param_descrs(param_descrs & d);
private:
pb_solver m_pb_solver;
}; };
}; };

View file

@ -221,12 +221,7 @@ namespace sat {
void model_converter::add_elim_stack(entry & e) { void model_converter::add_elim_stack(entry & e) {
e.m_elim_stack.push_back(stackv().empty() ? nullptr : alloc(elim_stack, stackv())); e.m_elim_stack.push_back(stackv().empty() ? nullptr : alloc(elim_stack, stackv()));
#if 0 VERIFY(for (auto const& s : stackv()) VERIFY(legal_to_flip(s.second.var())));
if (!stackv().empty() && e.get_kind() == ATE) {
IF_VERBOSE(0, display(verbose_stream(), e) << "\n");
}
#endif
for (auto const& s : stackv()) VERIFY(legal_to_flip(s.second.var()));
stackv().reset(); stackv().reset();
} }