mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 17:44:08 +00:00
fixup variables
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
969511ac00
commit
b60e1a2ed2
|
@ -59,7 +59,10 @@ expr_ref var_subst::operator()(expr * n, unsigned num_args, expr * const * args)
|
||||||
new_args.push_back(arg);
|
new_args.push_back(arg);
|
||||||
else {
|
else {
|
||||||
unsigned idx = to_var(arg)->get_idx();
|
unsigned idx = to_var(arg)->get_idx();
|
||||||
new_args.push_back(m_std_order ? args[num_args - idx - 1] : args[idx]);
|
expr* new_arg = m_std_order ? args[num_args - idx - 1] : args[idx];
|
||||||
|
if (!new_arg)
|
||||||
|
new_arg = arg;
|
||||||
|
new_args.push_back(new_arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result = m.mk_app(to_app(n)->get_decl(), new_args.size(), new_args.data());
|
result = m.mk_app(to_app(n)->get_decl(), new_args.size(), new_args.data());
|
||||||
|
|
Loading…
Reference in a new issue