mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
fix regression in get-consequence on QF_FD
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
80879ce58b
commit
629e981e01
5 changed files with 33 additions and 16 deletions
|
@ -190,18 +190,24 @@ struct blaster_rewriter_cfg : public default_rewriter_cfg {
|
|||
}
|
||||
}
|
||||
|
||||
unsigned m_keypos;
|
||||
unsigned m_keypos { 0 };
|
||||
|
||||
void start_rewrite() {
|
||||
m_keypos = m_keys.size();
|
||||
}
|
||||
|
||||
void end_rewrite(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits) {
|
||||
for (unsigned i = m_keypos; i < m_keys.size(); ++i) {
|
||||
const2bits.insert(m_keys[i].get(), m_values[i].get());
|
||||
}
|
||||
for (func_decl* f : m_newbits) newbits.push_back(f);
|
||||
|
||||
for (unsigned i = m_keypos; i < m_keys.size(); ++i)
|
||||
const2bits.insert(m_keys.get(i), m_values.get(i));
|
||||
for (func_decl* f : m_newbits)
|
||||
newbits.push_back(f);
|
||||
}
|
||||
|
||||
void get_translation(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits) {
|
||||
for (unsigned i = 0; i < m_keys.size(); ++i)
|
||||
const2bits.insert(m_keys.get(i), m_values.get(i));
|
||||
for (func_decl* f : m_newbits)
|
||||
newbits.push_back(f);
|
||||
}
|
||||
|
||||
template<typename V>
|
||||
|
@ -679,6 +685,7 @@ struct bit_blaster_rewriter::imp : public rewriter_tpl<blaster_rewriter_cfg> {
|
|||
void pop(unsigned s) { m_cfg.pop(s); }
|
||||
void start_rewrite() { m_cfg.start_rewrite(); }
|
||||
void end_rewrite(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits) { m_cfg.end_rewrite(const2bits, newbits); }
|
||||
void get_translation(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits) { m_cfg.get_translation(const2bits, newbits); }
|
||||
unsigned get_num_scopes() const { return m_cfg.get_num_scopes(); }
|
||||
};
|
||||
|
||||
|
@ -734,3 +741,7 @@ void bit_blaster_rewriter::start_rewrite() {
|
|||
void bit_blaster_rewriter::end_rewrite(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits) {
|
||||
m_imp->end_rewrite(const2bits, newbits);
|
||||
}
|
||||
|
||||
void bit_blaster_rewriter::get_translation(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits) {
|
||||
m_imp->get_translation(const2bits, newbits);
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ public:
|
|||
void cleanup();
|
||||
void start_rewrite();
|
||||
void end_rewrite(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits);
|
||||
void get_translation(obj_map<func_decl, expr*>& const2bits, ptr_vector<func_decl> & newbits);
|
||||
void operator()(expr * e, expr_ref & result, proof_ref & result_proof);
|
||||
void push();
|
||||
void pop(unsigned num_scopes);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue