From 097a25ebfe262353458e8629305a3c78c0dc72b2 Mon Sep 17 00:00:00 2001 From: Lev Nachmanson Date: Tue, 13 Aug 2024 12:25:34 -1000 Subject: [PATCH] add parameter to control calling diophantine equations Signed-off-by: Lev Nachmanson --- src/math/lp/int_solver.cpp | 1 + src/math/lp/lp_settings.cpp | 1 + src/math/lp/lp_settings.h | 1 + src/smt/params/smt_params_helper.pyg | 1 + 4 files changed, 4 insertions(+) diff --git a/src/math/lp/int_solver.cpp b/src/math/lp/int_solver.cpp index f547ba274..bdc5d8ab6 100644 --- a/src/math/lp/int_solver.cpp +++ b/src/math/lp/int_solver.cpp @@ -195,6 +195,7 @@ namespace lp { ++m_number_of_calls; if (r == lia_move::undef && m_patcher.should_apply()) r = m_patcher(); if (r == lia_move::undef && should_find_cube()) r = int_cube(*this)(); + // if (r == lia_move::undef && should_solve_dioph_eq()) r = solve_dioph_eq(); if (r == lia_move::undef) lra.move_non_basic_columns_to_bounds(); if (r == lia_move::undef && should_hnf_cut()) r = hnf_cut(); diff --git a/src/math/lp/lp_settings.cpp b/src/math/lp/lp_settings.cpp index b72b837fd..0048f8079 100644 --- a/src/math/lp/lp_settings.cpp +++ b/src/math/lp/lp_settings.cpp @@ -32,4 +32,5 @@ void lp::lp_settings::updt_params(params_ref const& _p) { report_frequency = p.arith_rep_freq(); m_simplex_strategy = static_cast(p.arith_simplex_strategy()); m_nlsat_delay = p.arith_nl_delay(); + m_dioph_eq = p.arith_lp_dioph_eq(); } diff --git a/src/math/lp/lp_settings.h b/src/math/lp/lp_settings.h index d0c388282..63646bc4a 100644 --- a/src/math/lp/lp_settings.h +++ b/src/math/lp/lp_settings.h @@ -228,6 +228,7 @@ private: bool m_enable_hnf = true; bool m_print_external_var_name = false; bool m_propagate_eqs = false; + bool m_dioph_eq = false; public: bool print_external_var_name() const { return m_print_external_var_name; } bool propagate_eqs() const { return m_propagate_eqs;} diff --git a/src/smt/params/smt_params_helper.pyg b/src/smt/params/smt_params_helper.pyg index afea0e446..47a249f25 100644 --- a/src/smt/params/smt_params_helper.pyg +++ b/src/smt/params/smt_params_helper.pyg @@ -57,6 +57,7 @@ def_module_params(module_name='smt', ('bv.solver', UINT, 0, 'bit-vector solver engine: 0 - bit-blasting, 1 - polysat, 2 - intblast, requires sat.smt=true'), ('arith.random_initial_value', BOOL, False, 'use random initial values in the simplex-based procedure for linear arithmetic'), ('arith.solver', UINT, 6, 'arithmetic solver: 0 - no solver, 1 - bellman-ford based solver (diff. logic only), 2 - simplex based solver, 3 - floyd-warshall based solver (diff. logic only) and no theory combination 4 - utvpi, 5 - infinitary lra, 6 - lra solver'), + ('arith.lp.dioph_eq', BOOL, True, 'use Diophantine equalities'), ('arith.nl', BOOL, True, '(incomplete) nonlinear arithmetic support based on Groebner basis and interval propagation, relevant only if smt.arith.solver=2'), ('arith.nl.nra', BOOL, True, 'call nra_solver when incremental linearization does not produce a lemma, this option is ignored when arith.nl=false, relevant only if smt.arith.solver=6'), ('arith.nl.branching', BOOL, True, 'branching on integer variables in non linear clusters'),