Skip to content

Commit 29bbb88

Browse files
Relax condition in instantiate
The fact that the array is always accessed at the same index, is not a necessary condition for the correctness of the instantiate function.
1 parent 35f5a77 commit 29bbb88

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/solvers/refinement/string_refinement.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,12 +1836,8 @@ static exprt instantiate(
18361836
const exprt &str,
18371837
const exprt &val)
18381838
{
1839-
const auto indexes = find_indexes(axiom.body, str, axiom.univ_var);
1840-
INVARIANT(
1841-
str.id() == ID_array || indexes.size() <= 1,
1842-
"non constant array should always be accessed at the same index");
18431839
exprt::operandst conjuncts;
1844-
for(const auto &index : indexes)
1840+
for(const auto &index : find_indexes(axiom.body, str, axiom.univ_var))
18451841
{
18461842
const exprt univ_var_value =
18471843
compute_inverse_function(axiom.univ_var, val, index);

0 commit comments

Comments
 (0)