mirror of
https://github.com/Z3Prover/z3
synced 2025-08-17 08:42:15 +00:00
fix #4187
This commit is contained in:
parent
47fa6ba7a6
commit
f3dd58d7ad
2 changed files with 10 additions and 3 deletions
|
@ -18,6 +18,7 @@ Notes:
|
|||
--*/
|
||||
#include "ast/rewriter/rewriter_def.h"
|
||||
#include "ast/ast_ll_pp.h"
|
||||
#include "ast/ast_pp.h"
|
||||
#include "ast/ast_smt2_pp.h"
|
||||
|
||||
void rewriter_core::init_cache_stack() {
|
||||
|
@ -47,6 +48,9 @@ bool rewriter_core::rewrites_from(expr* t, proof* p) {
|
|||
}
|
||||
|
||||
bool rewriter_core::rewrites_to(expr* t, proof* p) {
|
||||
CTRACE("rewriter", p && !m().proofs_disabled() && to_app(m().get_fact(p))->get_arg(1) != t,
|
||||
tout << mk_pp(p, m()) << "\n";
|
||||
tout << mk_pp(t, m()) << "\n";);
|
||||
return !p || m().proofs_disabled() || (to_app(m().get_fact(p))->get_arg(1) == t);
|
||||
}
|
||||
|
||||
|
@ -76,6 +80,8 @@ void rewriter_core::cache_shifted_result(expr * k, unsigned offset, expr * v) {
|
|||
void rewriter_core::cache_result(expr * k, expr * v, proof * pr) {
|
||||
m_cache->insert(k, v);
|
||||
SASSERT(m_proof_gen);
|
||||
SASSERT(rewrites_from(k, pr));
|
||||
SASSERT(rewrites_to(v, pr));
|
||||
m_cache_pr->insert(k, pr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue