cprover
find_symbols.cpp File Reference
#include "find_symbols.h"
#include "c_types.h"
#include "expr_iterator.h"
#include "range.h"
#include "std_expr.h"
#include "std_types.h"
+ Include dependency graph for find_symbols.cpp:

Go to the source code of this file.

Enumerations

enum  kindt { kindt::F_TYPE, kindt::F_TYPE_NON_PTR, kindt::F_EXPR, kindt::F_BOTH }
 

Functions

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. More...
 
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, and ID_next_symbol if next is true. More...
 
bool has_symbol (const exprt &src, const find_symbols_sett &symbols, bool current, bool next)
 
bool has_symbol (const exprt &src, const find_symbols_sett &symbols)
 
void find_symbols (const exprt &src, std::set< symbol_exprt > &dest)
 Find sub expressions with id ID_symbol. More...
 
std::set< symbol_exprtfind_symbols (const exprt &src)
 Find sub expressions with id ID_symbol. More...
 
std::unordered_set< irep_idtfind_symbol_identifiers (const exprt &src)
 Find identifiers of the sub expressions with id ID_symbol. More...
 
void find_symbols (kindt kind, const typet &src, find_symbols_sett &dest)
 
void find_symbols (kindt kind, const exprt &src, find_symbols_sett &dest)
 
void find_type_symbols (const exprt &src, find_symbols_sett &dest)
 
void find_type_symbols (const typet &src, find_symbols_sett &dest)
 
void find_non_pointer_type_symbols (const exprt &src, find_symbols_sett &dest)
 
void find_non_pointer_type_symbols (const typet &src, find_symbols_sett &dest)
 
void find_type_and_expr_symbols (const exprt &src, find_symbols_sett &dest)
 
void find_type_and_expr_symbols (const typet &src, find_symbols_sett &dest)
 

Enumeration Type Documentation

◆ kindt

enum kindt
strong
Enumerator
F_TYPE 
F_TYPE_NON_PTR 
F_EXPR 
F_BOTH 

Definition at line 17 of file find_symbols.cpp.

Function Documentation

◆ find_non_pointer_type_symbols() [1/2]

void find_non_pointer_type_symbols ( const exprt src,
find_symbols_sett dest 
)

Definition at line 187 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 
)

Definition at line 194 of file find_symbols.cpp.

◆ find_symbol_identifiers()

std::unordered_set<irep_idt> find_symbol_identifiers ( const exprt src)

Find identifiers of the sub expressions with id ID_symbol.

Definition at line 82 of file find_symbols.cpp.

◆ find_symbols() [1/5]

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

Find sub expressions with id ID_symbol.

Definition at line 75 of file find_symbols.cpp.

◆ find_symbols() [2/5]

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, and ID_next_symbol if next is true.

Definition at line 24 of file find_symbols.cpp.

◆ find_symbols() [3/5]

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

Find sub expressions with id ID_symbol.

Definition at line 65 of file find_symbols.cpp.

◆ find_symbols() [4/5]

void find_symbols ( kindt  kind,
const exprt src,
find_symbols_sett dest 
)

Definition at line 94 of file find_symbols.cpp.

◆ find_symbols() [5/5]

void find_symbols ( kindt  kind,
const typet src,
find_symbols_sett dest 
)

Definition at line 120 of file find_symbols.cpp.

◆ find_symbols_or_nexts()

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.

Definition at line 19 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 
)

Definition at line 201 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 
)

Definition at line 206 of file find_symbols.cpp.

◆ find_type_symbols() [1/2]

void find_type_symbols ( const exprt src,
find_symbols_sett dest 
)

Definition at line 177 of file find_symbols.cpp.

◆ find_type_symbols() [2/2]

void find_type_symbols ( const typet src,
find_symbols_sett dest 
)

Definition at line 182 of file find_symbols.cpp.

◆ has_symbol() [1/2]

bool has_symbol ( const exprt src,
const find_symbols_sett symbols 
)
Returns
true if one of the symbols in src is present in symbols

Definition at line 58 of file find_symbols.cpp.

◆ has_symbol() [2/2]

bool has_symbol ( const exprt src,
const find_symbols_sett symbols,
bool  current,
bool  next 
)

Definition at line 38 of file find_symbols.cpp.