CBMC
find_symbols.h File Reference
#include "irep.h"
#include <set>
#include <unordered_set>
+ Include dependency graph for find_symbols.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef std::unordered_set< irep_idtfind_symbols_sett
 

Functions

bool has_symbol_expr (const exprt &src, const irep_idt &identifier, bool include_bound_symbols)
 Returns true if one of the symbol expressions in src has identifier identifier; if include_bound_symbols is true, then bindings are included in the search. More...
 
void find_symbols (const exprt &src, find_symbols_sett &dest)
 Add to the set dest the sub-expressions of src with id ID_symbol, for both free and bound variables. More...
 
void find_symbols (const exprt &src, std::set< symbol_exprt > &dest)
 Find sub expressions with id ID_symbol, considering both free and bound variables. More...
 
std::set< symbol_exprtfind_symbols (const exprt &src)
 Find sub expressions with id ID_symbol, considering both free and bound variables. More...
 
find_symbols_sett find_symbol_identifiers (const exprt &src)
 Find identifiers of the sub expressions with id ID_symbol, considering both free and bound variables. More...
 
void find_type_symbols (const typet &src, find_symbols_sett &dest)
 Collect all type tags contained in src and add them to dest. More...
 
void find_type_symbols (const exprt &src, find_symbols_sett &dest)
 Collect all type tags contained in src and add them to dest. More...
 
void find_non_pointer_type_symbols (const typet &src, find_symbols_sett &dest)
 Collect type tags contained in src when the expression of such a type is not a pointer, and add them to dest. More...
 
void find_non_pointer_type_symbols (const exprt &src, find_symbols_sett &dest)
 Collect type tags contained in src when the expression of such a type is not a pointer, and add them to dest. More...
 
void find_type_and_expr_symbols (const typet &src, find_symbols_sett &dest, const std::vector< irep_idt > &subs_to_find={})
 Find identifiers with id ID_symbol of the sub expressions and the subs with ID in subs_to_find considering both free and bound variables, as well as any type tags. More...
 
void find_type_and_expr_symbols (const exprt &src, find_symbols_sett &dest, const std::vector< irep_idt > &subs_to_find={})
 Find identifiers with id ID_symbol of the sub expressions and the subs with ID in subs_to_find considering both free and bound variables, as well as any type tags. More...
 

Typedef Documentation

◆ find_symbols_sett

typedef std::unordered_set<irep_idt> find_symbols_sett

Definition at line 22 of file find_symbols.h.

Function Documentation

◆ find_non_pointer_type_symbols() [1/2]

void find_non_pointer_type_symbols ( const exprt src,
find_symbols_sett dest 
)

Collect type tags contained in src when the expression of such a type is not a pointer, and add them to dest.

Definition at line 296 of file find_symbols.cpp.

◆ find_non_pointer_type_symbols() [2/2]

void find_non_pointer_type_symbols ( const typet src,
find_symbols_sett dest 
)

Collect type tags contained in src when the expression of such a type is not a pointer, and add them to dest.

Definition at line 307 of file find_symbols.cpp.

◆ find_symbol_identifiers()

find_symbols_sett find_symbol_identifiers ( const exprt src)
inline

Find identifiers of the sub expressions with id ID_symbol, considering both free and bound variables.

Definition at line 53 of file find_symbols.h.

◆ find_symbols() [1/3]

std::set<symbol_exprt> find_symbols ( const exprt src)
inline

Find sub expressions with id ID_symbol, considering both free and bound variables.

Definition at line 44 of file find_symbols.h.

◆ find_symbols() [2/3]

void find_symbols ( const exprt src,
find_symbols_sett dest 
)

Add to the set dest the sub-expressions of src with id ID_symbol, for both free and bound variables.

Definition at line 348 of file find_symbols.cpp.

◆ find_symbols() [3/3]

void find_symbols ( const exprt src,
std::set< symbol_exprt > &  dest 
)

Find sub expressions with id ID_symbol, considering both free and bound variables.

Definition at line 259 of file find_symbols.cpp.

◆ find_type_and_expr_symbols() [1/2]

void find_type_and_expr_symbols ( const exprt src,
find_symbols_sett dest,
const std::vector< irep_idt > &  subs_to_find = {} 
)

Find identifiers with id ID_symbol of the sub expressions and the subs with ID in subs_to_find considering both free and bound variables, as well as any type tags.

Definition at line 318 of file find_symbols.cpp.

◆ find_type_and_expr_symbols() [2/2]

void find_type_and_expr_symbols ( const typet src,
find_symbols_sett dest,
const std::vector< irep_idt > &  subs_to_find = {} 
)

Find identifiers with id ID_symbol of the sub expressions and the subs with ID in subs_to_find considering both free and bound variables, as well as any type tags.

Definition at line 333 of file find_symbols.cpp.

◆ find_type_symbols() [1/2]

void find_type_symbols ( const exprt src,
find_symbols_sett dest 
)

Collect all type tags contained in src and add them to dest.

Definition at line 280 of file find_symbols.cpp.

◆ find_type_symbols() [2/2]

void find_type_symbols ( const typet src,
find_symbols_sett dest 
)

Collect all type tags contained in src and add them to dest.

Definition at line 288 of file find_symbols.cpp.

◆ has_symbol_expr()

bool has_symbol_expr ( const exprt src,
const irep_idt identifier,
bool  include_bound_symbols 
)

Returns true if one of the symbol expressions in src has identifier identifier; if include_bound_symbols is true, then bindings are included in the search.

Definition at line 267 of file find_symbols.cpp.