3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-29 15:37:58 +00:00

move lp_params to smt_params_helper

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2020-02-10 11:25:54 -08:00
parent 514c3d7a3b
commit 26eb23c05b
6 changed files with 24 additions and 35 deletions

View file

@ -70,6 +70,14 @@ def_module_params(module_name='smt',
('arith.greatest_error_pivot', BOOL, False, 'Pivoting strategy'),
('arith.eager_eq_axioms', BOOL, True, 'eager equality axioms'),
('arith.auto_config_simplex', BOOL, False, 'force simplex solver in auto_config'),
('arith.rep_freq', UINT, 0, 'the report frequency, in how many iterations print the cost and other info'),
('arith.min', BOOL, False, 'minimize cost'),
('arith.print_stats', BOOL, False, 'print statistic'),
('arith.simplex_strategy', UINT, 0, 'simplex strategy for the solver'),
('arith.enable_hnf', BOOL, True, 'enable hnf (Hermite Normal Form) cuts'),
('arith.bprop_on_pivoted_rows', BOOL, True, 'propagate bounds on rows changed by the pivot operation'),
('arith.nla', BOOL, True, 'call nonlinear integer solver with incremental linearization'),
('arith.print_ext_var_names', BOOL, False, 'print external variable names'),
('pb.conflict_frequency', UINT, 1000, 'conflict frequency for Pseudo-Boolean theory'),
('pb.learn_complements', BOOL, True, 'learn complement literals for Pseudo-Boolean theory'),
('array.weak', BOOL, False, 'weak array theory'),

View file

@ -16,7 +16,7 @@ Author:
Notes:
--*/
#include "math/lp/lp_params.hpp"
#include "util/debug.h"
#include "ast/rewriter/rewriter_types.h"
#include "ast/ast_util.h"
#include "smt/smt_kernel.h"
@ -91,7 +91,6 @@ public:
r.insert("candidate_models", CPK_BOOL, "(default: false) create candidate models even when quantifier or theory reasoning is incomplete.");
r.insert("fail_if_inconclusive", CPK_BOOL, "(default: true) fail if found unsat (sat) for under (over) approximated goal.");
smt_params_helper::collect_param_descrs(r);
lp_params::collect_param_descrs(r);
}

View file

@ -26,8 +26,6 @@
#include "math/lp/lar_solver.h"
#include "util/nat_set.h"
#include "util/optional.h"
#include "math/lp/lp_params.hpp"
#include "math/lp/nla_params.hpp"
#include "util/inf_rational.h"
#include "util/cancel_eh.h"
#include "util/scoped_timer.h"
@ -390,15 +388,15 @@ class theory_lra::imp {
get_zero(true);
get_zero(false);
lp_params lpar(ctx().get_params());
smt_params_helper lpar(ctx().get_params());
lp().settings().set_resource_limit(m_resource_limit);
lp().settings().simplex_strategy() = static_cast<lp::simplex_strategy_enum>(lpar.simplex_strategy());
lp().settings().simplex_strategy() = static_cast<lp::simplex_strategy_enum>(lpar.arith_simplex_strategy());
lp().settings().bound_propagation() = BP_NONE != propagation_mode();
lp().settings().m_enable_hnf = lpar.enable_hnf();
lp().settings().m_print_external_var_name = lpar.print_ext_var_names();
lp().set_track_pivoted_rows(lpar.bprop_on_pivoted_rows());
lp().settings().report_frequency = lpar.rep_freq();
lp().settings().print_statistics = lpar.print_stats();
lp().settings().m_enable_hnf = lpar.arith_enable_hnf();
lp().settings().m_print_external_var_name = lpar.arith_print_ext_var_names();
lp().set_track_pivoted_rows(lpar.arith_bprop_on_pivoted_rows());
lp().settings().report_frequency = lpar.arith_rep_freq();
lp().settings().print_statistics = lpar.arith_print_stats();
// todo : do not use m_arith_branch_cut_ratio for deciding on cheap cuts
unsigned branch_cut_ratio = ctx().get_fparams().m_arith_branch_cut_ratio;
@ -406,7 +404,7 @@ class theory_lra::imp {
lp().settings().m_int_run_gcd_test = ctx().get_fparams().m_arith_gcd_test;
lp().settings().set_random_seed(ctx().get_fparams().m_random_seed);
m_switcher.m_use_nla = m_use_nla = lpar.nla();
m_switcher.m_use_nla = m_use_nla = lpar.arith_nla();
m_lia = alloc(lp::int_solver, *m_solver.get());
get_one(true);
get_zero(true);