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<symbol_exprt> &dest)
69 if(e.
id() == ID_symbol)
77 .filter([](
const exprt &e) {
return e.
id() == ID_symbol; })
83 std::unordered_set<irep_idt> result;
85 if(e.
id() == ID_symbol)
102 if(src.
id() == ID_symbol)
104 else if(src.
id() == ID_next_symbol)
105 dest.insert(src.
get(ID_identifier));
108 const irept &c_sizeof_type=src.
find(ID_C_c_sizeof_type);
113 const irept &va_arg_type=src.
find(ID_C_va_arg_type);
122 src.
id()!=ID_pointer)
130 const irep_idt &typedef_name=src.
get(ID_C_typedef);
131 if(!typedef_name.
empty())
132 dest.insert(typedef_name);
135 if(src.
id()==ID_struct ||
140 for(
const auto &c : struct_union_type.
components())
143 else if(src.
id()==ID_code)
157 else if(src.
id()==ID_array)
162 else if(src.
id()==ID_c_enum_tag)
166 else if(src.
id()==ID_struct_tag)
170 else if(src.
id()==ID_union_tag)
const union_tag_typet & to_union_tag_type(const typet &type)
Cast a typet to a union_tag_typet.
const c_enum_tag_typet & to_c_enum_tag_type(const typet &type)
Cast a typet to a c_enum_tag_typet.
const typet & return_type() const
const parameterst & parameters() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
depth_iteratort depth_end()
depth_iteratort depth_begin()
void visit_pre(std::function< void(exprt &)>)
typet & type()
Return the type of the expression.
There are a large number of kinds of tree structured or tree-like data in CPROVER.
const irept & find(const irep_namet &name) const
const irep_idt & id() const
const irep_idt & get(const irep_namet &name) const
Base type for structs and unions.
const componentst & components() const
The type of an expression, extends irept.
#define forall_operands(it, expr)
Forward depth-first search iterators These iterators' copy operations are expensive,...
void find_type_and_expr_symbols(const exprt &src, find_symbols_sett &dest)
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,...
std::unordered_set< irep_idt > find_symbol_identifiers(const exprt &src)
Find identifiers of the sub expressions with id ID_symbol.
void find_non_pointer_type_symbols(const exprt &src, find_symbols_sett &dest)
void find_type_symbols(const exprt &src, find_symbols_sett &dest)
bool has_symbol(const exprt &src, const find_symbols_sett &symbols, bool current, bool next)
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.
std::unordered_set< irep_idt > find_symbols_sett
Ranges: pair of begin and end iterators, which can be initialized from containers,...
ranget< iteratort > make_range(iteratort begin, iteratort end)
API to expression classes.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast an exprt to a symbol_exprt.
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.
const struct_union_typet & to_struct_union_type(const typet &type)
Cast a typet to a struct_union_typet.
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a typet to a struct_tag_typet.
const type_with_subtypest & to_type_with_subtypes(const typet &type)
const type_with_subtypet & to_type_with_subtype(const typet &type)