Skip to content

Commit de4ab8e

Browse files
committed
Initialize states of analyses to bottom
Signed-off-by: František Nečas <[email protected]>
1 parent ab94ef1 commit de4ab8e

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

src/ssa/dynobj_instance_analysis.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,10 @@ void dynobj_instance_domaint::output(
262262
out << "\n";
263263
}
264264
}
265+
266+
void dynobj_instance_analysist::initialize(const irep_idt &function_id,
267+
const goto_programt &goto_program)
268+
{
269+
forall_goto_program_instructions(i_it, goto_program)
270+
get_state(i_it).make_bottom();
271+
}

src/ssa/dynobj_instance_analysis.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ class dynobj_instance_analysist:public ait<dynobj_instance_domaint>
226226
protected:
227227
const optionst &options;
228228
ssa_value_ait &value_analysis;
229+
void initialize(
230+
const irep_idt &function_id,
231+
const goto_programt &goto_program) override;
229232

230233
friend class dynobj_instance_domaint;
231234
};

src/ssa/ssa_domain.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ void ssa_ait::initialize(
234234
const goto_functionst::goto_functiont &goto_function)
235235
{
236236
ait<ssa_domaint>::initialize(function_id, goto_function);
237+
forall_goto_program_instructions(i_it, goto_function.body)
238+
get_state(i_it).make_bottom();
237239

238240
// Make entry instruction have a source for the all objects.
239241

src/ssa/ssa_value_set.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,8 @@ void ssa_value_ait::initialize(
622622
const goto_functionst::goto_functiont &goto_function)
623623
{
624624
ait<ssa_value_domaint>::initialize(function_id, goto_function);
625+
forall_goto_program_instructions(i_it, goto_function.body)
626+
get_state(i_it).make_bottom();
625627

626628
// Initialize value sets for pointer parameters
627629

0 commit comments

Comments
 (0)