Go to the documentation of this file.
30 if(e.
id() == ID_symbol && current)
32 else if(e.
id() == ID_next_symbol && next)
33 dest.insert(e.
get(ID_identifier));
43 if(src.
id() == ID_symbol && current)
45 else if(src.
id() == ID_next_symbol && next)
46 return symbols.count(src.
get(ID_identifier))!=0;
66 std::set<exprt> &dest)
69 if(e.
id() == ID_symbol || e.
id() == ID_next_symbol)
76 std::set<symbol_exprt> &dest)
79 if(e.
id() == ID_symbol)
87 .filter([](
const exprt &e) {
return e.
id() == ID_symbol; })
93 std::unordered_set<irep_idt> result;
95 if(e.
id() == ID_symbol)
112 if(src.
id() == ID_symbol)
114 else if(src.
id() == ID_next_symbol)
115 dest.insert(src.
get(ID_identifier));
118 const irept &c_sizeof_type=src.
find(ID_C_c_sizeof_type);
123 const irept &va_arg_type=src.
find(ID_C_va_arg_type);
132 src.
id()!=ID_pointer)
140 const irep_idt &typedef_name=src.
get(ID_C_typedef);
141 if(!typedef_name.
empty())
142 dest.insert(typedef_name);
145 if(src.
id()==ID_struct ||
150 for(
const auto &c : struct_union_type.
components())
153 else if(src.
id()==ID_code)
167 else if(src.
id()==ID_array)
172 else if(src.
id()==ID_c_enum_tag)
176 else if(src.
id()==ID_struct_tag)
180 else if(src.
id()==ID_union_tag)
const componentst & components() const
const union_tag_typet & to_union_tag_type(const typet &type)
Cast a typet to a union_tag_typet.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const c_enum_tag_typet & to_c_enum_tag_type(const typet &type)
Cast a typet to a c_enum_tag_typet.
void find_type_and_expr_symbols(const exprt &src, find_symbols_sett &dest)
depth_iteratort depth_begin()
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
The type of an expression, extends irept.
void find_symbols_or_nexts(const exprt &src, find_symbols_sett &dest)
Add to the set dest the sub-expressions of src with id ID_symbol or ID_next_symbol.
Base type for structs and unions.
void find_non_pointer_type_symbols(const exprt &src, find_symbols_sett &dest)
std::unordered_set< irep_idt > find_symbol_identifiers(const exprt &src)
Find identifiers of the sub expressions with id ID_symbol.
const irept & find(const irep_namet &name) const
const type_with_subtypet & to_type_with_subtype(const typet &type)
Base class for all expressions.
typet & type()
Return the type of the expression.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
#define forall_operands(it, expr)
void find_type_symbols(const exprt &src, find_symbols_sett &dest)
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const irep_idt & id() const
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a typet to a struct_tag_typet.
Ranges: pair of begin and end iterators, which can be initialized from containers,...
void find_symbols(const exprt &src, find_symbols_sett &dest, bool current, bool next)
Add to the set dest the sub-expressions of src with id ID_symbol if current is true,...
const parameterst & parameters() const
#define forall_subtypes(it, type)
bool has_symbol(const exprt &src, const find_symbols_sett &symbols, bool current, bool next)
Forward depth-first search iterators These iterators' copy operations are expensive,...
std::unordered_set< irep_idt > find_symbols_sett
const irep_idt & get(const irep_namet &name) const
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
void visit_pre(std::function< void(exprt &)>)
const typet & return_type() const
There are a large number of kinds of tree structured or tree-like data in CPROVER.
depth_iteratort depth_end()
API to expression classes.
ranget< iteratort > make_range(iteratort begin, iteratort end)