Skip to content

Commit 6e0a1fb

Browse files
committedNov 15, 2023
Remove direct use of dstringt (and as_string)
We keep dstringt as an implementation detail.
1 parent 35720db commit 6e0a1fb

File tree

9 files changed

+15
-15
lines changed

9 files changed

+15
-15
lines changed
 

‎src/libcprover-cpp/verification_result.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ std::vector<std::string> verification_resultt::get_property_ids() const
115115
std::vector<std::string> result;
116116
for(const auto &props : _impl->get_properties())
117117
{
118-
result.push_back(as_string(props.first));
118+
result.push_back(id2string(props.first));
119119
}
120120
return result;
121121
}

‎unit/analyses/variable-sensitivity/abstract_environment/to_predicate.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ SCENARIO(
5252

5353
auto type = signedbv_typet(32);
5454
auto val2 = make_constant(from_integer(2, type), env, ns);
55-
auto x_name = symbol_exprt(dstringt("x"), type);
55+
auto x_name = symbol_exprt("x", type);
5656

5757
env.assign(x_name, val2, ns);
5858

@@ -65,10 +65,10 @@ SCENARIO(
6565

6666
auto type = signedbv_typet(32);
6767
auto val2 = make_constant(from_integer(2, type), env, ns);
68-
auto x_name = symbol_exprt(dstringt("x"), type);
68+
auto x_name = symbol_exprt("x", type);
6969

7070
auto val3 = make_constant(from_integer(3, type), env, ns);
71-
auto y_name = symbol_exprt(dstringt("y"), type);
71+
auto y_name = symbol_exprt("y", type);
7272

7373
env.assign(x_name, val2, ns);
7474
env.assign(y_name, val3, ns);

‎unit/analyses/variable-sensitivity/constant_abstract_value/to_predicate.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SCENARIO(
2525
const typet type = signedbv_typet(32);
2626
const exprt val2 = from_integer(2, type);
2727

28-
const exprt x_name = symbol_exprt(dstringt("x"), type);
28+
const exprt x_name = symbol_exprt("x", type);
2929

3030
auto config = vsd_configt::constant_domain();
3131
config.context_tracking.data_dependency_context = false;

‎unit/analyses/variable-sensitivity/constant_pointer_abstract_object/to_predicate.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ SCENARIO(
2424
{
2525
const auto int_type = signedbv_typet(32);
2626
const auto ptr_type = pointer_typet(int_type, 32);
27-
const auto val2_symbol = symbol_exprt(dstringt("val2"), int_type);
27+
const auto val2_symbol = symbol_exprt("val2", int_type);
2828

29-
const auto x_name = symbol_exprt(dstringt("x"), int_type);
29+
const auto x_name = symbol_exprt("x", int_type);
3030

3131
auto config = vsd_configt::constant_domain();
3232
config.context_tracking.data_dependency_context = false;

‎unit/analyses/variable-sensitivity/interval_abstract_value/to_predicate.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ SCENARIO(
3535
const exprt val1 = from_integer(1, type);
3636
const exprt val2 = from_integer(2, type);
3737

38-
const exprt x_name = symbol_exprt(dstringt("x"), type);
38+
const exprt x_name = symbol_exprt("x", type);
3939

4040
auto config = vsd_configt::constant_domain();
4141
config.context_tracking.data_dependency_context = false;

‎unit/analyses/variable-sensitivity/value_expression_evaluation/assume.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <testing-utils/use_catch.h>
2525

2626
exprt binary_expression(
27-
dstringt const &exprId,
27+
const irep_idt &exprId,
2828
const abstract_object_pointert &op1,
2929
const abstract_object_pointert &op2,
3030
abstract_environmentt &environment,
@@ -83,7 +83,7 @@ class assume_testert
8383
}
8484

8585
void test_fn(
86-
dstringt const &exprId,
86+
const irep_idt &exprId,
8787
bool is_true,
8888
std::string const &test,
8989
std::string const &delimiter)

‎unit/analyses/variable-sensitivity/value_set_abstract_object/to_predicate.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ SCENARIO(
3737
const exprt interval_0_2 = constant_interval_exprt(val1, val2);
3838
const exprt interval_2_3 = constant_interval_exprt(val2, val3);
3939

40-
const exprt x_name = symbol_exprt(dstringt("x"), type);
40+
const exprt x_name = symbol_exprt("x", type);
4141

4242
auto config = vsd_configt::constant_domain();
4343
config.context_tracking.data_dependency_context = false;

‎unit/analyses/variable-sensitivity/value_set_pointer_abstract_object/to_predicate.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ SCENARIO(
3232
{
3333
const auto int_type = signedbv_typet(32);
3434
const auto ptr_type = pointer_typet(int_type, 32);
35-
const auto val1_symbol = symbol_exprt(dstringt("val1"), int_type);
36-
const auto val2_symbol = symbol_exprt(dstringt("val2"), int_type);
35+
const auto val1_symbol = symbol_exprt("val1", int_type);
36+
const auto val2_symbol = symbol_exprt("val2", int_type);
3737

38-
const auto x_name = symbol_exprt(dstringt("x"), int_type);
38+
const auto x_name = symbol_exprt("x", int_type);
3939

4040
auto config = vsd_configt::constant_domain();
4141
config.context_tracking.data_dependency_context = false;

‎unit/analyses/variable-sensitivity/variable_sensitivity_test_helpers.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ std::shared_ptr<const value_set_abstract_objectt> add_as_value_set(
590590

591591
void THEN_PREDICATE(const abstract_object_pointert &obj, const std::string &out)
592592
{
593-
const auto x_name = symbol_exprt(dstringt("x"), obj->type());
593+
const auto x_name = symbol_exprt("x", obj->type());
594594
auto pred = obj->to_predicate(x_name);
595595
THEN("predicate is " + out)
596596
{

0 commit comments

Comments
 (0)
Please sign in to comment.