|
24 | 24 | -- 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.
|
25 | 25 | m_k2s is a one to one mapping.
|
26 | 26 | -- 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. |
28 | 28 | 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 |
30 | 31 |
|
31 | 32 | The mapping between the columns of lar_solver and m_e_matrix is controlled by m_var_register.
|
32 | 33 | local_to_lar_solver(lar_solver_to_local(j)) == j. If local_to_lar_solver(j) == -1
|
@@ -1940,6 +1941,16 @@ namespace lp {
|
1940 | 1941 | }
|
1941 | 1942 | }
|
1942 | 1943 |
|
| 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 | + |
1943 | 1954 | return columns_to_terms_is_correct();
|
1944 | 1955 | }
|
1945 | 1956 |
|
@@ -2158,6 +2169,7 @@ namespace lp {
|
2158 | 2169 | print_term_o(fix_vars(open_ml(m_l_matrix.m_rows[ei])), tout) << std::endl;
|
2159 | 2170 | }
|
2160 | 2171 | );
|
| 2172 | + |
2161 | 2173 | return ret;
|
2162 | 2174 | }
|
2163 | 2175 |
|
|
0 commit comments