File tree 4 files changed +9
-27
lines changed
4 files changed +9
-27
lines changed Original file line number Diff line number Diff line change @@ -1556,9 +1556,6 @@ lbool core::check() {
1556
1556
1557
1557
if (no_effect ())
1558
1558
m_monomial_bounds.propagate ();
1559
-
1560
- if (no_effect () && improve_bounds ())
1561
- return l_false;
1562
1559
1563
1560
{
1564
1561
std::function<void (void )> check1 = [&]() { if (no_effect () && run_horner) m_horner.horner_lemmas (); };
@@ -1793,35 +1790,17 @@ void core::set_use_nra_model(bool m) {
1793
1790
1794
1791
void core::collect_statistics (::statistics & st) {
1795
1792
}
1796
-
1797
- bool core::improve_bounds () {
1798
- return false ;
1799
-
1800
- uint_set seen;
1801
- bool bounds_improved = false ;
1802
- auto insert = [&](lpvar v) {
1803
- if (seen.contains (v))
1804
- return ;
1805
- seen.insert (v);
1806
- if (lra.improve_bound (v, false ))
1807
- bounds_improved = true , lp_settings ().stats ().m_nla_bounds_improvements ++;
1808
- if (lra.improve_bound (v, true ))
1809
- bounds_improved = true , lp_settings ().stats ().m_nla_bounds_improvements ++;
1810
- };
1811
- for (auto & m : m_emons) {
1812
- insert (m.var ());
1813
- for (auto v : m.vars ())
1814
- insert (v);
1815
- }
1816
- return bounds_improved;
1817
- }
1818
1793
1819
1794
void core::propagate () {
1820
1795
clear ();
1821
1796
m_monomial_bounds.unit_propagate ();
1822
1797
m_monics_with_changed_bounds.reset ();
1823
1798
}
1824
1799
1800
+ void core::simplify () {
1801
+ // in-processing simplifiation can go here, such as bounds improvements.
1802
+ }
1803
+
1825
1804
1826
1805
1827
1806
} // end of nla
Original file line number Diff line number Diff line change @@ -104,8 +104,6 @@ class core {
104
104
105
105
void check_weighted (unsigned sz, std::pair<unsigned , std::function<void (void )>>* checks);
106
106
void add_bounds ();
107
- // try to improve bounds for variables in monomials.
108
- bool improve_bounds ();
109
107
110
108
public:
111
109
// constructor
@@ -386,6 +384,8 @@ class core {
386
384
bool no_lemmas_hold () const ;
387
385
388
386
void propagate ();
387
+
388
+ void simplify ();
389
389
390
390
lbool test_check ();
391
391
lpvar map_to_root (lpvar) const ;
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ namespace nla {
38
38
bool need_check ();
39
39
lbool check ();
40
40
void propagate ();
41
+ void simplify () { m_core->simplify (); }
41
42
lbool check_power (lpvar r, lpvar x, lpvar y);
42
43
bool is_monic_var (lpvar) const ;
43
44
bool influences_nl_var (lpvar) const ;
Original file line number Diff line number Diff line change @@ -1091,6 +1091,8 @@ class theory_lra::imp {
1091
1091
1092
1092
void restart_eh () {
1093
1093
m_arith_eq_adapter.restart_eh ();
1094
+ if (m_nla)
1095
+ m_nla->simplify ();
1094
1096
}
1095
1097
1096
1098
void relevant_eh (app* n) {
You can’t perform that action at this time.
0 commit comments