@@ -84,9 +84,9 @@ class goto_symext
84
84
// / footprint, so if keeping the state around is not necessary,
85
85
// / clients should instead call goto_symext::symex_from_entry_point_of().
86
86
virtual void symex_with_state (
87
- statet &state ,
88
- const goto_functionst &goto_functions ,
89
- const goto_programt &goto_program );
87
+ statet &,
88
+ const goto_functionst &,
89
+ const goto_programt &);
90
90
91
91
// / Symexes from the first instruction and the given state, terminating as
92
92
// / soon as the last instruction is reached. This is useful to explicitly
@@ -97,8 +97,8 @@ class goto_symext
97
97
// / \param first Entry point in form of a first instruction.
98
98
// / \param limit Final instruction, which itself will not be symexed.
99
99
virtual void symex_instruction_range (
100
- statet &state ,
101
- const goto_functionst &goto_functions ,
100
+ statet &,
101
+ const goto_functionst &,
102
102
goto_programt::const_targett first,
103
103
goto_programt::const_targett limit);
104
104
@@ -111,8 +111,8 @@ class goto_symext
111
111
// / \param limit final instruction, which itself will not
112
112
// / be symexed.
113
113
void initialize_entry_point (
114
- statet &state ,
115
- const goto_functionst &goto_functions ,
114
+ statet &,
115
+ const goto_functionst &,
116
116
goto_programt::const_targett pc,
117
117
goto_programt::const_targett limit);
118
118
@@ -121,16 +121,16 @@ class goto_symext
121
121
// / \param state Current GOTO symex step.
122
122
// / \param goto_functions GOTO model to symex.
123
123
void symex_threaded_step (
124
- statet &state , const goto_functionst &goto_functions );
124
+ statet &, const goto_functionst &);
125
125
126
126
/* * execute just one step */
127
127
virtual void symex_step (
128
- const goto_functionst &goto_functions ,
129
- statet &state );
128
+ const goto_functionst &,
129
+ statet &);
130
130
131
131
public:
132
132
// these bypass the target maps
133
- virtual void symex_step_goto (statet &state , bool taken);
133
+ virtual void symex_step_goto (statet &, bool taken);
134
134
135
135
// statistics
136
136
unsigned total_vccs, remaining_vccs;
@@ -160,37 +160,33 @@ class goto_symext
160
160
// b) remove pointer dereferencing
161
161
// c) rewrite array_equal expression into equality
162
162
void clean_expr (
163
- exprt &expr, statet &state, bool write);
164
-
165
- void replace_array_equal (exprt &expr);
166
- void trigger_auto_object (const exprt &expr, statet &state);
167
- void initialize_auto_object (const exprt &expr, statet &state);
168
- void process_array_expr (exprt &expr);
169
- void process_array_expr_rec (exprt &expr, const typet &type) const ;
170
- exprt make_auto_object (const typet &type);
171
-
172
- virtual void dereference (
173
- exprt &expr,
174
- statet &state,
175
- const bool write);
163
+ exprt &, statet &, bool write);
164
+
165
+ void replace_array_equal (exprt &);
166
+ void trigger_auto_object (const exprt &, statet &);
167
+ void initialize_auto_object (const exprt &, statet &);
168
+ void process_array_expr (exprt &);
169
+ void process_array_expr_rec (exprt &, const typet &) const ;
170
+ exprt make_auto_object (const typet &);
171
+ virtual void dereference (exprt &, statet &, const bool write);
176
172
177
173
void dereference_rec (
178
- exprt &expr ,
179
- statet &state ,
180
- guardt &guard ,
174
+ exprt &,
175
+ statet &,
176
+ guardt &,
181
177
const bool write);
182
178
183
179
void dereference_rec_address_of (
184
- exprt &expr ,
185
- statet &state ,
186
- guardt &guard );
180
+ exprt &,
181
+ statet &,
182
+ guardt &);
187
183
188
184
static bool is_index_member_symbol_if (const exprt &expr);
189
185
190
186
exprt address_arithmetic (
191
- const exprt &expr ,
192
- statet &state ,
193
- guardt &guard ,
187
+ const exprt &,
188
+ statet &,
189
+ guardt &,
194
190
bool keep_array);
195
191
196
192
// guards
@@ -199,83 +195,81 @@ class goto_symext
199
195
200
196
// symex
201
197
virtual void symex_transition (
202
- statet &state ,
198
+ statet &,
203
199
goto_programt::const_targett to,
204
200
bool is_backwards_goto=false );
201
+
205
202
virtual void symex_transition (statet &state)
206
203
{
207
204
goto_programt::const_targett next=state.source .pc ;
208
205
++next;
209
206
symex_transition (state, next);
210
207
}
211
208
212
- virtual void symex_goto (statet &state);
213
- virtual void symex_start_thread (statet &state);
214
- virtual void symex_atomic_begin (statet &state);
215
- virtual void symex_atomic_end (statet &state);
216
- virtual void symex_decl (statet &state);
217
- virtual void symex_decl (statet &state, const symbol_exprt &expr);
218
- virtual void symex_dead (statet &state);
219
-
220
- virtual void symex_other (
221
- const goto_functionst &goto_functions,
222
- statet &state);
209
+ virtual void symex_goto (statet &);
210
+ virtual void symex_start_thread (statet &);
211
+ virtual void symex_atomic_begin (statet &);
212
+ virtual void symex_atomic_end (statet &);
213
+ virtual void symex_decl (statet &);
214
+ virtual void symex_decl (statet &, const symbol_exprt &expr);
215
+ virtual void symex_dead (statet &);
216
+ virtual void symex_other (const goto_functionst &, statet &);
223
217
224
218
virtual void vcc (
225
- const exprt &expr ,
219
+ const exprt &,
226
220
const std::string &msg,
227
- statet &state );
221
+ statet &);
228
222
229
- virtual void symex_assume (statet &state , const exprt &cond);
223
+ virtual void symex_assume (statet &, const exprt &cond);
230
224
231
225
// gotos
232
- void merge_gotos (statet &state );
226
+ void merge_gotos (statet &);
233
227
234
228
virtual void merge_goto (
235
229
const statet::goto_statet &goto_state,
236
- statet &state );
230
+ statet &);
237
231
238
232
void merge_value_sets (
239
233
const statet::goto_statet &goto_state,
240
234
statet &dest);
241
235
242
236
void phi_function (
243
237
const statet::goto_statet &goto_state,
244
- statet &state );
238
+ statet &);
245
239
246
240
// determine whether to unwind a loop -- true indicates abort,
247
241
// with false we continue.
248
242
virtual bool get_unwind (
249
243
const symex_targett::sourcet &source,
250
244
unsigned unwind);
251
245
252
- virtual void loop_bound_exceeded (statet &state , const exprt &guard);
246
+ virtual void loop_bound_exceeded (statet &, const exprt &guard);
253
247
254
248
// function calls
255
249
256
- void pop_frame (statet &state );
257
- void return_assignment (statet &state );
250
+ void pop_frame (statet &);
251
+ void return_assignment (statet &);
258
252
259
253
virtual void no_body (const irep_idt &identifier)
260
254
{
261
255
}
262
256
263
257
virtual void symex_function_call (
264
- const goto_functionst &goto_functions ,
265
- statet &state ,
266
- const code_function_callt &call );
258
+ const goto_functionst &,
259
+ statet &,
260
+ const code_function_callt &);
267
261
268
- virtual void symex_end_of_function (statet &state );
262
+ virtual void symex_end_of_function (statet &);
269
263
270
264
virtual void symex_function_call_symbol (
271
- const goto_functionst &goto_functions ,
272
- statet &state ,
273
- const code_function_callt &call );
265
+ const goto_functionst &,
266
+ statet &,
267
+ const code_function_callt &);
274
268
275
269
virtual void symex_function_call_code (
276
- const goto_functionst &goto_functions ,
277
- statet &state ,
278
- const code_function_callt &call );
270
+ const goto_functionst &,
271
+ statet &,
272
+ const code_function_callt &);
279
273
280
274
virtual bool get_unwind_recursion (
281
275
const irep_idt &identifier,
@@ -284,106 +278,104 @@ class goto_symext
284
278
285
279
void parameter_assignments (
286
280
const irep_idt function_identifier,
287
- const goto_functionst::goto_functiont &goto_function ,
288
- statet &state ,
281
+ const goto_functionst::goto_functiont &,
282
+ statet &,
289
283
const exprt::operandst &arguments);
290
284
291
285
void locality (
292
286
const irep_idt function_identifier,
293
- statet &state ,
294
- const goto_functionst::goto_functiont &goto_function );
287
+ statet &,
288
+ const goto_functionst::goto_functiont &);
295
289
296
290
void add_end_of_function (
297
291
exprt &code,
298
292
const irep_idt &identifier);
299
293
300
294
// exceptions
295
+ void symex_throw (statet &);
296
+ void symex_catch (statet &);
301
297
302
- void symex_throw (statet &state);
303
- void symex_catch (statet &state);
304
-
305
- virtual void do_simplify (exprt &expr);
298
+ virtual void do_simplify (exprt &);
306
299
307
- // virtual void symex_block(statet &state, const codet &code);
308
- void symex_assign (statet &state, const code_assignt &code);
300
+ void symex_assign (statet &, const code_assignt &);
309
301
310
302
// havocs the given object
311
303
void havoc_rec (statet &, const guardt &, const exprt &);
312
304
313
305
typedef symex_targett::assignment_typet assignment_typet;
314
306
315
307
void symex_assign_rec (
316
- statet &state ,
308
+ statet &,
317
309
const exprt &lhs,
318
310
const exprt &full_lhs,
319
311
const exprt &rhs,
320
- guardt &guard ,
321
- assignment_typet assignment_type );
312
+ guardt &,
313
+ assignment_typet);
322
314
void symex_assign_symbol (
323
- statet &state ,
315
+ statet &,
324
316
const ssa_exprt &lhs,
325
317
const exprt &full_lhs,
326
318
const exprt &rhs,
327
- guardt &guard ,
328
- assignment_typet assignment_type );
319
+ guardt &,
320
+ assignment_typet);
329
321
void symex_assign_typecast (
330
- statet &state ,
322
+ statet &,
331
323
const typecast_exprt &lhs,
332
324
const exprt &full_lhs,
333
325
const exprt &rhs,
334
- guardt &guard ,
335
- assignment_typet assignment_type );
326
+ guardt &,
327
+ assignment_typet);
336
328
void symex_assign_array (
337
- statet &state ,
329
+ statet &,
338
330
const index_exprt &lhs,
339
331
const exprt &full_lhs,
340
332
const exprt &rhs,
341
- guardt &guard ,
342
- assignment_typet assignment_type );
333
+ guardt &,
334
+ assignment_typet);
343
335
void symex_assign_struct_member (
344
- statet &state ,
336
+ statet &,
345
337
const member_exprt &lhs,
346
338
const exprt &full_lhs,
347
339
const exprt &rhs,
348
- guardt &guard ,
349
- assignment_typet assignment_type );
340
+ guardt &,
341
+ assignment_typet);
350
342
void symex_assign_if (
351
- statet &state ,
343
+ statet &,
352
344
const if_exprt &lhs,
353
345
const exprt &full_lhs,
354
346
const exprt &rhs,
355
- guardt &guard ,
356
- assignment_typet assignment_type );
347
+ guardt &,
348
+ assignment_typet);
357
349
void symex_assign_byte_extract (
358
- statet &state ,
350
+ statet &,
359
351
const byte_extract_exprt &lhs,
360
352
const exprt &full_lhs,
361
353
const exprt &rhs,
362
- guardt &guard ,
363
- assignment_typet assignment_type );
354
+ guardt &,
355
+ assignment_typet);
364
356
365
357
static exprt add_to_lhs (const exprt &lhs, const exprt &what);
366
358
367
359
virtual void symex_gcc_builtin_va_arg_next (
368
- statet &state , const exprt &lhs, const side_effect_exprt &code );
360
+ statet &, const exprt &lhs, const side_effect_exprt &);
369
361
virtual void symex_allocate (
370
- statet &state , const exprt &lhs, const side_effect_exprt &code );
371
- virtual void symex_cpp_delete (statet &state , const codet &code );
362
+ statet &, const exprt &lhs, const side_effect_exprt &);
363
+ virtual void symex_cpp_delete (statet &, const codet &);
372
364
virtual void symex_cpp_new (
373
- statet &state , const exprt &lhs, const side_effect_exprt &code );
374
- virtual void symex_fkt (statet &state , const code_function_callt &code );
375
- virtual void symex_macro (statet &state , const code_function_callt &code );
376
- virtual void symex_trace (statet &state , const code_function_callt &code );
377
- virtual void symex_printf (statet &state , const exprt &lhs, const exprt &rhs);
378
- virtual void symex_input (statet &state , const codet &code );
379
- virtual void symex_output (statet &state , const codet &code );
365
+ statet &, const exprt &lhs, const side_effect_exprt &);
366
+ virtual void symex_fkt (statet &, const code_function_callt &);
367
+ virtual void symex_macro (statet &, const code_function_callt &);
368
+ virtual void symex_trace (statet &, const code_function_callt &);
369
+ virtual void symex_printf (statet &, const exprt &lhs, const exprt &rhs);
370
+ virtual void symex_input (statet &, const codet &);
371
+ virtual void symex_output (statet &, const codet &);
380
372
381
373
static unsigned nondet_count;
382
374
static unsigned dynamic_counter;
383
375
384
- void read (exprt &expr );
385
- void replace_nondet (exprt &expr );
386
- void rewrite_quantifiers (exprt &expr , statet &state );
376
+ void read (exprt &);
377
+ void replace_nondet (exprt &);
378
+ void rewrite_quantifiers (exprt &, statet &);
387
379
};
388
380
389
381
#endif // CPROVER_GOTO_SYMEX_GOTO_SYMEX_H
0 commit comments