mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 19:35:50 +00:00
add parameters to control grobner's explosure
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
7a2dc6e69e
commit
bb6511b425
8 changed files with 63 additions and 39 deletions
|
@ -152,7 +152,7 @@ namespace dd {
|
|||
s.push_equation(solver::to_simplify, dst);
|
||||
}
|
||||
// v has been eliminated.
|
||||
SASSERT(!dst->poly().free_vars().contains(v));
|
||||
// SASSERT(!dst->poly().free_vars().contains(v));
|
||||
add_to_use(dst, use_list);
|
||||
}
|
||||
if (all_reduced) {
|
||||
|
|
|
@ -70,26 +70,22 @@ namespace dd {
|
|||
}
|
||||
|
||||
|
||||
void solver::set_thresholds() {
|
||||
void solver::set_thresholds(unsigned eqs_growth, unsigned expr_size_growth, unsigned expr_degree_growth) {
|
||||
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_eqs_threshold = static_cast<unsigned>(eqs_growth * ceil(log(1 + 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) {
|
||||
m_config.m_expr_size_limit = std::max(m_config.m_expr_size_limit, (unsigned)e->poly().tree_size());
|
||||
m_config.m_expr_degree_limit = std::max(m_config.m_expr_degree_limit, e->poly().degree());
|
||||
}
|
||||
m_config.m_expr_size_limit *= 2;
|
||||
m_config.m_expr_degree_limit *= 2;
|
||||
m_config.m_expr_size_limit *= expr_size_growth;
|
||||
m_config.m_expr_degree_limit *= expr_degree_growth;;
|
||||
|
||||
IF_VERBOSE(3, verbose_stream() << "set m_config.m_eqs_threshold to 10 * " << 10 * ceil(log(m_to_simplify.size())) << "* " << m_to_simplify.size() << " = " << m_config.m_eqs_threshold << "\n";
|
||||
verbose_stream() << "set m_config.m_expr_size_limit to " << m_config.m_expr_size_limit << "\n";
|
||||
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;
|
||||
|
||||
}
|
||||
void solver::saturate() {
|
||||
|
|
|
@ -138,7 +138,7 @@ public:
|
|||
std::ostream& display_statistics(std::ostream& out) const;
|
||||
const stats& get_stats() const { return m_stats; }
|
||||
stats& get_stats() { return m_stats; }
|
||||
void set_thresholds();
|
||||
void set_thresholds(unsigned eqs_growth, unsigned expr_size_growth, unsigned expr_degree_growth);
|
||||
|
||||
private:
|
||||
bool step();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue