Skip to content

Commit 80dff96

Browse files
Correcting lower bound in axiom added for last_index_of
1 parent af98378 commit 80dff96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/solvers/refinement/string_constraint_generator_indexof.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ exprt string_constraint_generatort::add_axioms_for_last_index_of_string(
285285
// forall n:[0, min(from_index,|haystack|-|needle|)].
286286
// !contains || n > offset ==>
287287
// haystack[n] != needle[0] || ... ||
288-
// haystack[n+|substring|-1] != needle[|substring|-1]
288+
// haystack[n+|needle|-1] != needle[|needle|-1]
289289
symbol_exprt qvar2=fresh_univ_index("QA_index_of_string_2", index_type);
290290
mp_integer sub_length;
291291
assert(!to_integer(needle.length(), sub_length));
@@ -302,7 +302,7 @@ exprt string_constraint_generatort::add_axioms_for_last_index_of_string(
302302
not_exprt(contains), binary_relation_exprt(qvar2, ID_gt, offset));
303303
string_constraintt a6(
304304
qvar2,
305-
from_index,
305+
from_integer(0, index_type),
306306
plus_exprt(from_integer(1, index_type), end_index),
307307
premise,
308308
disjunction(disjuncts));

0 commit comments

Comments
 (0)