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:
parent
72fe197bda
commit
4957e71408
8 changed files with 16 additions and 21 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue