3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 19:35:50 +00:00

Nikolaj implemented lm_lt on dd::pdd

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2020-01-09 09:57:19 -08:00
parent d1e9998332
commit d6a246777a
5 changed files with 224 additions and 92 deletions

View file

@ -70,9 +70,11 @@ namespace dd {
}
// some of the config fields are set, others are calculated
void solver::set_thresholds() {
IF_VERBOSE(3, verbose_stream() << "start saturate\n"; display_statistics(verbose_stream()));
if (m_to_simplify.size() == 0)
return;
m_config.m_eqs_threshold = static_cast<unsigned>(10 * ceil(log(m_to_simplify.size()))*m_to_simplify.size());
m_config.m_expr_size_limit = 0;
m_config.m_expr_degree_limit = 0;
for (equation* e: m_to_simplify) {
@ -87,9 +89,9 @@ namespace dd {
verbose_stream() << "set m_config.m_expr_degree_limit to " << m_config.m_expr_degree_limit << "\n";
);
m_config.m_max_steps = 700;
m_config.m_max_simplified = 7000;
m_config.m_max_simplified = 7000;
}
void solver::saturate() {
simplify();
init_saturate();

View file

@ -55,7 +55,6 @@ public:
unsigned m_max_simplified;
unsigned m_random_seed;
bool m_enable_exlin;
unsigned m_eqs_growth;
config() :
m_eqs_threshold(UINT_MAX),
m_expr_size_limit(UINT_MAX),
@ -154,7 +153,7 @@ private:
bool try_simplify_using(equation& target, equation const& source, bool& changed_leading_term);
bool is_trivial(equation const& eq) const { return eq.poly().is_zero(); }
bool is_simpler(equation const& eq1, equation const& eq2) { return eq1.poly() < eq2.poly(); }
bool is_simpler(equation const& eq1, equation const& eq2) { return m.lm_lt(eq1.poly(), eq2.poly()); }
bool is_conflict(equation const* eq) const { return is_conflict(*eq); }
bool is_conflict(equation const& eq) const { return eq.poly().is_val() && !is_trivial(eq); }
bool check_conflict(equation& eq) { return is_conflict(eq) && (set_conflict(eq), true); }