Skip to content

Commit 22f696a

Browse files
Remove handling of insert with 7 arguments
No preprocessing of Java methods produce a call to cprover_string_insert with 7 arguments so this case should be unused.
1 parent c8ff278 commit 22f696a

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

src/solvers/strings/string_constraint_generator_insert.cpp

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -118,27 +118,11 @@ std::pair<exprt, string_constraintst> add_axioms_for_insert(
118118
const function_application_exprt &f,
119119
array_poolt &array_pool)
120120
{
121-
PRECONDITION(f.arguments().size() == 5 || f.arguments().size() == 7);
122-
array_string_exprt s1 = get_string_expr(array_pool, f.arguments()[2]);
123-
array_string_exprt s2 = get_string_expr(array_pool, f.arguments()[4]);
124-
array_string_exprt res = array_pool.find(f.arguments()[1], f.arguments()[0]);
121+
PRECONDITION(f.arguments().size() == 5);
122+
const array_string_exprt s1 = get_string_expr(array_pool, f.arguments()[2]);
123+
const array_string_exprt s2 = get_string_expr(array_pool, f.arguments()[4]);
124+
const array_string_exprt res =
125+
array_pool.find(f.arguments()[1], f.arguments()[0]);
125126
const exprt &offset = f.arguments()[3];
126-
if(f.arguments().size() == 7)
127-
{
128-
const exprt &start = f.arguments()[5];
129-
const exprt &end = f.arguments()[6];
130-
const typet &char_type = s1.content().type().subtype();
131-
const typet &index_type = s1.length_type();
132-
const array_string_exprt substring =
133-
array_pool.fresh_string(index_type, char_type);
134-
return combine_results(
135-
add_axioms_for_substring(
136-
fresh_symbol, substring, s2, start, end, array_pool),
137-
add_axioms_for_insert(
138-
fresh_symbol, res, s1, substring, offset, array_pool));
139-
}
140-
else // 5 arguments
141-
{
142-
return add_axioms_for_insert(fresh_symbol, res, s1, s2, offset, array_pool);
143-
}
127+
return add_axioms_for_insert(fresh_symbol, res, s1, s2, offset, array_pool);
144128
}

0 commit comments

Comments
 (0)