diff --git a/src/solvers/README.md b/src/solvers/README.md index 075bedb5355..f004ac5b64d 100644 --- a/src/solvers/README.md +++ b/src/solvers/README.md @@ -527,7 +527,6 @@ This is described in more detail \link string_builtin_functiont here. \endlink * `cprover_string_delete_char_at` : A call to `cprover_string_delete_char_at(s, i)` would be the same thing as `cprover_string_delete(s, i, i+1)`. - * `cprover_string_copy` : Same as `cprover_string_substring(s, 0)`. * `cprover_string_of_int_hex` : Same as `cprover_string_of_int(s, 16)`. * `cprover_string_of_double` : Same as `cprover_string_of_float`. diff --git a/src/solvers/strings/string_constraint_generator.h b/src/solvers/strings/string_constraint_generator.h index f439e5f28b3..f536b2bc1ab 100644 --- a/src/solvers/strings/string_constraint_generator.h +++ b/src/solvers/strings/string_constraint_generator.h @@ -151,9 +151,6 @@ class string_constraint_generatort final std::pair add_axioms_for_empty_string(const function_application_exprt &f); - std::pair - add_axioms_for_copy(const function_application_exprt &f); - std::pair add_axioms_for_concat_code_point(const function_application_exprt &f); std::pair add_axioms_for_constant( diff --git a/src/solvers/strings/string_constraint_generator_main.cpp b/src/solvers/strings/string_constraint_generator_main.cpp index 2b597837244..308a374b600 100644 --- a/src/solvers/strings/string_constraint_generator_main.cpp +++ b/src/solvers/strings/string_constraint_generator_main.cpp @@ -17,19 +17,18 @@ Author: Romain Brenguier, romain.brenguier@diffblue.com /// Li and Indradeep Ghosh, which gives examples of constraints for several /// functions. -#include "string_constraint_generator.h" -#include "string_refinement_invariant.h" - -#include - #include -#include #include #include #include #include #include +#include "string_constraint_generator.h" +#include "string_refinement_invariant.h" + +#include + string_constraint_generatort::string_constraint_generatort( const namespacet &ns, message_handlert &message_handler) @@ -268,8 +267,6 @@ string_constraint_generatort::add_axioms_for_function_application( return add_axioms_for_trim(expr); else if(id == ID_cprover_string_empty_string_func) return add_axioms_for_empty_string(expr); - else if(id == ID_cprover_string_copy_func) - return add_axioms_for_copy(expr); else if(id == ID_cprover_string_of_int_hex_func) return add_axioms_from_int_hex(expr); else if(id == ID_cprover_string_of_float_func) @@ -300,28 +297,6 @@ string_constraint_generatort::add_axioms_for_function_application( UNREACHABLE; } -/// add axioms to say that the returned string expression is equal to the -/// argument of the function application -/// \deprecated should use substring instead -/// \param f: function application with one argument, which is a string, -/// or three arguments: string, integer offset and count -/// \return a new string expression -DEPRECATED(SINCE(2017, 10, 5, "should use substring instead")) -std::pair -string_constraint_generatort::add_axioms_for_copy( - const function_application_exprt &f) -{ - const auto &args = f.arguments(); - PRECONDITION(args.size() == 3 || args.size() == 5); - const array_string_exprt res = array_pool.find(args[1], args[0]); - const array_string_exprt str = get_string_expr(array_pool, args[2]); - const typet &index_type = str.length_type(); - const exprt offset = args.size() == 3 ? from_integer(0, index_type) : args[3]; - const exprt count = - args.size() == 3 ? array_pool.get_or_create_length(str) : args[4]; - return add_axioms_for_substring(res, str, offset, plus_exprt(offset, count)); -} - /// Length of a string /// /// Returns the length of the string argument of the given function application diff --git a/src/util/irep_ids.def b/src/util/irep_ids.def index 8f1cfe001ab..31358997437 100644 --- a/src/util/irep_ids.def +++ b/src/util/irep_ids.def @@ -630,7 +630,6 @@ IREP_ID_ONE(cprover_string_concat_char_func) IREP_ID_ONE(cprover_string_concat_code_point_func) IREP_ID_ONE(cprover_string_constrain_characters_func) IREP_ID_ONE(cprover_string_contains_func) -IREP_ID_ONE(cprover_string_copy_func) IREP_ID_ONE(cprover_string_delete_func) IREP_ID_ONE(cprover_string_delete_char_at_func) IREP_ID_ONE(cprover_string_equal_func)