@@ -84,9 +84,9 @@ class goto_symext
8484 // / footprint, so if keeping the state around is not necessary,
8585 // / clients should instead call goto_symext::symex_from_entry_point_of().
8686 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 &);
9090
9191 // / Symexes from the first instruction and the given state, terminating as
9292 // / soon as the last instruction is reached. This is useful to explicitly
@@ -97,8 +97,8 @@ class goto_symext
9797 // / \param first Entry point in form of a first instruction.
9898 // / \param limit Final instruction, which itself will not be symexed.
9999 virtual void symex_instruction_range (
100- statet &state ,
101- const goto_functionst &goto_functions ,
100+ statet &,
101+ const goto_functionst &,
102102 goto_programt::const_targett first,
103103 goto_programt::const_targett limit);
104104
@@ -111,8 +111,8 @@ class goto_symext
111111 // / \param limit final instruction, which itself will not
112112 // / be symexed.
113113 void initialize_entry_point (
114- statet &state ,
115- const goto_functionst &goto_functions ,
114+ statet &,
115+ const goto_functionst &,
116116 goto_programt::const_targett pc,
117117 goto_programt::const_targett limit);
118118
@@ -121,16 +121,16 @@ class goto_symext
121121 // / \param state Current GOTO symex step.
122122 // / \param goto_functions GOTO model to symex.
123123 void symex_threaded_step (
124- statet &state , const goto_functionst &goto_functions );
124+ statet &, const goto_functionst &);
125125
126126 /* * execute just one step */
127127 virtual void symex_step (
128- const goto_functionst &goto_functions ,
129- statet &state );
128+ const goto_functionst &,
129+ statet &);
130130
131131public:
132132 // these bypass the target maps
133- virtual void symex_step_goto (statet &state , bool taken);
133+ virtual void symex_step_goto (statet &, bool taken);
134134
135135 // statistics
136136 unsigned total_vccs, remaining_vccs;
@@ -160,37 +160,33 @@ class goto_symext
160160 // b) remove pointer dereferencing
161161 // c) rewrite array_equal expression into equality
162162 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);
176172
177173 void dereference_rec (
178- exprt &expr ,
179- statet &state ,
180- guardt &guard ,
174+ exprt &,
175+ statet &,
176+ guardt &,
181177 const bool write);
182178
183179 void dereference_rec_address_of (
184- exprt &expr ,
185- statet &state ,
186- guardt &guard );
180+ exprt &,
181+ statet &,
182+ guardt &);
187183
188184 static bool is_index_member_symbol_if (const exprt &expr);
189185
190186 exprt address_arithmetic (
191- const exprt &expr ,
192- statet &state ,
193- guardt &guard ,
187+ const exprt &,
188+ statet &,
189+ guardt &,
194190 bool keep_array);
195191
196192 // guards
@@ -199,83 +195,81 @@ class goto_symext
199195
200196 // symex
201197 virtual void symex_transition (
202- statet &state ,
198+ statet &,
203199 goto_programt::const_targett to,
204200 bool is_backwards_goto=false );
201+
205202 virtual void symex_transition (statet &state)
206203 {
207204 goto_programt::const_targett next=state.source .pc ;
208205 ++next;
209206 symex_transition (state, next);
210207 }
211208
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 &);
223217
224218 virtual void vcc (
225- const exprt &expr ,
219+ const exprt &,
226220 const std::string &msg,
227- statet &state );
221+ statet &);
228222
229- virtual void symex_assume (statet &state , const exprt &cond);
223+ virtual void symex_assume (statet &, const exprt &cond);
230224
231225 // gotos
232- void merge_gotos (statet &state );
226+ void merge_gotos (statet &);
233227
234228 virtual void merge_goto (
235229 const statet::goto_statet &goto_state,
236- statet &state );
230+ statet &);
237231
238232 void merge_value_sets (
239233 const statet::goto_statet &goto_state,
240234 statet &dest);
241235
242236 void phi_function (
243237 const statet::goto_statet &goto_state,
244- statet &state );
238+ statet &);
245239
246240 // determine whether to unwind a loop -- true indicates abort,
247241 // with false we continue.
248242 virtual bool get_unwind (
249243 const symex_targett::sourcet &source,
250244 unsigned unwind);
251245
252- virtual void loop_bound_exceeded (statet &state , const exprt &guard);
246+ virtual void loop_bound_exceeded (statet &, const exprt &guard);
253247
254248 // function calls
255249
256- void pop_frame (statet &state );
257- void return_assignment (statet &state );
250+ void pop_frame (statet &);
251+ void return_assignment (statet &);
258252
259253 virtual void no_body (const irep_idt &identifier)
260254 {
261255 }
262256
263257 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 &);
267261
268- virtual void symex_end_of_function (statet &state );
262+ virtual void symex_end_of_function (statet &);
269263
270264 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 &);
274268
275269 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 &);
279273
280274 virtual bool get_unwind_recursion (
281275 const irep_idt &identifier,
@@ -284,106 +278,104 @@ class goto_symext
284278
285279 void parameter_assignments (
286280 const irep_idt function_identifier,
287- const goto_functionst::goto_functiont &goto_function ,
288- statet &state ,
281+ const goto_functionst::goto_functiont &,
282+ statet &,
289283 const exprt::operandst &arguments);
290284
291285 void locality (
292286 const irep_idt function_identifier,
293- statet &state ,
294- const goto_functionst::goto_functiont &goto_function );
287+ statet &,
288+ const goto_functionst::goto_functiont &);
295289
296290 void add_end_of_function (
297291 exprt &code,
298292 const irep_idt &identifier);
299293
300294 // exceptions
295+ void symex_throw (statet &);
296+ void symex_catch (statet &);
301297
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 &);
306299
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 &);
309301
310302 // havocs the given object
311303 void havoc_rec (statet &, const guardt &, const exprt &);
312304
313305 typedef symex_targett::assignment_typet assignment_typet;
314306
315307 void symex_assign_rec (
316- statet &state ,
308+ statet &,
317309 const exprt &lhs,
318310 const exprt &full_lhs,
319311 const exprt &rhs,
320- guardt &guard ,
321- assignment_typet assignment_type );
312+ guardt &,
313+ assignment_typet);
322314 void symex_assign_symbol (
323- statet &state ,
315+ statet &,
324316 const ssa_exprt &lhs,
325317 const exprt &full_lhs,
326318 const exprt &rhs,
327- guardt &guard ,
328- assignment_typet assignment_type );
319+ guardt &,
320+ assignment_typet);
329321 void symex_assign_typecast (
330- statet &state ,
322+ statet &,
331323 const typecast_exprt &lhs,
332324 const exprt &full_lhs,
333325 const exprt &rhs,
334- guardt &guard ,
335- assignment_typet assignment_type );
326+ guardt &,
327+ assignment_typet);
336328 void symex_assign_array (
337- statet &state ,
329+ statet &,
338330 const index_exprt &lhs,
339331 const exprt &full_lhs,
340332 const exprt &rhs,
341- guardt &guard ,
342- assignment_typet assignment_type );
333+ guardt &,
334+ assignment_typet);
343335 void symex_assign_struct_member (
344- statet &state ,
336+ statet &,
345337 const member_exprt &lhs,
346338 const exprt &full_lhs,
347339 const exprt &rhs,
348- guardt &guard ,
349- assignment_typet assignment_type );
340+ guardt &,
341+ assignment_typet);
350342 void symex_assign_if (
351- statet &state ,
343+ statet &,
352344 const if_exprt &lhs,
353345 const exprt &full_lhs,
354346 const exprt &rhs,
355- guardt &guard ,
356- assignment_typet assignment_type );
347+ guardt &,
348+ assignment_typet);
357349 void symex_assign_byte_extract (
358- statet &state ,
350+ statet &,
359351 const byte_extract_exprt &lhs,
360352 const exprt &full_lhs,
361353 const exprt &rhs,
362- guardt &guard ,
363- assignment_typet assignment_type );
354+ guardt &,
355+ assignment_typet);
364356
365357 static exprt add_to_lhs (const exprt &lhs, const exprt &what);
366358
367359 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 &);
369361 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 &);
372364 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 &);
380372
381373 static unsigned nondet_count;
382374 static unsigned dynamic_counter;
383375
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 &);
387379};
388380
389381#endif // CPROVER_GOTO_SYMEX_GOTO_SYMEX_H
0 commit comments