3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-06 11:20:26 +00:00

consolidate throttling

This commit is contained in:
Lev Nachmanson 2025-06-26 11:58:06 -07:00 committed by Lev Nachmanson
parent f32066762c
commit 832cfb3c41
5 changed files with 148 additions and 0 deletions

View file

@ -28,6 +28,7 @@
#include "math/lp/nla_intervals.h"
#include "nlsat/nlsat_solver.h"
#include "params/smt_params_helper.hpp"
#include "math/lp/nla_throttle.h"
namespace nra {
class solver;
@ -102,6 +103,9 @@ class core {
lpvar m_patched_var = 0;
monic const* m_patched_monic = nullptr;
nla_throttle m_throttle;
bool m_throttle_enabled = true;
void check_weighted(unsigned sz, std::pair<unsigned, std::function<void(void)>>* checks);
@ -432,6 +436,11 @@ public:
void add_fixed_equality(lp::lpvar v, rational const& k, lp::explanation const& e) { m_fixed_equalities.push_back({v, k, e}); }
void add_equality(lp::lpvar i, lp::lpvar j, lp::explanation const& e) { m_equalities.push_back({i, j, e}); }
void set_throttle_enabled(bool enabled) { m_throttle_enabled = enabled; m_throttle.set_enabled(enabled); }
bool throttle_enabled() const { return m_throttle_enabled; }
nla_throttle& throttle() { return m_throttle; }
const nla_throttle& throttle() const { return m_throttle; }
}; // end of core
struct pp_mon {