Skip to content

Commit d90b94d

Browse files
committed
stricter is_in_sync paying attenion to m_row2fresh_defs
Signed-off-by: Lev Nachmanson <[email protected]>
1 parent 134bed8 commit d90b94d

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/math/lp/dioph_eq.cpp

+14-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@
2424
-- m_k2s: when the variable k is substituted in the row s of m_e_matrix, the pair (k,s) is added to m_k2s.
2525
m_k2s is a one to one mapping.
2626
-- m_fresh_k2xt_terms: when a fresh definitions is created for a variable k, then the triple
27-
(k,xt,t) is added to m_fresh_k2xt_terms, where xt is the fresh variable, and xt t it the term defining the substitution: something like k - xt + 5z + 6y = 0.
27+
(k,xt,t) is added to m_fresh_k2xt_terms, where xt is the fresh variable, and t it the term defining the substitution: something like k - xt + 5z + 6y = 0.
2828
The set of pairs (k, xt) is a one to one mapping
29-
m_fresh_definitions[i]: is the list of all xt that were defined for row m_e_matrix[i]
29+
m_row2fresh_defs[i]: is the list of all xt that were defined for row m_e_matrix[i].
30+
Invariant: Every xt in m_row2resh[i] must have a corresponding entry in m_fresh_k2xt_terms
3031
3132
The mapping between the columns of lar_solver and m_e_matrix is controlled by m_var_register.
3233
local_to_lar_solver(lar_solver_to_local(j)) == j. If local_to_lar_solver(j) == -1
@@ -1940,6 +1941,16 @@ namespace lp {
19401941
}
19411942
}
19421943

1944+
for (unsigned ei = 0; ei < m_e_matrix.row_count(); ei++ ) {
1945+
auto it = m_row2fresh_defs.find(ei);
1946+
if (it != m_row2fresh_defs.end()) {
1947+
for (unsigned xt: it->second) {
1948+
if (!m_fresh_k2xt_terms.has_second_key(xt))
1949+
return false;
1950+
}
1951+
}
1952+
}
1953+
19431954
return columns_to_terms_is_correct();
19441955
}
19451956

@@ -2158,6 +2169,7 @@ namespace lp {
21582169
print_term_o(fix_vars(open_ml(m_l_matrix.m_rows[ei])), tout) << std::endl;
21592170
}
21602171
);
2172+
21612173
return ret;
21622174
}
21632175

0 commit comments

Comments
 (0)