mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
cleanup bit2bool from models #3847
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
5c9fd90031
commit
8e6bb30c82
3 changed files with 15 additions and 22 deletions
|
@ -22,6 +22,7 @@ Revision History:
|
|||
#include "ast/rewriter/var_subst.h"
|
||||
#include "ast/rewriter/th_rewriter.h"
|
||||
#include "ast/array_decl_plugin.h"
|
||||
#include "ast/bv_decl_plugin.h"
|
||||
#include "ast/well_sorted.h"
|
||||
#include "ast/used_symbols.h"
|
||||
#include "ast/for_each_expr.h"
|
||||
|
@ -410,6 +411,7 @@ expr_ref model::cleanup_expr(top_sort& ts, expr* e, unsigned current_partition)
|
|||
ptr_buffer<expr> args;
|
||||
todo.push_back(e);
|
||||
array_util autil(m);
|
||||
bv_util bv(m);
|
||||
func_interp* fi = nullptr;
|
||||
unsigned pid = 0;
|
||||
expr_ref new_t(m);
|
||||
|
@ -457,6 +459,10 @@ expr_ref model::cleanup_expr(top_sort& ts, expr* e, unsigned current_partition)
|
|||
var_subst vs(m, false);
|
||||
new_t = vs(fi->get_interp(), args.size(), args.c_ptr());
|
||||
}
|
||||
else if (bv.is_bit2bool(t)) {
|
||||
unsigned idx = f->get_parameter(0).get_int();
|
||||
new_t = m.mk_eq(bv.mk_extract(idx, idx, args[0]), bv.mk_numeral(1, 1));
|
||||
}
|
||||
#if 0
|
||||
else if (is_uninterp_const(a) && !get_const_interp(f)) {
|
||||
new_t = get_some_value(f->get_range());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue