10 #ifndef CPROVER_UTIL_REPLACE_SYMBOL_H
11 #define CPROVER_UTIL_REPLACE_SYMBOL_H
21 #include <unordered_map>
30 typedef std::unordered_map<irep_idt, exprt>
expr_mapt;
36 const exprt &new_expr);
69 expr_mapt::iterator
erase(expr_mapt::iterator it)
~set_require_lvalue_and_backupt()
set_require_lvalue_and_backupt(bool &require_lvalue, const bool value)
Replace symbols with constants while maintaining syntactically valid expressions.
bool replace_symbol_expr(symbol_exprt &dest) const override
bool replace(exprt &dest) const override
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
Replace a symbol expression by a given expression.
virtual bool replace(exprt &dest) const
std::size_t erase(const irep_idt &id)
bool have_to_replace(const exprt &dest) const
void set(const class symbol_exprt &old_expr, const exprt &new_expr)
Sets old_expr to be replaced by new_expr.
const expr_mapt & get_expr_map() const
void operator()(exprt &dest) const
expr_mapt & get_expr_map()
expr_mapt::iterator erase(expr_mapt::iterator it)
std::set< irep_idt > bindings
virtual ~replace_symbolt()
virtual bool replace_symbol_expr(symbol_exprt &dest) const
std::unordered_map< irep_idt, exprt > expr_mapt
void insert(const class symbol_exprt &old_expr, const exprt &new_expr)
Sets old_expr to be replaced by new_expr if we don't already have a replacement; otherwise does nothi...
bool replaces_symbol(const irep_idt &id) const
void operator()(typet &dest) const
Expression to hold a symbol (variable)
The type of an expression, extends irept.
bool replace_symbol_expr(symbol_exprt &dest) const override
unchecked_replace_symbolt()
void insert(const symbol_exprt &old_expr, const exprt &new_expr)