Skip to content

Commit 6835fb0

Browse files
committed
Add merge_location parameter to abstract_environment::merge
1 parent 0968c54 commit 6835fb0

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/analyses/variable-sensitivity/abstract_environment.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ abstract_object_pointert abstract_environmentt::add_object_context(
345345

346346
bool abstract_environmentt::merge(
347347
const abstract_environmentt &env,
348+
const goto_programt::const_targett &merge_location,
348349
widen_modet widen_mode)
349350
{
350351
// for each entry in the incoming environment we need to either add it

src/analyses/variable-sensitivity/abstract_environment.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,14 @@ class abstract_environmentt
190190
/// Computes the join between "this" and "b"
191191
///
192192
/// \param env: the other environment
193+
/// \param merge_location: when the merge is happening
193194
/// \param widen_mode: indicates if this is a widening merge
194195
///
195196
/// \return A Boolean, true when the merge has changed something
196-
virtual bool merge(const abstract_environmentt &env, widen_modet widen_mode);
197+
virtual bool merge(
198+
const abstract_environmentt &env,
199+
const goto_programt::const_targett &merge_location,
200+
widen_modet widen_mode);
197201

198202
/// This should be used as a default case / everything else has failed
199203
/// The string is so that I can easily find and diagnose cases where this

src/analyses/variable-sensitivity/variable_sensitivity_domain.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ bool variable_sensitivity_domaint::merge(
232232
auto widen_mode =
233233
from->should_widen(*to) ? widen_modet::could_widen : widen_modet::no;
234234
// Use the abstract_environment merge
235-
bool any_changes = abstract_state.merge(b.abstract_state, widen_mode);
235+
bool any_changes =
236+
abstract_state.merge(b.abstract_state, to->current_location(), widen_mode);
236237

237238
DATA_INVARIANT(abstract_state.verify(), "Structural invariant");
238239
return any_changes;

0 commit comments

Comments
 (0)