mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
fix build for non C++11
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
46c911a92f
commit
0055254f4c
2 changed files with 36 additions and 36 deletions
|
@ -106,41 +106,41 @@ public:
|
|||
automaton_t* mk_product(automaton_t& a, automaton_t& b);
|
||||
|
||||
private:
|
||||
automaton_t* mk_determinstic_param(automaton_t& a, bool flip_acceptance);
|
||||
|
||||
vector<std::pair<vector<bool>, ref_t>> generate_min_terms(vector<ref_t> &constraints) {
|
||||
vector<std::pair<vector<bool>, ref_t>> min_terms;
|
||||
|
||||
ref_t curr_pred(m_ba.mk_true(), m);
|
||||
vector<bool> curr_bv;
|
||||
|
||||
generate_min_terms_rec(constraints, min_terms, 0, curr_bv, curr_pred);
|
||||
|
||||
return min_terms;
|
||||
}
|
||||
void generate_min_terms_rec(vector<ref_t> &constraints, vector<std::pair<vector<bool>, ref_t>> &min_terms, unsigned i, vector<bool> &curr_bv, ref_t &curr_pred) {
|
||||
lbool is_sat = m_ba.is_sat(curr_pred);
|
||||
if (is_sat != l_true) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (i == constraints.size()) {
|
||||
min_terms.push_back(std::pair<vector<bool>, ref_t>(curr_bv, curr_pred));
|
||||
}
|
||||
else {
|
||||
//true case
|
||||
curr_bv.push_back(true);
|
||||
ref_t new_pred_pos(m_ba.mk_and(curr_pred, constraints[i]), m);
|
||||
generate_min_terms_rec(constraints, min_terms, i + 1, curr_bv, new_pred_pos);
|
||||
curr_bv.pop_back();
|
||||
|
||||
//false case
|
||||
curr_bv.push_back(false);
|
||||
ref_t new_pred_neg(m_ba.mk_and(curr_pred, m_ba.mk_not(constraints[i])), m);
|
||||
generate_min_terms_rec(constraints, min_terms, i + 1, curr_bv, new_pred_neg);
|
||||
curr_bv.pop_back();
|
||||
}
|
||||
}
|
||||
automaton_t* mk_determinstic_param(automaton_t& a, bool flip_acceptance);
|
||||
|
||||
vector<std::pair<vector<bool>, ref_t> > generate_min_terms(vector<ref_t> &constraints) {
|
||||
vector<std::pair<vector<bool>, ref_t> > min_terms;
|
||||
|
||||
ref_t curr_pred(m_ba.mk_true(), m);
|
||||
vector<bool> curr_bv;
|
||||
|
||||
generate_min_terms_rec(constraints, min_terms, 0, curr_bv, curr_pred);
|
||||
|
||||
return min_terms;
|
||||
}
|
||||
void generate_min_terms_rec(vector<ref_t> &constraints, vector<std::pair<vector<bool>, ref_t> > &min_terms, unsigned i, vector<bool> &curr_bv, ref_t &curr_pred) {
|
||||
lbool is_sat = m_ba.is_sat(curr_pred);
|
||||
if (is_sat != l_true) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (i == constraints.size()) {
|
||||
min_terms.push_back(std::pair<vector<bool>, ref_t>(curr_bv, curr_pred));
|
||||
}
|
||||
else {
|
||||
//true case
|
||||
curr_bv.push_back(true);
|
||||
ref_t new_pred_pos(m_ba.mk_and(curr_pred, constraints[i]), m);
|
||||
generate_min_terms_rec(constraints, min_terms, i + 1, curr_bv, new_pred_pos);
|
||||
curr_bv.pop_back();
|
||||
|
||||
//false case
|
||||
curr_bv.push_back(false);
|
||||
ref_t new_pred_neg(m_ba.mk_and(curr_pred, m_ba.mk_not(constraints[i])), m);
|
||||
generate_min_terms_rec(constraints, min_terms, i + 1, curr_bv, new_pred_neg);
|
||||
curr_bv.pop_back();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -285,7 +285,7 @@ typename symbolic_automata<T, M>::automaton_t* symbolic_automata<T, M>::mk_compl
|
|||
|
||||
template<class T, class M>
|
||||
typename symbolic_automata<T, M>::automaton_t* symbolic_automata<T, M>::mk_determinstic_param(automaton_t& a, bool flip_acceptance = false) {
|
||||
vector<std::pair<vector<bool>, ref_t>> min_terms;
|
||||
vector<std::pair<vector<bool>, ref_t> > min_terms;
|
||||
vector<ref_t> predicates;
|
||||
|
||||
map<uint_set, unsigned, uint_set::hash, uint_set::eq> s2id; // set of states to unique id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue