Skip to content

Commit 341fae5

Browse files
committed
Export configuration on object factory, and on abstract_environmentt
1 parent 627941c commit 341fae5

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

src/analyses/variable-sensitivity/abstract_environment.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,9 @@ abstract_object_pointert abstract_environmentt::abstract_object_factory(
337337
type, top, bttm, e, environment, ns);
338338
}
339339

340-
abstract_object_pointert abstract_environmentt::add_object_context(
341-
const abstract_object_pointert &abstract_object) const
340+
const vsd_configt &abstract_environmentt::configuration() const
342341
{
343-
return object_factory->wrap_with_context(abstract_object);
342+
return object_factory->config();
344343
}
345344

346345
bool abstract_environmentt::merge(

src/analyses/variable-sensitivity/abstract_environment.h

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ enum class widen_modet
3535
could_widen
3636
};
3737

38+
struct vsd_configt;
39+
3840
class abstract_environmentt
3941
{
4042
public:
@@ -174,18 +176,8 @@ class abstract_environmentt
174176
const exprt &e,
175177
const namespacet &ns) const;
176178

177-
/// Wraps an existing object in any configured context object
178-
///
179-
/// \param abstract_object: The object to be wrapped
180-
///
181-
/// \return The wrapped abstract object
182-
///
183-
/// Look at the configuration context dependency, and constructs
184-
/// the appropriate wrapper object around the supplied object
185-
/// If no such configuration is enabled, the supplied object will be
186-
/// returned unchanged
187-
virtual abstract_object_pointert
188-
add_object_context(const abstract_object_pointert &abstract_object) const;
179+
/// Exposes the environment configuration
180+
const vsd_configt &configuration() const;
189181

190182
/// Computes the join between "this" and "b"
191183
///

src/analyses/variable-sensitivity/variable_sensitivity_object_factory.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ class variable_sensitivity_object_factoryt
7777
variable_sensitivity_object_factoryt(
7878
const variable_sensitivity_object_factoryt &) = delete;
7979

80+
const vsd_configt &config() const
81+
{
82+
return configuration;
83+
}
84+
8085
private:
8186
/// Decide which abstract object type to use for the variable in question.
8287
///

0 commit comments

Comments
 (0)