Skip to content

String refinement: support pointers #6915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 13, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
String refinement: support pointers
We need to use bv_pointerst to convert address_of expressions.
  • Loading branch information
tautschnig committed Jun 8, 2022
commit b861c2342d1afb141d7591405ceb5e468bebc367
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
KNOWNBUG
CORE
test_set_length
--function test_set_length.main --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar ../../../lib/java-models-library/target/cprover-api.jar`
^EXIT=10$
Expand Down
4 changes: 2 additions & 2 deletions src/solvers/strings/string_constraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Author: Diffblue Ltd.
#include <util/namespace.h>
#include <util/symbol_table.h>

#include <solvers/flattening/boolbv.h>
#include <solvers/flattening/bv_pointers.h>
#include <solvers/sat/satcheck.h>

/// Runs a solver instance to verify whether an expression can only be
Expand All @@ -24,7 +24,7 @@ static bool cannot_be_neg(const exprt &expr, message_handlert &message_handler)
satcheck_no_simplifiert sat_check(message_handler);
symbol_tablet symbol_table;
namespacet ns(symbol_table);
boolbvt solver{ns, sat_check, message_handler};
bv_pointerst solver{ns, sat_check, message_handler};
const exprt zero = from_integer(0, expr.type());
const binary_relation_exprt non_neg(expr, ID_lt, zero);
solver << non_neg;
Expand Down
2 changes: 1 addition & 1 deletion src/solvers/strings/string_refinement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1912,7 +1912,7 @@ static optionalt<exprt> find_counter_example(
message_handlert &message_handler)
{
satcheck_no_simplifiert sat_check(message_handler);
boolbvt solver(ns, sat_check, message_handler);
bv_pointerst solver(ns, sat_check, message_handler);
solver << axiom;

if(solver() == decision_proceduret::resultt::D_SATISFIABLE)
Expand Down