File tree 9 files changed +33
-9
lines changed
9 files changed +33
-9
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ OBJ += ../ansi-c/ansi-c$(LIBEXT) \
19
19
../pointer-analysis/add_failed_symbols$(OBJEXT ) \
20
20
../pointer-analysis/rewrite_index$(OBJEXT ) \
21
21
../pointer-analysis/goto_program_dereference$(OBJEXT ) \
22
+ ../pointer-analysis/dynamic_object_name$(OBJEXT ) \
22
23
../goto-instrument/full_slicer$(OBJEXT ) \
23
24
../goto-instrument/nondet_static$(OBJEXT ) \
24
25
../goto-instrument/cover$(OBJEXT ) \
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ OBJ += ../ansi-c/ansi-c$(LIBEXT) \
100
100
../pointer-analysis/add_failed_symbols$(OBJEXT ) \
101
101
../pointer-analysis/rewrite_index$(OBJEXT ) \
102
102
../pointer-analysis/goto_program_dereference$(OBJEXT ) \
103
+ ../pointer-analysis/dynamic_object_name$(OBJEXT ) \
103
104
../goto-instrument/full_slicer$(OBJEXT ) \
104
105
../analyses/analyses$(LIBEXT ) \
105
106
../langapi/langapi$(LIBEXT ) \
Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ SRC = value_set.cpp goto_program_dereference.cpp value_set_analysis.cpp \
5
5
value_set_analysis_fivr.cpp value_set_fivr.cpp value_set_domain_fivr.cpp \
6
6
value_set_analysis_fivrns.cpp value_set_fivrns.cpp \
7
7
value_set_domain_fivrns.cpp value_set_dereference.cpp \
8
- dereference_callback.cpp
8
+ dereference_callback.cpp \
9
+ dynamic_object_name.cpp \
10
+ # No more source files
9
11
10
12
INCLUDES = -I ..
11
13
Original file line number Diff line number Diff line change
1
+ /* ******************************************************************\
2
+
3
+ Module: Dynamic object name
4
+
5
+ Author: Marius-Constantin Melemciuc
6
+
7
+ Date: April 2017
8
+
9
+ @ Copyright Diffblue, Ltd.
10
+
11
+ \*******************************************************************/
12
+
13
+ #include " dynamic_object_name.h"
14
+
15
+ // We use std::string concatenation regularly with this string
16
+ // NOLINTNEXTLINE(runtime/string)
17
+ const std::string prefix_dynamic_object=" value_set::dynamic_object" ;
18
+
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ Date: April 2017
17
17
18
18
#include < util/std_expr.h>
19
19
20
+ extern const std::string prefix_dynamic_object;
21
+
20
22
/* ******************************************************************\
21
23
22
24
Function: get_dynamic_object_name
@@ -38,7 +40,7 @@ inline std::string get_dynamic_object_name(
38
40
const dynamic_object_exprt &dynamic_object)
39
41
{
40
42
std::string name=
41
- " value_set::dynamic_object " +
43
+ prefix_dynamic_object +
42
44
std::to_string (dynamic_object.get_instance ());
43
45
44
46
if (dynamic_object.get_recency ()==
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ bool value_sett::field_sensitive(
51
51
const namespacet &ns)
52
52
{
53
53
// we always track fields on these
54
- if (has_prefix (id2string (id), " value_set::dynamic_object " ) ||
54
+ if (has_prefix (id2string (id), prefix_dynamic_object ) ||
55
55
id==" value_set::return_value" ||
56
56
id==" value_set::memory" )
57
57
return true ;
@@ -152,7 +152,7 @@ void value_sett::output(
152
152
153
153
const entryt &e=v_it->second ;
154
154
155
- if (has_prefix (id2string (e.identifier ), " value_set::dynamic_object " ))
155
+ if (has_prefix (id2string (e.identifier ), prefix_dynamic_object ))
156
156
{
157
157
display_name=id2string (e.identifier )+e.suffix ;
158
158
identifier=" " ;
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ void value_set_fit::output(
64
64
65
65
const entryt &e=v_it->second ;
66
66
67
- if (has_prefix (id2string (e.identifier ), " value_set::dynamic_object " ))
67
+ if (has_prefix (id2string (e.identifier ), prefix_dynamic_object ))
68
68
{
69
69
display_name=id2string (e.identifier )+e.suffix ;
70
70
identifier=" " ;
@@ -316,7 +316,7 @@ bool value_set_fit::make_union(const value_set_fit::valuest &new_values)
316
316
{
317
317
// we always track these
318
318
if (has_prefix (id2string (it->second .identifier ),
319
- " value_set::dynamic_object " ) ||
319
+ prefix_dynamic_object ) ||
320
320
has_prefix (id2string (it->second .identifier ),
321
321
" value_set::return_value" ))
322
322
{
@@ -1434,7 +1434,7 @@ void value_set_fit::assign_rec(
1434
1434
const irep_idt &identifier=lhs.get (ID_identifier);
1435
1435
1436
1436
if (has_prefix (id2string (identifier),
1437
- " value_set::dynamic_object " ) ||
1437
+ prefix_dynamic_object ) ||
1438
1438
has_prefix (id2string (identifier),
1439
1439
" value_set::return_value" ) ||
1440
1440
values.find (id2string (identifier)+suffix)!=values.end ())
Original file line number Diff line number Diff line change @@ -1562,7 +1562,7 @@ void value_set_fivrt::assign_rec(
1562
1562
const irep_idt &identifier=lhs.get (ID_identifier);
1563
1563
1564
1564
if (has_prefix (id2string (identifier),
1565
- " value_set::dynamic_object " ) ||
1565
+ prefix_dynamic_object ) ||
1566
1566
has_prefix (id2string (identifier),
1567
1567
" value_set::return_value" ) ||
1568
1568
values.find (id2string (identifier)+suffix)!=values.end ())
Original file line number Diff line number Diff line change @@ -1202,7 +1202,7 @@ void value_set_fivrnst::assign_rec(
1202
1202
const irep_idt &identifier=lhs.get (ID_identifier);
1203
1203
1204
1204
if (has_prefix (id2string (identifier),
1205
- " value_set::dynamic_object " ) ||
1205
+ prefix_dynamic_object ) ||
1206
1206
has_prefix (id2string (identifier),
1207
1207
" value_set::return_value" ) ||
1208
1208
values.find (id2string (identifier)+suffix)!=values.end ())
You can’t perform that action at this time.
0 commit comments