Skip to content

Commit c9733f3

Browse files
committed
Remove "::" from SYMEX_DYNAMIC_PREFIX
This is to prepare use in combination with get_fresh_aux_symbol.
1 parent d932d6f commit c9733f3

File tree

7 files changed

+11
-10
lines changed

7 files changed

+11
-10
lines changed

src/ansi-c/expr2c.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1648,7 +1648,7 @@ std::string expr2ct::convert_symbol(const exprt &src)
16481648
dest=id2string(entry->second);
16491649

16501650
#if 0
1651-
if(has_prefix(id2string(id), SYMEX_DYNAMIC_PREFIX "dynamic_object"))
1651+
if(has_prefix(id2string(id), SYMEX_DYNAMIC_PREFIX "::dynamic_object"))
16521652
{
16531653
if(sizeof_nesting++ == 0)
16541654
dest+=" /*"+convert(src.type());

src/goto-instrument/race_check.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static bool is_shared(const namespacet &ns, const symbol_exprt &symbol_expr)
130130
identifier == "stdout" || identifier == "stderr" ||
131131
identifier == "sys_nerr" ||
132132
has_prefix(id2string(identifier), "symex::invalid_object") ||
133-
has_prefix(id2string(identifier), SYMEX_DYNAMIC_PREFIX "dynamic_object"))
133+
has_prefix(id2string(identifier), SYMEX_DYNAMIC_PREFIX "::dynamic_object"))
134134
return false; // no race check
135135

136136
const symbolt &symbol=ns.lookup(identifier);

src/goto-programs/graphml_witness.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,9 @@ void graphml_witnesst::operator()(const goto_tracet &goto_trace)
459459
}
460460
else if(
461461
!contains_symbol_prefix(
462-
it->full_lhs_value, SYMEX_DYNAMIC_PREFIX "dynamic_object") &&
462+
it->full_lhs_value, SYMEX_DYNAMIC_PREFIX "::dynamic_object") &&
463463
!contains_symbol_prefix(
464-
it->full_lhs, SYMEX_DYNAMIC_PREFIX "dynamic_object") &&
464+
it->full_lhs, SYMEX_DYNAMIC_PREFIX "::dynamic_object") &&
465465
lhs_id.find("thread") == std::string::npos &&
466466
lhs_id.find("mutex") == std::string::npos &&
467467
(!it->full_lhs_value.is_constant() ||

src/goto-symex/symex_builtin_functions.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void goto_symext::symex_allocate(
142142
size_symbol.base_name=
143143
"dynamic_object_size"+std::to_string(dynamic_counter);
144144
size_symbol.name =
145-
SYMEX_DYNAMIC_PREFIX + id2string(size_symbol.base_name);
145+
SYMEX_DYNAMIC_PREFIX "::" + id2string(size_symbol.base_name);
146146
size_symbol.type=tmp_size.type();
147147
size_symbol.mode = mode;
148148
size_symbol.type.set(ID_C_constant, true);
@@ -161,7 +161,8 @@ void goto_symext::symex_allocate(
161161
symbolt value_symbol;
162162

163163
value_symbol.base_name="dynamic_object"+std::to_string(dynamic_counter);
164-
value_symbol.name = SYMEX_DYNAMIC_PREFIX + id2string(value_symbol.base_name);
164+
value_symbol.name =
165+
SYMEX_DYNAMIC_PREFIX "::" + id2string(value_symbol.base_name);
165166
value_symbol.is_lvalue=true;
166167
value_symbol.type = *object_type;
167168
value_symbol.type.set(ID_C_dynamic, true);
@@ -489,7 +490,7 @@ void goto_symext::symex_cpp_new(
489490
symbol.base_name=
490491
do_array?"dynamic_"+count_string+"_array":
491492
"dynamic_"+count_string+"_value";
492-
symbol.name = SYMEX_DYNAMIC_PREFIX + id2string(symbol.base_name);
493+
symbol.name = SYMEX_DYNAMIC_PREFIX "::" + id2string(symbol.base_name);
493494
symbol.is_lvalue=true;
494495
if(code.get(ID_statement)==ID_cpp_new_array ||
495496
code.get(ID_statement)==ID_cpp_new)

src/solvers/flattening/pointer_logic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ bool pointer_logict::is_dynamic_object(const exprt &expr) const
2828
(expr.id() == ID_symbol &&
2929
has_prefix(
3030
id2string(to_symbol_expr(expr).get_identifier()),
31-
SYMEX_DYNAMIC_PREFIX));
31+
SYMEX_DYNAMIC_PREFIX "::"));
3232
}
3333

3434
void pointer_logict::get_dynamic_objects(std::vector<mp_integer> &o) const

src/util/pointer_predicates.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Author: Daniel Kroening, [email protected]
1414

1515
#include "std_expr.h"
1616

17-
#define SYMEX_DYNAMIC_PREFIX "symex_dynamic::"
17+
#define SYMEX_DYNAMIC_PREFIX "symex_dynamic"
1818

1919
exprt same_object(const exprt &p1, const exprt &p2);
2020
exprt deallocated(const exprt &pointer, const namespacet &);

src/util/simplify_expr_pointer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ simplify_exprt::simplify_is_dynamic_object(const unary_exprt &expr)
594594

595595
// this is for the benefit of symex
596596
return make_boolean_expr(
597-
has_prefix(id2string(identifier), SYMEX_DYNAMIC_PREFIX));
597+
has_prefix(id2string(identifier), SYMEX_DYNAMIC_PREFIX "::"));
598598
}
599599
else if(op_object.id() == ID_string_constant)
600600
{

0 commit comments

Comments
 (0)