CBMC
Loading...
Searching...
No Matches
std_types.h
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: Pre-defined types
4
5Author: Daniel Kroening, kroening@kroening.com
6 Maria Svorenova, maria.svorenova@diffblue.com
7
8\*******************************************************************/
9
12
13#ifndef CPROVER_UTIL_STD_TYPES_H
14#define CPROVER_UTIL_STD_TYPES_H
15
16#include "expr.h"
17#include "expr_cast.h" // IWYU pragma: keep
18#include "invariant.h"
19#include "validate.h"
20
21#include <unordered_map>
22
23class constant_exprt;
24class namespacet;
25
28inline bool is_constant(const typet &type)
29{
30 return type.get_bool(ID_C_constant);
31}
32
34class bool_typet:public typet
35{
36public:
38 {
39 }
40};
41
42template <>
43inline bool can_cast_type<bool_typet>(const typet &base)
44{
45 return base.id() == ID_bool;
46}
47
49class empty_typet:public typet
50{
51public:
55};
56
61{
62public:
64 {
65 }
66
67 class componentt:public exprt
68 {
69 public:
70 componentt() = default;
71
72 componentt(const irep_idt &_name, typet _type)
73 {
74 set_name(_name);
75 type().swap(_type);
76 }
77
78 const irep_idt &get_name() const
79 {
80 return get(ID_name);
81 }
82
83 void set_name(const irep_idt &name)
84 {
85 return set(ID_name, name);
86 }
87
88 const irep_idt &get_base_name() const
89 {
90 return get(ID_C_base_name);
91 }
92
93 void set_base_name(const irep_idt &base_name)
94 {
95 return set(ID_C_base_name, base_name);
96 }
97
98 const irep_idt &get_access() const
99 {
100 return get(ID_access);
101 }
102
104 {
105 return set(ID_access, access);
106 }
107
109 {
110 return get(ID_C_pretty_name);
111 }
112
113 void set_pretty_name(const irep_idt &name)
114 {
115 return set(ID_C_pretty_name, name);
116 }
117
118 bool get_anonymous() const
119 {
120 return get_bool(ID_anonymous);
121 }
122
124 {
125 return set(ID_anonymous, anonymous);
126 }
127
128 bool get_is_padding() const
129 {
131 }
132
134 {
136 }
137 };
138
139 typedef std::vector<componentt> componentst;
140
145
146 const componentst &components() const
147 {
148 return (const componentst &)(find(ID_components).get_sub());
149 }
150
152 {
153 return (componentst &)(add(ID_components).get_sub());
154 }
155
156 bool has_component(const irep_idt &component_name) const
157 {
158 return get_component(component_name).is_not_nil();
159 }
160
161 const componentt &get_component(
162 const irep_idt &component_name) const;
163
164 std::size_t component_number(const irep_idt &component_name) const;
165 const typet &component_type(const irep_idt &component_name) const;
166
167 irep_idt get_tag() const { return get(ID_tag); }
168 void set_tag(const irep_idt &tag) { set(ID_tag, tag); }
169
171 bool is_class() const
172 {
173 return id() == ID_struct && get_bool(ID_C_class);
174 }
175
179 {
180 return is_class() ? ID_private : ID_public;
181 }
182
184 bool is_incomplete() const
185 {
186 return get_bool(ID_incomplete);
187 }
188
191 {
192 set(ID_incomplete, true);
193 }
194};
195
199template <>
201{
202 return type.id() == ID_struct || type.id() == ID_union;
203}
204
214{
216 return static_cast<const struct_union_typet &>(type);
217}
218
221{
223 return static_cast<struct_union_typet &>(type);
224}
225
226class struct_tag_typet;
227
230{
231public:
235
240
241 bool is_prefix_of(const struct_typet &other) const;
242
244 bool is_class() const
245 {
246 return get_bool(ID_C_class);
247 }
248
250 class baset : public exprt
251 {
252 public:
254 const struct_tag_typet &type() const;
255 explicit baset(struct_tag_typet base);
256 };
257
258 typedef std::vector<baset> basest;
259
261 const basest &bases() const
262 {
263 return (const basest &)find(ID_bases).get_sub();
264 }
265
268 {
269 return (basest &)add(ID_bases).get_sub();
270 }
271
274 void add_base(const struct_tag_typet &base);
275
279 std::optional<baset> get_base(const irep_idt &id) const;
280
284 bool has_base(const irep_idt &id) const
285 {
286 return get_base(id).has_value();
287 }
288};
289
293template <>
294inline bool can_cast_type<struct_typet>(const typet &type)
295{
296 return type.id() == ID_struct;
297}
298
307inline const struct_typet &to_struct_type(const typet &type)
308{
310 return static_cast<const struct_typet &>(type);
311}
312
315{
317 return static_cast<struct_typet &>(type);
318}
319
324{
325public:
327 {
328 set(ID_C_class, true);
329 }
330
331 typedef componentt methodt;
333
334 const methodst &methods() const
335 {
336 return (const methodst &)(find(ID_methods).get_sub());
337 }
338
340 {
341 return (methodst &)(add(ID_methods).get_sub());
342 }
343
344 using static_membert = componentt;
346
348 {
349 return (const static_memberst &)(find(ID_static_members).get_sub());
350 }
351
356
357 bool is_abstract() const
358 {
359 return get_bool(ID_abstract);
360 }
361};
362
366template <>
367inline bool can_cast_type<class_typet>(const typet &type)
368{
369 return can_cast_type<struct_typet>(type) && type.get_bool(ID_C_class);
370}
371
380inline const class_typet &to_class_type(const typet &type)
381{
383 return static_cast<const class_typet &>(type);
384}
385
388{
390 return static_cast<class_typet &>(type);
391}
392
394class tag_typet:public typet
395{
396public:
397 explicit tag_typet(
398 const irep_idt &_id,
399 const irep_idt &identifier):typet(_id)
400 {
401 set_identifier(identifier);
402 }
403
404 void set_identifier(const irep_idt &identifier)
405 {
406 set(ID_identifier, identifier);
407 }
408
410 {
411 return get(ID_identifier);
412 }
413};
414
418template <>
419inline bool can_cast_type<tag_typet>(const typet &type)
420{
421 return type.id() == ID_c_enum_tag || type.id() == ID_struct_tag ||
422 type.id() == ID_union_tag;
423}
424
433inline const tag_typet &to_tag_type(const typet &type)
434{
436 return static_cast<const tag_typet &>(type);
437}
438
441{
443 return static_cast<tag_typet &>(type);
444}
445
450{
451protected:
452 struct_or_union_tag_typet(const irep_idt &id, const irep_idt &identifier)
453 : tag_typet(id, identifier)
454 {
456 }
457};
458
462template <>
464{
465 return type.id() == ID_struct_tag || type.id() == ID_union_tag;
466}
467
476inline const struct_or_union_tag_typet &
478{
480 return static_cast<const struct_or_union_tag_typet &>(type);
481}
482
489
492{
493public:
494 explicit struct_tag_typet(const irep_idt &identifier)
496 {
497 }
498};
499
503template <>
505{
506 return type.id() == ID_struct_tag;
507}
508
517inline const struct_tag_typet &to_struct_tag_type(const typet &type)
518{
520 return static_cast<const struct_tag_typet &>(type);
521}
522
525{
527 return static_cast<struct_tag_typet &>(type);
528}
529
533{
534public:
538
539 const irept::subt &elements() const
540 {
541 return find(ID_elements).get_sub();
542 }
543
545 {
546 return add(ID_elements).get_sub();
547 }
548};
549
553template <>
555{
556 return type.id() == ID_enumeration;
557}
558
568{
570 return static_cast<const enumeration_typet &>(type);
571}
572
575{
577 return static_cast<enumeration_typet &>(type);
578}
579
581class code_typet:public typet
582{
583public:
584 class parametert;
585 typedef std::vector<parametert> parameterst;
586
595
596 // used to be argumentt -- now uses standard terminology
597
598 class parametert:public exprt
599 {
600 public:
602 {
603 }
604
605 const exprt &default_value() const
606 {
608 }
609
610 bool has_default_value() const
611 {
612 return default_value().is_not_nil();
613 }
614
616 {
618 }
619
620 // The following for methods will go away;
621 // these should not be part of the signature of a function,
622 // but rather part of the body.
623 void set_identifier(const irep_idt &identifier)
624 {
625 set(ID_C_identifier, identifier);
626 }
627
628 void set_base_name(const irep_idt &name)
629 {
630 set(ID_C_base_name, name);
631 }
632
634 {
635 return get(ID_C_identifier);
636 }
637
638 const irep_idt &get_base_name() const
639 {
640 return get(ID_C_base_name);
641 }
642
643 bool get_this() const
644 {
645 return get_bool(ID_C_this);
646 }
647
648 void set_this()
649 {
650 set(ID_C_this, true);
651 }
652 };
653
654 bool has_ellipsis() const
655 {
656 return find(ID_parameters).get_bool(ID_ellipsis);
657 }
658
659 bool has_this() const
660 {
661 return get_this() != nullptr;
662 }
663
664 const parametert *get_this() const
665 {
666 const parameterst &p=parameters();
667 if(!p.empty() && p.front().get_this())
668 return &p.front();
669 else
670 return nullptr;
671 }
672
673 bool is_KnR() const
674 {
675 return get_bool(ID_C_KnR);
676 }
677
679 {
681 }
682
687
688 const typet &return_type() const
689 {
691 }
692
694 {
695 return add_type(ID_return_type);
696 }
697
698 const parameterst &parameters() const
699 {
700 return (const parameterst &)find(ID_parameters).get_sub();
701 }
702
704 {
706 }
707
708 bool get_inlined() const
709 {
710 return get_bool(ID_C_inlined);
711 }
712
713 void set_inlined(bool value)
714 {
715 set(ID_C_inlined, value);
716 }
717
718 const irep_idt &get_access() const
719 {
720 return get(ID_access);
721 }
722
724 {
725 return set(ID_access, access);
726 }
727
729 {
730 return get_bool(ID_constructor);
731 }
732
734 {
735 set(ID_constructor, true);
736 }
737
739 std::vector<irep_idt> parameter_identifiers() const
740 {
741 std::vector<irep_idt> result;
742 const parameterst &p=parameters();
743 result.reserve(p.size());
744 for(parameterst::const_iterator it=p.begin();
745 it!=p.end(); it++)
746 result.push_back(it->get_identifier());
747 return result;
748 }
749
750 typedef std::unordered_map<irep_idt, std::size_t> parameter_indicest;
751
754 {
756 const parameterst &params = parameters();
757 parameter_indices.reserve(params.size());
758 std::size_t index = 0;
759 for(const auto &p : params)
760 {
761 const irep_idt &id = p.get_identifier();
762 if(!id.empty())
763 parameter_indices.insert({ id, index });
764 ++index;
765 }
766 return parameter_indices;
767 }
768};
769
773template <>
774inline bool can_cast_type<code_typet>(const typet &type)
775{
776 return type.id() == ID_code;
777}
778
787inline const code_typet &to_code_type(const typet &type)
788{
790 code_typet::check(type);
791 return static_cast<const code_typet &>(type);
792}
793
796{
798 code_typet::check(type);
799 return static_cast<code_typet &>(type);
800}
801
806{
807public:
810 {
811 add(ID_size, std::move(_size));
812 }
813
815 typet index_type() const;
816
821 {
822 return static_cast<typet &>(add(ID_C_index_type));
823 }
824
826 const typet &element_type() const
827 {
828 return subtype();
829 }
830
833 {
834 return subtype();
835 }
836
837 // We will eventually enforce that the type of the size
838 // is the same as the index type.
839 const exprt &size() const
840 {
841 return static_cast<const exprt &>(find(ID_size));
842 }
843
844 // We will eventually enforce that the type of the size
845 // is the same as the index type.
847 {
848 return static_cast<exprt &>(add(ID_size));
849 }
850
851 bool is_complete() const
852 {
853 return size().is_not_nil();
854 }
855
856 bool is_incomplete() const
857 {
858 return size().is_nil();
859 }
860
861 static void check(
862 const typet &type,
864
865protected:
866 // Use element_type() instead
868};
869
873template <>
874inline bool can_cast_type<array_typet>(const typet &type)
875{
876 return type.id() == ID_array;
877}
878
887inline const array_typet &to_array_type(const typet &type)
888{
890 array_typet::check(type);
891 return static_cast<const array_typet &>(type);
892}
893
896{
898 array_typet::check(type);
899 return static_cast<array_typet &>(type);
900}
901
905class string_typet:public typet
906{
907public:
911};
912
916template <>
917inline bool can_cast_type<string_typet>(const typet &type)
918{
919 return type.id() == ID_string;
920}
921
930inline const string_typet &to_string_type(const typet &type)
931{
933 return static_cast<const string_typet &>(type);
934}
935
938{
940 return static_cast<string_typet &>(type);
941}
942
954{
955public:
957
959 typet index_type() const;
960
965 {
966 return static_cast<typet &>(add(ID_C_index_type));
967 }
968
970 const typet &element_type() const
971 {
972 return subtype();
973 }
974
977 {
978 return subtype();
979 }
980
981 const constant_exprt &size() const;
983
984protected:
985 // Use element_type() instead
987};
988
992template <>
993inline bool can_cast_type<vector_typet>(const typet &type)
994{
995 return type.id() == ID_vector;
996}
997
1006inline const vector_typet &to_vector_type(const typet &type)
1007{
1010 return static_cast<const vector_typet &>(type);
1011}
1012
1015{
1018 return static_cast<vector_typet &>(type);
1019}
1020
1023{
1024public:
1027 {
1028 }
1029};
1030
1034template <>
1035inline bool can_cast_type<complex_typet>(const typet &type)
1036{
1037 return type.id() == ID_complex;
1038}
1039
1048inline const complex_typet &to_complex_type(const typet &type)
1049{
1052 return static_cast<const complex_typet &>(type);
1053}
1054
1057{
1060 return static_cast<complex_typet &>(type);
1061}
1062
1064 const typet &type,
1065 const namespacet &ns);
1066
1067#endif // CPROVER_UTIL_STD_TYPES_H
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:566
Arrays with given size.
Definition std_types.h:806
static void check(const typet &type, const validation_modet vm=validation_modet::INVARIANT)
Definition std_types.cpp:20
array_typet(typet _subtype, exprt _size)
Definition std_types.h:808
bool is_incomplete() const
Definition std_types.h:856
typet index_type() const
The type of the index expressions into any instance of this type.
Definition std_types.cpp:34
exprt & size()
Definition std_types.h:846
bool is_complete() const
Definition std_types.h:851
const exprt & size() const
Definition std_types.h:839
const typet & element_type() const
The type of the elements of the array.
Definition std_types.h:826
const typet & subtype() const
Definition type.h:187
typet & index_type_nonconst()
The type of the index expressions into any instance of this type.
Definition std_types.h:820
typet & element_type()
The type of the elements of the array.
Definition std_types.h:832
The Boolean type.
Definition std_types.h:35
Class type.
Definition std_types.h:324
componentst methodst
Definition std_types.h:332
componentst static_memberst
Definition std_types.h:345
methodst & methods()
Definition std_types.h:339
static_memberst & static_members()
Definition std_types.h:352
bool is_abstract() const
Definition std_types.h:357
componentt methodt
Definition std_types.h:331
componentt static_membert
Definition std_types.h:344
const methodst & methods() const
Definition std_types.h:334
const static_memberst & static_members() const
Definition std_types.h:347
parametert(const typet &type)
Definition std_types.h:601
const irep_idt & get_base_name() const
Definition std_types.h:638
const exprt & default_value() const
Definition std_types.h:605
void set_base_name(const irep_idt &name)
Definition std_types.h:628
const irep_idt & get_identifier() const
Definition std_types.h:633
bool get_this() const
Definition std_types.h:643
bool has_default_value() const
Definition std_types.h:610
void set_identifier(const irep_idt &identifier)
Definition std_types.h:623
Base type of functions.
Definition std_types.h:582
bool is_KnR() const
Definition std_types.h:673
code_typet(parameterst _parameters, typet _return_type)
Constructs a new code type, i.e., function type.
Definition std_types.h:590
std::vector< parametert > parameterst
Definition std_types.h:585
typet & return_type()
Definition std_types.h:693
const irep_idt & get_access() const
Definition std_types.h:718
void set_is_constructor()
Definition std_types.h:733
void set_inlined(bool value)
Definition std_types.h:713
bool has_this() const
Definition std_types.h:659
bool get_inlined() const
Definition std_types.h:708
const parameterst & parameters() const
Definition std_types.h:698
const typet & return_type() const
Definition std_types.h:688
parameterst & parameters()
Definition std_types.h:703
void set_access(const irep_idt &access)
Definition std_types.h:723
std::vector< irep_idt > parameter_identifiers() const
Produces the list of parameter identifiers.
Definition std_types.h:739
std::unordered_map< irep_idt, std::size_t > parameter_indicest
Definition std_types.h:750
bool get_is_constructor() const
Definition std_types.h:728
void remove_ellipsis()
Definition std_types.h:683
bool has_ellipsis() const
Definition std_types.h:654
const parametert * get_this() const
Definition std_types.h:664
void make_ellipsis()
Definition std_types.h:678
parameter_indicest parameter_indices() const
Get a map from parameter name to its index.
Definition std_types.h:753
Complex numbers made of pair of given subtype.
Definition std_types.h:1023
complex_typet(typet _subtype)
Definition std_types.h:1025
A constant literal expression.
Definition std_expr.h:3007
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition dstring.h:38
The empty type.
Definition std_types.h:50
An enumeration type, i.e., a type with elements (not to be confused with C enums)
Definition std_types.h:533
const irept::subt & elements() const
Definition std_types.h:539
irept::subt & elements()
Definition std_types.h:544
Base class for all expressions.
Definition expr.h:57
exprt & add_expr(const irep_idt &name)
Definition expr.h:308
typet & type()
Return the type of the expression.
Definition expr.h:85
const exprt & find_expr(const irep_idt &name) const
Definition expr.h:313
bool get_bool(const irep_idt &name) const
Definition irep.cpp:57
const irept & find(const irep_idt &name) const
Definition irep.cpp:93
const irep_idt & get(const irep_idt &name) const
Definition irep.cpp:44
void remove(const irep_idt &name)
Definition irep.cpp:87
void set(const irep_idt &name, const irep_idt &value)
Definition irep.h:412
subt & get_sub()
Definition irep.h:448
void swap(irept &irep)
Definition irep.h:434
const irep_idt & id() const
Definition irep.h:388
irept & add(const irep_idt &name)
Definition irep.cpp:103
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition namespace.h:91
String type.
Definition std_types.h:906
A struct or union tag type.
Definition std_types.h:450
struct_or_union_tag_typet(const irep_idt &id, const irep_idt &identifier)
Definition std_types.h:452
A struct tag type, i.e., struct_typet with an identifier.
Definition std_types.h:492
struct_tag_typet(const irep_idt &identifier)
Definition std_types.h:494
Base class or struct that a class or struct inherits from.
Definition std_types.h:251
struct_tag_typet & type()
Definition std_types.cpp:84
Structure type, corresponds to C style structs.
Definition std_types.h:230
const basest & bases() const
Get the collection of base classes/structs.
Definition std_types.h:261
std::optional< baset > get_base(const irep_idt &id) const
Return the base with the given name, if exists.
struct_typet(componentst _components)
Definition std_types.h:236
bool has_base(const irep_idt &id) const
Test whether id is a base class/struct.
Definition std_types.h:284
bool is_class() const
A struct may be a class, where members may have access restrictions.
Definition std_types.h:244
basest & bases()
Get the collection of base classes/structs.
Definition std_types.h:267
bool is_prefix_of(const struct_typet &other) const
Returns true if the struct is a prefix of other, i.e., if this struct has n components then the compo...
void add_base(const struct_tag_typet &base)
Add a base class/struct.
Definition std_types.cpp:99
std::vector< baset > basest
Definition std_types.h:258
const irep_idt & get_pretty_name() const
Definition std_types.h:108
void set_pretty_name(const irep_idt &name)
Definition std_types.h:113
void set_anonymous(bool anonymous)
Definition std_types.h:123
void set_base_name(const irep_idt &base_name)
Definition std_types.h:93
const irep_idt & get_access() const
Definition std_types.h:98
void set_is_padding(bool is_padding)
Definition std_types.h:133
const irep_idt & get_base_name() const
Definition std_types.h:88
void set_access(const irep_idt &access)
Definition std_types.h:103
const irep_idt & get_name() const
Definition std_types.h:78
void set_name(const irep_idt &name)
Definition std_types.h:83
componentt(const irep_idt &_name, typet _type)
Definition std_types.h:72
Base type for structs and unions.
Definition std_types.h:61
const typet & component_type(const irep_idt &component_name) const
Definition std_types.cpp:77
void set_tag(const irep_idt &tag)
Definition std_types.h:168
irep_idt get_tag() const
Definition std_types.h:167
bool is_class() const
A struct may be a class, where members may have access restrictions.
Definition std_types.h:171
irep_idt default_access() const
Return the access specification for members where access has not been modified.
Definition std_types.h:178
const componentst & components() const
Definition std_types.h:146
struct_union_typet(const irep_idt &_id)
Definition std_types.h:63
const componentt & get_component(const irep_idt &component_name) const
Get the reference to a component with given name.
Definition std_types.cpp:64
struct_union_typet(const irep_idt &_id, componentst _components)
Definition std_types.h:141
bool has_component(const irep_idt &component_name) const
Definition std_types.h:156
bool is_incomplete() const
A struct/union may be incomplete.
Definition std_types.h:184
void make_incomplete()
A struct/union may be incomplete.
Definition std_types.h:190
componentst & components()
Definition std_types.h:151
std::size_t component_number(const irep_idt &component_name) const
Return the sequence number of the component with given name.
Definition std_types.cpp:47
std::vector< componentt > componentst
Definition std_types.h:139
A tag-based type, i.e., typet with an identifier.
Definition std_types.h:395
const irep_idt & get_identifier() const
Definition std_types.h:409
tag_typet(const irep_idt &_id, const irep_idt &identifier)
Definition std_types.h:397
void set_identifier(const irep_idt &identifier)
Definition std_types.h:404
Type with a single subtype.
Definition type.h:180
static void check(const typet &type, const validation_modet vm=validation_modet::INVARIANT)
Definition type.h:199
const typet & subtype() const
Definition type.h:187
The type of an expression, extends irept.
Definition type.h:29
typet & add_type(const irep_idt &name)
Definition type.h:115
const typet & find_type(const irep_idt &name) const
Definition type.h:120
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)
Definition type.h:134
The vector type.
Definition std_types.h:954
const constant_exprt & size() const
typet & element_type()
The type of the elements of the vector.
Definition std_types.h:976
const typet & subtype() const
Definition type.h:187
typet & index_type_nonconst()
The type of any index expression into an instance of this type.
Definition std_types.h:964
typet index_type() const
The type of any index expression into an instance of this type.
const typet & element_type() const
The type of the elements of the vector.
Definition std_types.h:970
Templated functions to cast to specific exprt-derived classes.
STL namespace.
#define PRECONDITION(CONDITION)
Definition invariant.h:463
bool can_cast_type< class_typet >(const typet &type)
Check whether a reference to a typet is a class_typet.
Definition std_types.h:367
bool is_constant_or_has_constant_components(const typet &type, const namespacet &ns)
Identify whether a given type is constant itself or contains constant components.
bool can_cast_type< bool_typet >(const typet &base)
Definition std_types.h:43
bool can_cast_type< complex_typet >(const typet &type)
Check whether a reference to a typet is a complex_typet.
Definition std_types.h:1035
const vector_typet & to_vector_type(const typet &type)
Cast a typet to a vector_typet.
Definition std_types.h:1006
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
Definition std_types.h:787
bool can_cast_type< array_typet >(const typet &type)
Check whether a reference to a typet is a array_typet.
Definition std_types.h:874
bool can_cast_type< vector_typet >(const typet &type)
Check whether a reference to a typet is a vector_typet.
Definition std_types.h:993
bool can_cast_type< struct_or_union_tag_typet >(const typet &type)
Check whether a reference to a typet is a struct_or_union_tag_typet.
Definition std_types.h:463
const string_typet & to_string_type(const typet &type)
Cast a typet to a string_typet.
Definition std_types.h:930
bool is_constant(const typet &type)
This method tests, if the given typet is a constant.
Definition std_types.h:28
bool can_cast_type< struct_tag_typet >(const typet &type)
Check whether a reference to a typet is a struct_tag_typet.
Definition std_types.h:504
const struct_typet & to_struct_type(const typet &type)
Cast a typet to a struct_typet.
Definition std_types.h:307
const enumeration_typet & to_enumeration_type(const typet &type)
Cast a typet to a enumeration_typet.
Definition std_types.h:567
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a typet to a struct_tag_typet.
Definition std_types.h:517
bool can_cast_type< code_typet >(const typet &type)
Check whether a reference to a typet is a code_typet.
Definition std_types.h:774
const complex_typet & to_complex_type(const typet &type)
Cast a typet to a complex_typet.
Definition std_types.h:1048
const struct_or_union_tag_typet & to_struct_or_union_tag_type(const typet &type)
Cast a typet to a struct_or_union_tag_typet.
Definition std_types.h:477
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
Definition std_types.h:887
bool can_cast_type< tag_typet >(const typet &type)
Check whether a reference to a typet is a tag_typet.
Definition std_types.h:419
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
Definition std_types.h:213
bool can_cast_type< enumeration_typet >(const typet &type)
Check whether a reference to a typet is a enumeration_typet.
Definition std_types.h:554
bool can_cast_type< struct_union_typet >(const typet &type)
Check whether a reference to a typet is a struct_union_typet.
Definition std_types.h:200
bool can_cast_type< string_typet >(const typet &type)
Check whether a reference to a typet is a string_typet.
Definition std_types.h:917
bool can_cast_type< struct_typet >(const typet &type)
Check whether a reference to a typet is a struct_typet.
Definition std_types.h:294
const class_typet & to_class_type(const typet &type)
Cast a typet to a class_typet.
Definition std_types.h:380
const tag_typet & to_tag_type(const typet &type)
Cast a typet to a tag_typet.
Definition std_types.h:433
validation_modet