@@ -99,6 +99,51 @@ exprt taint_instrumentert::
99
99
return fixed_initialiser;
100
100
}
101
101
102
+ static bool is_array_reference (const typet &type)
103
+ {
104
+ return type.id ()==ID_symbol &&
105
+ to_symbol_type (type).get_identifier ()==" java::array[reference]" ;
106
+ }
107
+
108
+ static bool is_pointer_to_array_reference (const typet &type)
109
+ {
110
+ return type.id ()==ID_pointer &&
111
+ is_array_reference (to_pointer_type (type).subtype ());
112
+ }
113
+
114
+ static bool is_binary_expression (const exprt &expr)
115
+ {
116
+ return expr.id ()==ID_lt ||
117
+ expr.id ()==ID_le ||
118
+ expr.id ()==ID_gt ||
119
+ expr.id ()==ID_ge ||
120
+ expr.id ()==ID_equal ||
121
+ expr.id ()==ID_notequal ||
122
+ expr.id ()==ID_plus ||
123
+ expr.id ()==ID_minus ||
124
+ expr.id ()==ID_mult ||
125
+ expr.id ()==ID_div ||
126
+ expr.id ()==ID_mod ||
127
+ expr.id ()==ID_rem ||
128
+ expr.id ()==ID_shr ||
129
+ expr.id ()==ID_ashr ||
130
+ expr.id ()==ID_lshr ||
131
+ expr.id ()==ID_shl ||
132
+ expr.id ()==ID_rol ||
133
+ expr.id ()==ID_ror;
134
+ }
135
+
136
+ static bool is_unary_expression (const exprt &expr)
137
+ {
138
+ return expr.id ()==ID_unary_plus || expr.id ()==ID_unary_minus;
139
+ }
140
+
141
+ static bool is_unary_or_binary_expression (const exprt &expr)
142
+ {
143
+ return is_binary_expression (expr) ||
144
+ is_unary_expression (expr);
145
+ }
146
+
102
147
void taint_instrumentert::instrument_instructions_with_shadow_variables (
103
148
goto_programt::instructionst &instructions_to_be_instrumented,
104
149
const taint_instrumentation_propst &props) const
@@ -175,6 +220,10 @@ taint_instrumentert::taint_instrumentert(
175
220
, use_data_flow_insensitive_version(
176
221
in_props.data_flow_insensitive_version_applied())
177
222
{
223
+ // The line below contains two dummy statements preventing Travis complain
224
+ // about not used functions. These statements will be erased in the next PR
225
+ // when the functions will be used.
226
+ (void )&is_pointer_to_array_reference; (void )&is_unary_or_binary_expression;
178
227
}
179
228
180
229
// / Builds a new symbol table from the original symbol
0 commit comments