diff --git a/src/goto-programs/link_goto_model.cpp b/src/goto-programs/link_goto_model.cpp index 8dd0d87edf6..716f9816dd7 100644 --- a/src/goto-programs/link_goto_model.cpp +++ b/src/goto-programs/link_goto_model.cpp @@ -118,13 +118,12 @@ static bool link_functions( const irep_idt &id = to_symbol_expr(symbol.value).get_identifier(); #if 0 - if(!base_type_eq(symbol.type, ns.lookup(id).type, ns)) + if(symbol.type != ns.lookup(id).type) { std::cerr << symbol << '\n'; std::cerr << ns.lookup(id) << '\n'; } - INVARIANT(base_type_eq(symbol.type, ns.lookup(id).type, ns), - "type matches"); + INVARIANT(symbol.type == ns.lookup(id).type, "type matches"); #endif macro_application.insert_expr(symbol.name, id); diff --git a/src/goto-programs/string_abstraction.cpp b/src/goto-programs/string_abstraction.cpp index 2ac290e1f4c..2478ad785fa 100644 --- a/src/goto-programs/string_abstraction.cpp +++ b/src/goto-programs/string_abstraction.cpp @@ -35,9 +35,9 @@ bool string_abstractiont::build_wrap( // #define build_wrap(a,b,c) build(a,b,c) // to avoid it const typet &a_t=build_abstraction_type(object.type()); - /*assert(type_eq(dest.type(), a_t, ns) || + /*assert(dest.type() == a_t || (dest.type().id()==ID_array && a_t.id()==ID_pointer && - type_eq(dest.type().subtype(), a_t.subtype(), ns))); + dest.type().subtype() == a_t.subtype())); */ if( dest.type() != a_t && diff --git a/src/pointer-analysis/value_set.cpp b/src/pointer-analysis/value_set.cpp index e1d4fe34d10..8f5abba8f16 100644 --- a/src/pointer-analysis/value_set.cpp +++ b/src/pointer-analysis/value_set.cpp @@ -1156,10 +1156,10 @@ void value_sett::assign( } else { - if(rhs.type() != type) + if(rhs.type() != lhs.type()) throw "value_sett::assign type mismatch: " "rhs.type():\n"+rhs.type().pretty()+"\n"+ - "type:\n"+type.pretty(); + "lhs.type():\n"+lhs.type().pretty(); rhs_member=make_member(rhs, name, ns); diff --git a/src/solvers/flattening/boolbv_equality.cpp b/src/solvers/flattening/boolbv_equality.cpp index 8d47275b7d8..1be84441cf2 100644 --- a/src/solvers/flattening/boolbv_equality.cpp +++ b/src/solvers/flattening/boolbv_equality.cpp @@ -17,9 +17,9 @@ Author: Daniel Kroening, kroening@kroening.com literalt boolbvt::convert_equality(const equal_exprt &expr) { - const bool is_base_type_eq = expr.lhs().type() == expr.rhs().type(); + const bool equality_types_match = expr.lhs().type() == expr.rhs().type(); DATA_INVARIANT_WITH_DIAGNOSTICS( - is_base_type_eq, + equality_types_match, "types of expressions on each side of equality should match", irep_pretty_diagnosticst{expr.lhs()}, irep_pretty_diagnosticst{expr.rhs()}); diff --git a/src/util/simplify_expr_struct.cpp b/src/util/simplify_expr_struct.cpp index 748d7c33958..3a525267371 100644 --- a/src/util/simplify_expr_struct.cpp +++ b/src/util/simplify_expr_struct.cpp @@ -262,9 +262,6 @@ bool simplify_exprt::simplify_member(exprt &expr) // Guess: turning this into a byte-extract operation is not really an // optimisation. - // The type_eq check is because get_subexpression_at_offset uses - // base_type_eq, whereas in the context of a simplifier we should not - // change the type of the expression. if( equivalent_member.is_not_nil() && equivalent_member.id() != ID_byte_extract_little_endian &&