Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion src/solvers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ elseif("${sat_impl}" STREQUAL "glucose")
target_link_libraries(solvers glucose-condensed)
endif()

target_link_libraries(solvers java_bytecode util)
target_link_libraries(solvers util)

generic_includes(solvers)
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Author: Romain Brenguier, [email protected]
#include <solvers/refinement/string_constraint_generator.h>

#include <limits>
#include <java_bytecode/java_types.h>

#include <solvers/refinement/string_refinement_invariant.h>

#include <util/arith_tools.h>
Expand Down
4 changes: 2 additions & 2 deletions src/solvers/refinement/string_refinement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Author: Alberto Griggio, [email protected]
#include <util/simplify_expr.h>
#include <solvers/sat/satcheck.h>
#include <solvers/refinement/string_constraint_instantiation.h>
#include <java_bytecode/java_types.h>
#include <unordered_set>

static bool is_valid_string_constraint(
Expand Down Expand Up @@ -1221,6 +1220,7 @@ static exprt substitute_array_access(
&symbol_generator)
{
const typet &char_type = array_expr.type().subtype();
const typet &index_type = to_array_type(array_expr.type()).size().type();
const std::vector<exprt> &operands = array_expr.operands();

exprt result = symbol_generator("out_of_bound_access", char_type);
Expand All @@ -1229,7 +1229,7 @@ static exprt substitute_array_access(
{
// Go in reverse order so that smaller indexes appear first in the result
const std::size_t pos = operands.size() - 1 - i;
const equal_exprt equals(index, from_integer(pos, java_int_type()));
const equal_exprt equals(index, from_integer(pos, index_type));
if(operands[pos].type() != char_type)
{
INVARIANT(
Expand Down