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 @@ -113,6 +113,11 @@ void assigns_clauset::add_target(const exprt &target_expr)
113
113
}
114
114
}
115
115
116
+ void assigns_clauset::remove_target (const exprt &target_expr)
117
+ {
118
+ targets.erase (targett (*this , targett::normalize (target_expr)));
119
+ }
120
+
116
121
goto_programt assigns_clauset::generate_havoc_code () const
117
122
{
118
123
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_alias_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