File tree Expand file tree Collapse file tree 2 files changed +1
-39
lines changed Expand file tree Collapse file tree 2 files changed +1
-39
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,9 @@ Author: Daniel Kroening, kroening@kroening.com
8
8
9
9
#include " rename.h"
10
10
11
- #include < algorithm >
11
+ #include < string >
12
12
13
13
#include " symbol.h"
14
- #include " expr.h"
15
14
#include " namespace.h"
16
15
17
16
// / automated variable renaming
@@ -35,34 +34,3 @@ void get_new_name(irep_idt &new_name, const namespacet &ns)
35
34
36
35
new_name=prefix+std::to_string (ns.get_max (prefix)+1 );
37
36
}
38
-
39
- // / automated variable renaming
40
- // / \par parameters: expression, old name, new name
41
- // / \return modifies the expression returns false iff something was renamed
42
- bool rename (exprt &expr, const irep_idt &old_name,
43
- const irep_idt &new_name)
44
- {
45
- bool result=true ;
46
-
47
- if (expr.id ()==ID_symbol)
48
- {
49
- if (expr.get (ID_identifier)==old_name)
50
- {
51
- expr.set (ID_identifier, new_name);
52
- result=false ;
53
- }
54
- }
55
- else
56
- {
57
- if (expr.id ()==ID_address_of)
58
- {
59
- // TODO
60
- }
61
- else
62
- Forall_operands (it, expr)
63
- if (!rename (*it, old_name, new_name))
64
- result=false ;
65
- }
66
-
67
- return result;
68
- }
Original file line number Diff line number Diff line change @@ -26,10 +26,4 @@ void get_new_name(symbolt &symbol,
26
26
void get_new_name (irep_idt &new_name,
27
27
const namespacet &ns);
28
28
29
- // true: did nothing
30
- // false: renamed something in the expression
31
-
32
- bool rename (exprt &expr, const irep_idt &old_name,
33
- const irep_idt &new_name);
34
-
35
29
#endif // CPROVER_UTIL_RENAME_H
You can’t perform that action at this time.
0 commit comments