mirror of
https://github.com/Z3Prover/z3
synced 2025-04-14 04:48:45 +00:00
use safe replace for external substitution
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
1b8d1a1ccc
commit
4363c9f44f
|
@ -31,7 +31,7 @@ Revision History:
|
|||
#include"ast_smt2_pp.h"
|
||||
#include"th_rewriter.h"
|
||||
#include"var_subst.h"
|
||||
#include"expr_substitution.h"
|
||||
#include"expr_safe_replace.h"
|
||||
#include"pp.h"
|
||||
#include"scoped_ctrl_c.h"
|
||||
#include"cancel_eh.h"
|
||||
|
@ -786,17 +786,12 @@ extern "C" {
|
|||
RETURN_Z3(of_expr(0));
|
||||
}
|
||||
}
|
||||
|
||||
expr_substitution subst(m);
|
||||
expr_safe_replace subst(m);
|
||||
for (unsigned i = 0; i < num_exprs; i++) {
|
||||
subst.insert(from[i], to[i]);
|
||||
}
|
||||
th_rewriter m_rw(m);
|
||||
m_rw.set_substitution(&subst);
|
||||
|
||||
expr_ref new_a(m);
|
||||
proof_ref pr(m);
|
||||
m_rw(a, new_a, pr);
|
||||
subst(a, new_a);
|
||||
mk_c(c)->save_ast_trail(new_a);
|
||||
r = new_a.get();
|
||||
RETURN_Z3(of_expr(r));
|
||||
|
|
Loading…
Reference in a new issue