@@ -16,7 +16,7 @@ Author: Daniel Kroening, kroening@kroening.com
1616
1717#include < goto-programs/remove_skip.h>
1818
19- #include " function_modifies .h"
19+ #include " function_assigns .h"
2020#include " havoc_utils.h"
2121#include " loop_utils.h"
2222
@@ -26,23 +26,23 @@ class havoc_loopst
2626 typedef goto_functionst::goto_functiont goto_functiont;
2727
2828 havoc_loopst (
29- function_modifiest &_function_modifies ,
30- goto_functiont &_goto_function):
31- goto_function (_goto_function),
32- local_may_alias (_goto_function),
33- function_modifies (_function_modifies ),
34- natural_loops (_goto_function.body)
29+ function_assignst &_function_assigns ,
30+ goto_functiont &_goto_function)
31+ : goto_function(_goto_function),
32+ local_may_alias (_goto_function),
33+ function_assigns(_function_assigns ),
34+ natural_loops(_goto_function.body)
3535 {
3636 havoc_loops ();
3737 }
3838
3939protected:
4040 goto_functiont &goto_function;
4141 local_may_aliast local_may_alias;
42- function_modifiest &function_modifies ;
42+ function_assignst &function_assigns ;
4343 natural_loops_mutablet natural_loops;
4444
45- typedef std::set<exprt> modifiest ;
45+ typedef std::set<exprt> assignst ;
4646 typedef const natural_loops_mutablet::natural_loopt loopt;
4747
4848 void havoc_loops ();
@@ -51,9 +51,7 @@ class havoc_loopst
5151 const goto_programt::targett loop_head,
5252 const loopt &);
5353
54- void get_modifies (
55- const loopt &,
56- modifiest &);
54+ void get_assigns (const loopt &, assignst &);
5755};
5856
5957void havoc_loopst::havoc_loop (
@@ -63,12 +61,12 @@ void havoc_loopst::havoc_loop(
6361 assert (!loop.empty ());
6462
6563 // first find out what can get changed in the loop
66- modifiest modifies ;
67- get_modifies (loop, modifies );
64+ assignst assigns ;
65+ get_assigns (loop, assigns );
6866
6967 // build the havocking code
7068 goto_programt havoc_code;
71- havoc_utilst havoc_gen (modifies );
69+ havoc_utilst havoc_gen (assigns );
7270 havoc_gen.append_full_havoc_code (loop_head->source_location (), havoc_code);
7371
7472 // Now havoc at the loop head. Use insert_swap to
@@ -101,12 +99,10 @@ void havoc_loopst::havoc_loop(
10199 remove_skip (goto_function.body );
102100}
103101
104- void havoc_loopst::get_modifies (
105- const loopt &loop,
106- modifiest &modifies)
102+ void havoc_loopst::get_assigns (const loopt &loop, assignst &assigns)
107103{
108104 for (const auto &instruction_it : loop)
109- function_modifies. get_modifies (local_may_alias, instruction_it, modifies );
105+ function_assigns. get_assigns (local_may_alias, instruction_it, assigns );
110106}
111107
112108void havoc_loopst::havoc_loops ()
@@ -119,8 +115,8 @@ void havoc_loopst::havoc_loops()
119115
120116void havoc_loops (goto_modelt &goto_model)
121117{
122- function_modifiest function_modifies (goto_model.goto_functions );
118+ function_assignst function_assigns (goto_model.goto_functions );
123119
124120 for (auto &gf_entry : goto_model.goto_functions .function_map )
125- havoc_loopst (function_modifies , gf_entry.second );
121+ havoc_loopst (function_assigns , gf_entry.second );
126122}
0 commit comments