Skip to content

Commit bdca10c

Browse files
Natasha Yogananda Jeppudanielsn
Natasha Yogananda Jeppu
authored andcommitted
Modify boolbvt and bv_pointerst to incorporate get_array_constraints boolean option used in arrayst class
Add an additional boolean argument to the class constrcutor to propagate the setting of parse option --show-array-constraints to true to the arrayst class. The entry point for this is in the default invocation of solver factory.
1 parent f3267da commit bdca10c

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

src/goto-checker/solver_factory.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,9 @@ std::unique_ptr<solver_factoryt::solvert> solver_factoryt::get_default()
219219
solver->set_prop(make_satcheck_prop<satcheckt>(message_handler, options));
220220
}
221221

222+
bool get_array_constraints = options.get_bool_option("show-array-constraints");
222223
auto bv_pointers =
223-
util_make_unique<bv_pointerst>(ns, solver->prop(), message_handler);
224+
util_make_unique<bv_pointerst>(ns, solver->prop(), message_handler, get_array_constraints);
224225

225226
if(options.get_option("arrays-uf") == "never")
226227
bv_pointers->unbounded_array = bv_pointerst::unbounded_arrayt::U_NONE;

src/solvers/flattening/boolbv.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ class boolbvt:public arrayst
3737
boolbvt(
3838
const namespacet &_ns,
3939
propt &_prop,
40-
message_handlert &message_handler)
41-
: arrayst(_ns, _prop, message_handler),
40+
message_handlert &message_handler,
41+
bool get_array_constraints = false)
42+
: arrayst(_ns, _prop, message_handler, get_array_constraints),
4243
unbounded_array(unbounded_arrayt::U_NONE),
4344
boolbv_width(_ns),
4445
bv_utils(_prop),

src/solvers/flattening/bv_pointers.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ literalt bv_pointerst::convert_rest(const exprt &expr)
8282
bv_pointerst::bv_pointerst(
8383
const namespacet &_ns,
8484
propt &_prop,
85-
message_handlert &message_handler)
86-
: boolbvt(_ns, _prop, message_handler), pointer_logic(_ns)
85+
message_handlert &message_handler,
86+
bool get_array_constraints)
87+
: boolbvt(_ns, _prop, message_handler, get_array_constraints), pointer_logic(_ns)
8788
{
8889
object_bits=config.bv_encoding.object_bits;
8990
std::size_t pointer_width = boolbv_width(pointer_type(empty_typet()));

src/solvers/flattening/bv_pointers.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ class bv_pointerst:public boolbvt
2020
bv_pointerst(
2121
const namespacet &_ns,
2222
propt &_prop,
23-
message_handlert &message_handler);
23+
message_handlert &message_handler,
24+
bool get_array_constraints = false);
2425

2526
void post_process() override;
2627

0 commit comments

Comments
 (0)