21#include <unordered_set>
37 const typet &type)
const
43 std::string result =
followed.id_string();
51 result +=
" (incomplete)";
59 const typet &subtype =
c.type();
64 if(!
c.get_base_name().empty())
107 if(
t1.id() !=
t2.id())
109 msg =
"type classes differ";
130 msg =
"pointer types differ";
132 msg =
"array types differ";
146 msg =
"number of members is different (";
153 for(std::size_t i = 0; i <
components1.size(); ++i)
160 msg =
"names of member " + std::to_string(i) +
" differ (";
167 typedef std::unordered_set<typet, irep_hash>
type_sett;
206 " differs (recursive)";
225 msg =
"enum value types are different (";
236 msg =
"number of enum members is different (";
243 for(std::size_t i = 0; i <
members1.size(); ++i)
247 msg =
"names of member " + std::to_string(i) +
" differ (";
254 msg =
"values of member " + std::to_string(i) +
" differ (";
265 msg +=
"\nenum declarations at\n";
266 msg +=
t1.source_location().as_string() +
" and\n";
267 msg +=
t1.source_location().as_string();
280 msg =
"parameter counts differ (";
302 msg =
"return types differ";
306 for(std::size_t i = 0; i <
parameters1.size(); i++)
328 msg =
"parameter types differ";
338 msg =
"conflict on POD";
348 log.error() <<
"reason for conflict at "
368 const std::string &
msg)
374 log.error() <<
"old definition in module '" << old_symbol.module <<
"' "
377 log.error() <<
"new definition in module '" << new_symbol.module <<
"' "
385 const std::string &
msg)
388 log.warning().source_location = new_symbol.
location;
391 log.warning() <<
"old definition in module " << old_symbol.module <<
" "
394 log.warning() <<
"new definition in module " << new_symbol.module <<
" "
const c_enum_typet & to_c_enum_type(const typet &type)
Cast a typet to a c_enum_typet.
const c_enum_tag_typet & to_c_enum_tag_type(const typet &type)
Cast a typet to a c_enum_tag_typet.
const union_tag_typet & to_union_tag_type(const typet &type)
Cast a typet to a union_tag_typet.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
std::vector< c_enum_membert > memberst
std::vector< parametert > parameterst
A constant literal expression.
Operator to dereference a pointer.
Base class for all expressions.
typet & type()
Return the type of the expression.
Unbounded, signed integers (mathematical integers, not bitvectors)
const irep_idt & id() const
message_handlert & message_handler
std::string type_to_string_verbose(const symbolt &symbol, const typet &type) const
void warning(const symbolt &old_symbol, const symbolt &new_symbol, const std::string &msg)
bool detailed_conflict_report_rec(const symbolt &old_symbol, const symbolt &new_symbol, const typet &type1, const typet &type2, unsigned depth, exprt &conflict_path)
Returns true iff the conflict report on a particular branch of the tree of types was a definitive res...
void error(const symbolt &old_symbol, const symbolt &new_symbol, const std::string &msg)
Extract member of struct or union.
Class that provides messages with a built-in verbosity 'level'.
const union_typet & follow_tag(const union_tag_typet &) const
Follow type tag of union type.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
std::vector< componentt > componentst
source_locationt location
Source code location of definition of symbol.
irep_idt name
The unique identifier.
const irep_idt & display_name() const
Return language specific display name if present.
The type of an expression, extends irept.
std::string get_base_name(const std::string &in, bool strip_suffix)
cleans a filename from path and extension
const std::string & id2string(const irep_idt &d)
std::string from_expr(const namespacet &ns, const irep_idt &identifier, const exprt &expr)
std::string from_type(const namespacet &ns, const irep_idt &identifier, const typet &type)
static const typet & follow_tags_symbols(const namespacet &ns, const typet &type)
static const typet & follow_tags_symbols(const namespacet &ns, const typet &type)
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
const dereference_exprt & to_dereference_expr(const exprt &expr)
Cast an exprt to a dereference_exprt.
#define UNREACHABLE
This should be used to mark dead code.
const index_exprt & to_index_expr(const exprt &expr)
Cast an exprt to an index_exprt.
const member_exprt & to_member_expr(const exprt &expr)
Cast an exprt to a member_exprt.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a typet to a struct_tag_typet.
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
const type_with_subtypet & to_type_with_subtype(const typet &type)