Skip to content

Commit 3f892bb

Browse files
Provide configuration option to use the new value set abstract value
This only adds the configuration option in the factory, it still doesn’t add a command line argument for this
1 parent 00ec82e commit 3f892bb

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/analyses/variable-sensitivity/variable_sensitivity_object_factory.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "variable_sensitivity_object_factory.h"
99
#include "interval_array_abstract_object.h"
1010
#include "util/namespace.h"
11+
#include "value_set_abstract_value.h"
1112

1213
variable_sensitivity_object_factoryt
1314
variable_sensitivity_object_factoryt::s_instance;
@@ -24,10 +25,18 @@ variable_sensitivity_object_factoryt::get_abstract_object_type(const typet type)
2425
{
2526
abstract_object_type =
2627
configuration.advanced_sensitivities.intervals ? INTERVAL : CONSTANT;
28+
if(configuration.advanced_sensitivities.new_value_set)
29+
{
30+
abstract_object_type = VALUE_SET;
31+
}
2732
}
2833
else if(type.id() == ID_floatbv)
2934
{
3035
abstract_object_type = CONSTANT;
36+
if(configuration.advanced_sensitivities.new_value_set)
37+
{
38+
abstract_object_type = VALUE_SET;
39+
}
3140
}
3241
else if(type.id() == ID_array)
3342
{
@@ -121,6 +130,11 @@ variable_sensitivity_object_factoryt::get_abstract_object(
121130
return initialize_abstract_object<abstract_objectt>(
122131
followed_type, top, bottom, e, environment, ns);
123132
case VALUE_SET:
133+
if(configuration.advanced_sensitivities.new_value_set)
134+
{
135+
return initialize_abstract_object<value_set_abstract_valuet>(
136+
followed_type, top, bottom, e, environment, ns);
137+
}
124138
return initialize_abstract_object<value_set_abstract_objectt>(
125139
followed_type, top, bottom, e, environment, ns);
126140
default:

src/analyses/variable-sensitivity/variable_sensitivity_object_factory.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ struct vsd_configt
8484
options.get_bool_option("interval");
8585
config.advanced_sensitivities.value_set =
8686
options.get_bool_option("value-set");
87+
config.advanced_sensitivities.new_value_set =
88+
options.get_bool_option("new-value-set");
8789

8890
return config;
8991
}

0 commit comments

Comments
 (0)