10 #ifndef CPROVER_UTIL_TYPE_H 11 #define CPROVER_UTIL_TYPE_H 15 #define SUBTYPE_IN_GETSUB 16 #define SUBTYPES_IN_GETSUB 34 #ifdef SUBTYPE_IN_GETSUB 45 #ifdef SUBTYPE_IN_GETSUB 50 return static_cast<typet &
>(sub.front());
59 #ifdef SUBTYPES_IN_GETSUB 66 #ifdef SUBTYPES_IN_GETSUB 73 #ifdef SUBTYPES_IN_GETSUB 80 #ifdef SUBTYPE_IN_GETSUB 87 #ifdef SUBTYPE_IN_GETSUB 90 {
remove(ID_subtype); }
109 return static_cast<typet &
>(
add(name));
114 return static_cast<const typet &
>(
find(name));
135 {
return (
typet &)
add(ID_subtype); }
161 #define forall_subtypes(it, type) \ 162 if((type).has_subtypes()) \ 163 for(typet::subtypest::const_iterator it=(type).subtypes().begin(), \ 164 it##_end=(type).subtypes().end(); \ 167 #define Forall_subtypes(it, type) \ 168 if((type).has_subtypes()) \ 169 for(typet::subtypest::iterator it=(type).subtypes().begin(); \ 170 it!=(type).subtypes().end(); ++it) 213 #endif // CPROVER_UTIL_TYPE_H const irept & get_nil_irep()
The type of an expression.
bool has_subtypes() const
typet(const irep_idt &_id)
type_with_subtypet(const irep_idt &_id)
std::vector< irept > subt
type_with_subtypet(const irep_idt &_id, const typet &_subtype)
void move_to_subtypes(typet &type)
type_with_subtypest(const irep_idt &_id)
typet(const irep_idt &_id, const typet &_subtype)
bool is_number(const typet &type)
void copy_to_subtypes(const typet &type)
Base class for tree-like data structures with sharing.
std::vector< typet > subtypest
const source_locationt & source_location() const
const typet & find_type(const irep_namet &name) const
const subtypest & subtypes() const
source_locationt & add_source_location()
irept & add(const irep_namet &name)
typet & add_type(const irep_namet &name)
const typet & subtype() const
const irept & find(const irep_namet &name) const
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.