mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
add method to create bit-vectors directly from an array of Booleans
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
2c97eb1393
commit
795e0c641a
7 changed files with 45 additions and 15 deletions
|
@ -26,6 +26,7 @@ Revision History:
|
|||
#include "util/string_buffer.h"
|
||||
#include "ast/ast_util.h"
|
||||
#include "ast/ast_smt2_pp.h"
|
||||
#include "ast/bv_decl_plugin.h"
|
||||
|
||||
// -----------------------------------
|
||||
//
|
||||
|
@ -1684,22 +1685,9 @@ ast * ast_manager::register_node_core(ast * n) {
|
|||
CASSERT("nondet_bug", contains || slow_not_contains(n));
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static unsigned counter = 0;
|
||||
counter++;
|
||||
if (counter % 100000 == 0)
|
||||
verbose_stream() << "[ast-table] counter: " << counter << " collisions: " << m_ast_table.collisions() << " capacity: " << m_ast_table.capacity() << " size: " << m_ast_table.size() << "\n";
|
||||
#endif
|
||||
|
||||
ast * r = m_ast_table.insert_if_not_there(n);
|
||||
SASSERT(r->m_hash == h);
|
||||
if (r != n) {
|
||||
#if 0
|
||||
static unsigned reused = 0;
|
||||
reused++;
|
||||
if (reused % 100000 == 0)
|
||||
verbose_stream() << "[ast-table] reused: " << reused << "\n";
|
||||
#endif
|
||||
SASSERT(contains);
|
||||
SASSERT(m_ast_table.contains(n));
|
||||
if (is_func_decl(r) && to_func_decl(r)->get_range() != to_func_decl(n)->get_range()) {
|
||||
|
|
|
@ -687,7 +687,7 @@ br_status poly_rewriter<Config>::mk_sub(unsigned num_args, expr * const * args,
|
|||
}
|
||||
set_curr_sort(m().get_sort(args[0]));
|
||||
expr_ref minus_one(mk_numeral(numeral(-1)), m());
|
||||
ptr_buffer<expr> new_args;
|
||||
expr_ref_buffer new_args(m());
|
||||
new_args.push_back(args[0]);
|
||||
for (unsigned i = 1; i < num_args; i++) {
|
||||
if (is_zero(args[i])) continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue