3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-30 23:10:08 +00:00

make get_vars populate all indices with sorts even if variable does not occur in rule. This makes the use of get_vars less prone to callers having to double check for null pointers

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-07-21 17:12:39 +02:00
parent 72fe197bda
commit 4957e71408
8 changed files with 16 additions and 21 deletions

View file

@ -143,11 +143,8 @@ namespace datalog {
expr_ref_vector result(m);
ptr_vector<sort> sorts;
expr_ref v(m), w(m);
r.get_vars(sorts);
r.get_vars(m, sorts);
for (unsigned i = 0; i < sorts.size(); ++i) {
if (!sorts[i]) {
sorts[i] = m.mk_bool_sort();
}
v = m.mk_var(i, sorts[i]);
m_subst.apply(2, m_deltas, expr_offset(v, is_tgt?0:1), w);
result.push_back(w);