Go to the documentation of this file.
13 #ifndef CPROVER_UTIL_TYPE_H
14 #define CPROVER_UTIL_TYPE_H
36 #if !defined(__GLIBCXX__) || __GLIBCXX__ >= 20181026
38 :
irept(std::move(_id), {}, {std::move(_subtype)})
44 subtype() = std::move(_subtype);
62 return static_cast<typet &
>(sub.front());
76 return static_cast<typet &
>(sub.front());
102 return static_cast<typet &
>(
add(name));
107 return static_cast<const typet &
>(
find(name));
168 :
typet(std::move(_id), std::move(_subtype))
189 vm, type.
get_sub().size() == 1,
"type must have one type parameter");
251 #endif // CPROVER_UTIL_TYPE_H
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
void copy_to_subtypes(const typet &type)
Copy the provided type to the subtypes of this type.
#define DATA_CHECK(vm, condition, message)
This macro takes a condition which denotes a well-formedness criterion on goto programs,...
const typet & subtype() const
Type with multiple subtypes.
std::vector< typet > subtypest
void validate_full_type(const typet &type, const namespacet &ns, const validation_modet vm)
Check that the given type is well-formed (full check, including checks of subtypes)
The type of an expression, extends irept.
const irept & find(const irep_idt &name) const
bool has_subtypes() const
const type_with_subtypet & to_type_with_subtype(const typet &type)
const type_with_subtypest & to_type_with_subtypes(const typet &type)
Type with a single subtype.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
type_with_subtypest(const irep_idt &_id, const subtypest &_subtypes)
void check_type(const typet &type, const validation_modet vm)
Check that the given type is well-formed (shallow checks only, i.e., subtypes are not checked)
type_with_subtypet(irep_idt _id, typet _subtype)
const source_locationt & source_location() const
void move_to_subtypes(typet &type)
Move the provided type to the subtypes of this type.
typet & add_type(const irep_idt &name)
static void check(const typet &, const validation_modet=validation_modet::INVARIANT)
Check that the type is well-formed (shallow checks only, i.e., subtypes are not checked)
source_locationt & add_source_location()
static void validate(const typet &type, const namespacet &, const validation_modet vm=validation_modet::INVARIANT)
Check that the type is well-formed, assuming that its subtypes have already been checked for well-for...
static void validate_full(const typet &type, const namespacet &ns, const validation_modet vm=validation_modet::INVARIANT)
Check that the type is well-formed (full check, including checks of subtypes)
const subtypest & subtypes() const
typet(irep_idt _id, typet _subtype)
irept & add(const irep_idt &name)
void validate_type(const typet &type, const namespacet &ns, const validation_modet vm)
Check that the given type is well-formed, assuming that its subtypes have already been checked for we...
typet remove_const(typet type)
Remove const qualifier from type (if any).
const typet & find_type(const irep_idt &name) const
const typet & subtype() const
There are a large number of kinds of tree structured or tree-like data in CPROVER.
const irept & get_nil_irep()
static void check(const typet &type, const validation_modet vm=validation_modet::INVARIANT)
typet(const irep_idt &_id)
type_with_subtypest(const irep_idt &_id, subtypest &&_subtypes)