mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 19:35:50 +00:00
fix #4879
This commit is contained in:
parent
0643e7c0fc
commit
f71204c222
4 changed files with 68 additions and 61 deletions
|
@ -1375,7 +1375,7 @@ namespace datalog {
|
|||
th_rewriter & m_simp;
|
||||
app_ref m_condition;
|
||||
expr_free_vars m_free_vars;
|
||||
expr_ref_vector m_args;
|
||||
mutable expr_ref_vector m_args;
|
||||
public:
|
||||
default_table_filter_interpreted_fn(context & ctx, unsigned col_cnt, app* condition)
|
||||
: m_ast_manager(ctx.get_manager()),
|
||||
|
@ -1388,13 +1388,13 @@ namespace datalog {
|
|||
}
|
||||
|
||||
bool should_remove(const table_fact & f) const override {
|
||||
expr_ref_vector& args = const_cast<expr_ref_vector&>(m_args);
|
||||
expr_ref_vector& args = m_args;
|
||||
|
||||
args.reset();
|
||||
//arguments need to be in reverse order for the substitution
|
||||
unsigned col_cnt = f.size();
|
||||
for(int i=col_cnt-1;i>=0;i--) {
|
||||
if(!m_free_vars.contains(i)) {
|
||||
for(int i = col_cnt; i-- > 0;) {
|
||||
if (!m_free_vars.contains(i)) {
|
||||
args.push_back(nullptr);
|
||||
continue; //this variable does not occur in the condition;
|
||||
}
|
||||
|
@ -1403,7 +1403,7 @@ namespace datalog {
|
|||
args.push_back(m_decl_util.mk_numeral(el, m_free_vars[i]));
|
||||
}
|
||||
|
||||
expr_ref ground = m_vs(m_condition.get(), args.size(), args.c_ptr());
|
||||
expr_ref ground = m_vs(m_condition.get(), args);
|
||||
m_simp(ground);
|
||||
|
||||
return m_ast_manager.is_false(ground);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue