Skip to content

Commit b46e61a

Browse files
author
thk123
committed
Remove redundant primitive
There is no need to have a primitive for getting the length of a string, as this is in the associated refined string expr
1 parent bbfc1d0 commit b46e61a

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

src/solvers/strings/string_constraint_generator_main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,6 @@ string_constraint_generatort::add_axioms_for_function_application(
215215

216216
if(id == ID_cprover_char_literal_func)
217217
return add_axioms_for_char_literal(expr);
218-
else if(id == ID_cprover_string_length_func)
219-
return add_axioms_for_length(expr);
220218
else if(id == ID_cprover_string_equal_func)
221219
return add_axioms_for_equals(expr);
222220
else if(id == ID_cprover_string_equals_ignore_case_func)

src/util/irep_ids.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,6 @@ IREP_ID_ONE(cprover_string_is_prefix_func)
615615
IREP_ID_ONE(cprover_string_is_suffix_func)
616616
IREP_ID_ONE(cprover_string_is_empty_func)
617617
IREP_ID_ONE(cprover_string_last_index_of_func)
618-
IREP_ID_ONE(cprover_string_length_func)
619618
IREP_ID_ONE(cprover_string_of_int_func)
620619
IREP_ID_ONE(cprover_string_of_int_hex_func)
621620
IREP_ID_ONE(cprover_string_of_long_func)

unit/solvers/strings/string_refinement/string_refinement.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ SCENARIO("string refinement", "[core][solvers][strings][string_refinement]")
5959
ID_cprover_associate_length_to_array_func,
6060
mathematical_function_typet{{int_type, char_array_type}, int_type}};
6161

62-
// length_function : (string) -> int
63-
const symbol_exprt length_function{
64-
ID_cprover_string_length_func,
65-
mathematical_function_typet{{string_type}, int_type}};
66-
6762
// char_at_function : (string, int) -> char
6863
const symbol_exprt char_at_function{
6964
ID_cprover_string_char_at_func,

0 commit comments

Comments
 (0)