File tree 3 files changed +13
-0
lines changed
src/goto-instrument/contracts 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,11 @@ void assigns_clauset::add_target(const exprt &target_expr)
110
110
}
111
111
}
112
112
113
+ void assigns_clauset::remove_target (const exprt &target_expr)
114
+ {
115
+ targets.erase (targett (*this , targett::normalize (target_expr)));
116
+ }
117
+
113
118
goto_programt assigns_clauset::generate_havoc_code () const
114
119
{
115
120
modifiest modifies;
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ class assigns_clauset
54
54
assigns_clauset (const exprt &, const messaget &, const namespacet &);
55
55
56
56
void add_target (const exprt &);
57
+ void remove_target (const exprt &);
57
58
58
59
goto_programt generate_havoc_code () const ;
59
60
exprt generate_containment_check (const exprt &) const ;
Original file line number Diff line number Diff line change @@ -944,6 +944,13 @@ void code_contractst::check_frame_conditions(
944
944
freely_assignable_symbols,
945
945
assigns);
946
946
}
947
+ else if (instruction_it->is_dead ())
948
+ {
949
+ freely_assignable_symbols.erase (
950
+ instruction_it->get_dead ().symbol ().get_identifier ());
951
+
952
+ assigns.remove_target (instruction_it->get_dead ().symbol ());
953
+ }
947
954
}
948
955
}
949
956
You can’t perform that action at this time.
0 commit comments