21 sub.push_back(static_cast<const typet &>(
get_nil_irep()));
22 sub.back().swap(type);
28 return id==ID_rational ||
52 const auto has_constant_components =
53 [&ns](
const typet &subtype) ->
bool 55 if(subtype.id() == ID_struct || subtype.id() == ID_union)
58 for(
const auto &component : struct_union_type.components())
82 if(type.
id()==ID_pointer)
90 if(type.
id() == ID_symbol)
92 const auto &resolved_type = ns.
follow(type);
93 return has_constant_components(resolved_type);
103 const auto &subtype = type.
subtype();
const irept & get_nil_irep()
The type of an expression.
bool get_bool(const irep_namet &name) const
void move_to_subtypes(typet &type)
const irep_idt & id() const
void copy_to_subtypes(const typet &type)
bool is_constant_or_has_constant_components(const typet &type, const namespacet &ns)
Identify if a given type is constant itself or contains constant components.
const typet & follow(const typet &) const
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
std::vector< typet > subtypest
bool is_number(const typet &type)
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a generic typet to a struct_union_typet.
const typet & subtype() const