mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
some compile warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
414db51d5a
commit
518296dbc1
5 changed files with 44 additions and 51 deletions
|
@ -1785,8 +1785,9 @@ bool ast_manager::slow_not_contains(ast const * n) {
|
|||
}
|
||||
#endif
|
||||
|
||||
static unsigned s_count = 0;
|
||||
#if 0
|
||||
static unsigned s_count = 0;
|
||||
|
||||
static void track_id(ast_manager& m, ast* n, unsigned id) {
|
||||
if (n->get_id() != id) return;
|
||||
++s_count;
|
||||
|
@ -1826,7 +1827,7 @@ ast * ast_manager::register_node_core(ast * n) {
|
|||
|
||||
// track_id(*this, n, 3);
|
||||
|
||||
TRACE("ast", tout << (s_count++) << " Object " << n->m_id << " was created.\n";);
|
||||
// TRACE("ast", tout << (s_count++) << " Object " << n->m_id << " was created.\n";);
|
||||
TRACE("mk_var_bug", tout << "mk_ast: " << n->m_id << "\n";);
|
||||
// increment reference counters
|
||||
switch (n->get_kind()) {
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace euf {
|
|||
|
||||
// one table per func_decl implementation
|
||||
unsigned etable::cg_hash::operator()(enode * n) const {
|
||||
SASSERT(decl(n)->is_flat_associative() || num_args(n) >= 3);
|
||||
SASSERT(decl(n)->is_flat_associative() || n->num_args() >= 3);
|
||||
unsigned a, b, c;
|
||||
a = b = 0x9e3779b9;
|
||||
c = 11;
|
||||
|
@ -51,8 +51,8 @@ namespace euf {
|
|||
|
||||
bool etable::cg_eq::operator()(enode * n1, enode * n2) const {
|
||||
SASSERT(decl(n1) == decl(n2));
|
||||
unsigned num = num_args(n1);
|
||||
if (num != num_args(n2)) {
|
||||
unsigned num = n1->num_args();
|
||||
if (num != n2->num_args()) {
|
||||
return false;
|
||||
}
|
||||
for (unsigned i = 0; i < num; i++)
|
||||
|
@ -96,7 +96,7 @@ namespace euf {
|
|||
}
|
||||
|
||||
unsigned etable::set_table_id(enode * n) {
|
||||
func_decl * f = n->get_decl();
|
||||
func_decl * f = decl(n);
|
||||
unsigned tid;
|
||||
decl_info d(f, n->num_args());
|
||||
if (!m_func_decl2id.find(d, tid)) {
|
||||
|
|
|
@ -24,7 +24,6 @@ namespace euf {
|
|||
|
||||
// one table per function symbol
|
||||
|
||||
static unsigned num_args(enode* n) { return n->num_args(); }
|
||||
static func_decl* decl(enode* n) { return n->get_decl(); }
|
||||
|
||||
|
||||
|
@ -36,7 +35,7 @@ namespace euf {
|
|||
|
||||
struct cg_unary_hash {
|
||||
unsigned operator()(enode * n) const {
|
||||
SASSERT(num_args(n) == 1);
|
||||
SASSERT(n->num_args() == 1);
|
||||
return get_root(n, 0)->hash();
|
||||
}
|
||||
};
|
||||
|
@ -44,8 +43,8 @@ namespace euf {
|
|||
struct cg_unary_eq {
|
||||
|
||||
bool operator()(enode * n1, enode * n2) const {
|
||||
SASSERT(num_args(n1) == 1);
|
||||
SASSERT(num_args(n2) == 1);
|
||||
SASSERT(n1->num_args() == 1);
|
||||
SASSERT(n2->num_args() == 1);
|
||||
SASSERT(decl(n1) == decl(n2));
|
||||
return get_root(n1, 0) == get_root(n2, 0);
|
||||
}
|
||||
|
@ -55,15 +54,15 @@ namespace euf {
|
|||
|
||||
struct cg_binary_hash {
|
||||
unsigned operator()(enode * n) const {
|
||||
SASSERT(num_args(n) == 2);
|
||||
SASSERT(n->num_args() == 2);
|
||||
return combine_hash(get_root(n, 0)->hash(), get_root(n, 1)->hash());
|
||||
}
|
||||
};
|
||||
|
||||
struct cg_binary_eq {
|
||||
bool operator()(enode * n1, enode * n2) const {
|
||||
SASSERT(num_args(n1) == 2);
|
||||
SASSERT(num_args(n2) == 2);
|
||||
SASSERT(n1->num_args() == 2);
|
||||
SASSERT(n2->num_args() == 2);
|
||||
SASSERT(decl(n1) == decl(n2));
|
||||
return
|
||||
get_root(n1, 0) == get_root(n2, 0) &&
|
||||
|
@ -75,7 +74,7 @@ namespace euf {
|
|||
|
||||
struct cg_comm_hash {
|
||||
unsigned operator()(enode * n) const {
|
||||
SASSERT(num_args(n) == 2);
|
||||
SASSERT(n->num_args() == 2);
|
||||
unsigned h1 = get_root(n, 0)->hash();
|
||||
unsigned h2 = get_root(n, 1)->hash();
|
||||
if (h1 > h2)
|
||||
|
@ -88,8 +87,8 @@ namespace euf {
|
|||
bool & m_commutativity;
|
||||
cg_comm_eq( bool & c): m_commutativity(c) {}
|
||||
bool operator()(enode * n1, enode * n2) const {
|
||||
SASSERT(num_args(n1) == 2);
|
||||
SASSERT(num_args(n2) == 2);
|
||||
SASSERT(n1->num_args() == 2);
|
||||
SASSERT(n2->num_args() == 2);
|
||||
|
||||
SASSERT(decl(n1) == decl(n2));
|
||||
enode* c1_1 = get_root(n1, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue