Skip to content

Commit f97dd34

Browse files
tests
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent 938a89e commit f97dd34

File tree

6 files changed

+25
-11
lines changed

6 files changed

+25
-11
lines changed

src/ast/rewriter/seq_rewriter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -873,8 +873,8 @@ br_status seq_rewriter::mk_seq_length(expr* a, expr_ref& result) {
873873
m_autil.is_numeral(y, r) && r.is_zero() &&
874874
m_autil.is_numeral(z, r) && r >= 0) {
875875
expr* len_x = str().mk_length(x);
876-
expr* zero = m_autil.mk_int(0);
877876
result = m().mk_ite(m_autil.mk_le(len_x, z), len_x, z);
877+
// expr* zero = m_autil.mk_int(0);
878878
// result = m().mk_ite(m_autil.mk_le(z, zero), zero, result);
879879
return BR_REWRITE_FULL;
880880
}

src/math/lp/int_solver.cpp

+22-4
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,8 @@ namespace lp {
689689

690690
void int_solver::simplify(std::function<bool(unsigned)>& is_root) {
691691

692-
#if 0
692+
return;
693+
#if 1
693694

694695
// in-processing simplification can go here, such as bounds improvements.
695696

@@ -699,6 +700,20 @@ namespace lp {
699700
return;
700701
}
701702

703+
704+
#endif
705+
706+
#if 1
707+
lp::explanation exp;
708+
m_ex = &exp;
709+
m_t.clear();
710+
m_k.reset();
711+
712+
if (has_inf_int())
713+
local_gomory();
714+
#endif
715+
716+
#if 0
702717
stopwatch sw;
703718
explanation exp1, exp2;
704719

@@ -919,8 +934,7 @@ namespace lp {
919934
}
920935

921936
lia_move int_solver::local_gomory() {
922-
for (unsigned i = 0; i < 4; ++i) {
923-
937+
for (unsigned i = 0; i < 2 && has_inf_int() && !settings().get_cancel_flag(); ++i) {
924938
m_ex->clear();
925939
m_t.clear();
926940
m_k.reset();
@@ -939,11 +953,15 @@ namespace lp {
939953
lra.get_infeasibility_explanation(*m_ex);
940954
return lia_move::conflict;
941955
}
956+
//r = m_patcher();
957+
//if (r != lia_move::undef)
958+
// return r;
942959
}
943960
m_ex->clear();
944961
m_t.clear();
945962
m_k.reset();
946-
963+
if (!has_inf_int())
964+
return lia_move::sat;
947965
return lia_move::undef;
948966
}
949967

src/math/lp/nla_basics_lemmas.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ bool basics::basic_lemma_for_mon_neutral_derived(const monic& rm, const factoriz
331331
for (auto fc : f) {
332332
lpvar j = var(fc);
333333
all_int &= c().var_is_int(j);
334-
if (j == null_lpvar && abs(val(j)) == abs_mv &&
334+
if (u == null_lpvar && abs(val(j)) == abs_mv &&
335335
c().vars_are_equiv(j, mon_var) &&
336336
(mon_var_is_sep_from_zero || c().var_is_separated_from_zero(j)))
337337
u = j;

src/math/lp/nla_grobner.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ namespace nla {
100100
}
101101

102102
bool grobner::is_conflicting() {
103-
bool is_conflict = false;
104103
for (auto eq : m_solver.equations()) {
105104
if (is_conflicting(*eq)) {
106105
lp_settings().stats().m_grobner_conflicts++;
@@ -677,7 +676,6 @@ namespace nla {
677676
nex_creator& nc = m_nex_creator;
678677
nc.pop(0);
679678
nex_creator::sum_factory sum(nc);
680-
unsigned row_index = 0;
681679
u_map<nex_var*> var2nex;
682680
for (auto v : eq.poly().free_vars())
683681
var2nex.insert(v, nc.mk_var(v));

src/math/lp/nra_solver.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,9 @@ struct solver::imp {
286286

287287
bool check_constraint(unsigned idx) {
288288
auto& c = lra.constraints()[idx];
289-
auto& pm = m_nlsat->pm();
290289
auto k = c.kind();
291290
auto offset = -c.rhs();
292291
auto lhs = c.coeffs();
293-
auto sz = lhs.size();
294292

295293
scoped_anum val(am()), mon(am());
296294
am().set(val, offset.to_mpq());

src/smt/theory_lra.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ class theory_lra::imp {
10911091

10921092
void restart_eh() {
10931093
m_arith_eq_adapter.restart_eh();
1094-
#if 0
1094+
#if 1
10951095
// experiment
10961096
if (m_lia) {
10971097
std::function<bool(unsigned)> is_root = [&](unsigned j) {

0 commit comments

Comments
 (0)