10 #ifndef CPROVER_UTIL_TYPE_H 11 #define CPROVER_UTIL_TYPE_H 15 #define SUBTYPE_IN_GETSUB 16 #define SUBTYPES_IN_GETSUB 32 #ifdef SUBTYPE_IN_GETSUB 43 #ifdef SUBTYPE_IN_GETSUB 48 return static_cast<typet &
>(sub.front());
57 #ifdef SUBTYPES_IN_GETSUB 64 #ifdef SUBTYPES_IN_GETSUB 71 #ifdef SUBTYPES_IN_GETSUB 78 #ifdef SUBTYPE_IN_GETSUB 85 #ifdef SUBTYPE_IN_GETSUB 88 {
remove(ID_subtype); }
107 return static_cast<typet &
>(
add(name));
112 return static_cast<const typet &
>(
find(name));
133 {
return (
typet &)
add(ID_subtype); }
159 #define forall_subtypes(it, type) \ 160 if((type).has_subtypes()) \ 161 for(typet::subtypest::const_iterator it=(type).subtypes().begin(), \ 162 it##_end=(type).subtypes().end(); \ 165 #define Forall_subtypes(it, type) \ 166 if((type).has_subtypes()) \ 167 for(typet::subtypest::iterator it=(type).subtypes().begin(); \ 168 it!=(type).subtypes().end(); ++it) 206 #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