cprover
rename.cpp File Reference
#include "rename.h"
#include <algorithm>
#include "symbol.h"
#include "expr.h"
#include "namespace.h"
Include dependency graph for rename.cpp:

Go to the source code of this file.

Functions

void get_new_name (symbolt &symbol, const namespacet &ns)
 automated variable renaming More...
 
void get_new_name (irep_idt &new_name, const namespacet &ns)
 automated variable renaming More...
 
bool rename (exprt &expr, const irep_idt &old_name, const irep_idt &new_name)
 automated variable renaming More...
 

Function Documentation

§ get_new_name() [1/2]

void get_new_name ( symbolt symbol,
const namespacet ns 
)

automated variable renaming

parameters: symbol to be renamed, namespace
Returns
new symbol

Definition at line 20 of file rename.cpp.

References get_new_name(), and symbolt::name.

Referenced by value_set_dereferencet::dereference(), get_new_name(), has_and_or(), goto_convertt::new_name(), and goto_symext::new_name().

§ get_new_name() [2/2]

void get_new_name ( irep_idt new_name,
const namespacet ns 
)

automated variable renaming

parameters: symbol to be renamed, namespace
Returns
new symbol

Definition at line 28 of file rename.cpp.

References namespacet::get_max(), id2string(), and namespacet::lookup().

§ rename()

bool rename ( exprt expr,
const irep_idt old_name,
const irep_idt new_name 
)

automated variable renaming

parameters: expression, old name, new name
Returns
modifies the expression returns false iff something was renamed

Definition at line 42 of file rename.cpp.

References Forall_operands, irept::get(), irept::id(), rename(), and irept::set().

Referenced by as_modet::as_hybrid_binary(), gcc_modet::gcc_hybrid_binary(), and rename().