3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-18 09:12:16 +00:00

move flatten functionality to asserted_formulas, sort variables in lut_finder

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-02-06 09:16:23 -08:00
parent 38d690650b
commit 8b23a1701a
9 changed files with 88 additions and 57 deletions

View file

@ -59,7 +59,13 @@ namespace sat {
s.init_visited();
unsigned mask = 0, i = 0;
m_vars.reset();
m_clause.reset();
for (literal l : c) {
m_clause.push_back(l);
}
// ensure that variables in returned LUT are sorted
std::sort(m_clause.begin(), m_clause.end());
for (literal l : m_clause) {
m_vars.push_back(l.var());
m_var_position[l.var()] = i;
s.mark_visited(l.var());
@ -67,7 +73,6 @@ namespace sat {
}
m_clauses_to_remove.reset();
m_clauses_to_remove.push_back(&c);
m_clause.resize(c.size());
m_combination = 0;
m_num_combinations = 0;
set_combination(mask);