ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
string_method_handler.cpp File Reference
#include <python-frontend/string/char_utils.h>
#include <python-frontend/exception/exception_utils.h>
#include <python-frontend/math/python_int_overflow.h>
#include <python-frontend/python-list/python_list.h>
#include <util/base/host_rounding_mode.h>
#include <python-frontend/string/string_method_dispatch.h>
#include <python-frontend/string/string_handler.h>
#include <python-frontend/string/string_handler_utils.h>
#include <python-frontend/python_converter.h>
#include <python-frontend/python_expr_builder.h>
#include <python-frontend/tuple/tuple_handler.h>
#include <python-frontend/string/string_builder.h>
#include <python-frontend/type/type_utils.h>
#include <irep2/irep2_utils.h>
#include <util/arith/arith_tools.h>
#include <util/lang/c_types.h>
#include <util/expr/expr_util.h>
#include <util/irep/migrate.h>
#include <util/lang/python_types.h>
#include <util/irep/std_expr.h>
#include <util/irep/std_code.h>
#include <util/expr/string_constant.h>
#include <util/irep/type.h>
#include <boost/algorithm/string/predicate.hpp>
#include <algorithm>
#include <array>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <iomanip>
#include <limits>
#include <optional>
#include <functional>
#include <stdexcept>
#include <vector>
#include <util/message/message.h>
Include dependency graph for string_method_handler.cpp:

Classes

struct  string_method_dispatch::split_method_argst
struct  string_method_dispatch::search_args_parsedt

Namespaces

namespace  string_method_dispatch

Functions

static std::optional< exprt > string_method_dispatch::fold_constant_replace (const nlohmann::json &call_json, const std::function< exprt()> &get_receiver_expr, python_converter &converter)
std::optional< exprt > string_method_dispatch::dispatch_replace_method (string_handler &self, const std::string &method_name, const nlohmann::json &call_json, const nlohmann::json &args, const keyword_valuest &keyword_values, const std::function< exprt()> &get_receiver_expr, const std::function< locationt()> &get_location, python_converter &converter)
std::optional< exprt > string_method_dispatch::dispatch_count_method (string_handler &self, const std::string &method_name, const nlohmann::json &args, const keyword_valuest &keyword_values, const std::function< exprt()> &get_receiver_expr, const std::function< locationt()> &get_location, python_converter &converter)
static bool string_method_dispatch::is_falsey_constant (const nlohmann::json &node)
std::optional< exprt > string_method_dispatch::dispatch_splitlines_method (string_handler &self, const std::string &method_name, const nlohmann::json &call_json, const nlohmann::json &args, const keyword_valuest &keyword_values, const std::function< exprt()> &get_receiver_expr, const std::function< locationt()> &get_location)
static bool string_method_dispatch::is_none_literal_json (const nlohmann::json &node)
std::optional< exprt > string_method_dispatch::dispatch_split_method (const std::string &method_name, const nlohmann::json &receiver_json, const nlohmann::json &call_json, const nlohmann::json &args, const keyword_valuest &keyword_values, const std::function< exprt()> &get_receiver_expr, python_converter &converter)
std::optional< exprt > string_method_dispatch::dispatch_no_arg_string_methods (string_handler &self, const std::string &method_name, const nlohmann::json &args, const keyword_valuest &keyword_values, const std::function< exprt()> &get_receiver_expr, const std::function< locationt()> &get_location)
std::optional< exprt > string_method_dispatch::dispatch_one_arg_string_methods (string_handler &self, const std::string &method_name, const nlohmann::json &args, const keyword_valuest &keyword_values, const std::function< exprt()> &get_receiver_expr, const std::function< locationt()> &get_location, python_converter &converter)
static search_args_parsedt string_method_dispatch::parse_string_search_args (const std::string &method_name, const nlohmann::json &args, const keyword_valuest &keyword_values, python_converter &converter)
static std::optional< exprt > string_method_dispatch::fold_constant_search (const std::string &method_name, const nlohmann::json &receiver_json, const nlohmann::json &args, const exprt &receiver, python_converter &converter)
std::optional< exprt > string_method_dispatch::dispatch_search_string_methods (string_handler &self, const std::string &method_name, const nlohmann::json &call_json, const nlohmann::json &receiver_json, const nlohmann::json &args, const keyword_valuest &keyword_values, const std::function< exprt()> &get_receiver_expr, const std::function< locationt()> &get_location, python_converter &converter)
static bool string_method_dispatch::is_ascii_compatible_encoding_json (const nlohmann::json &node)
static bool string_method_dispatch::is_strict_ascii_encoding_json (const nlohmann::json &node)
std::optional< exprt > string_method_dispatch::dispatch_decode_join_method (string_handler &self, const std::string &method_name, const nlohmann::json &call_json, const nlohmann::json &receiver_json, const nlohmann::json &args, const keyword_valuest &keyword_values, python_converter &converter)
std::optional< exprt > string_method_dispatch::dispatch_spacing_and_padding_methods (string_handler &self, const std::string &method_name, const nlohmann::json &args, const keyword_valuest &keyword_values, const std::function< exprt()> &get_receiver_expr, const std::function< locationt()> &get_location, python_converter &converter)
std::optional< exprt > string_method_dispatch::dispatch_format_methods (string_handler &self, const std::string &method_name, const nlohmann::json &call_json, const keyword_valuest &keyword_values, const std::function< exprt()> &get_receiver_expr, const std::function< locationt()> &get_location)
keyword_valuest string_method_dispatch::collect_keyword_values (const std::string &method_name, const nlohmann::json &keywords, bool reject_kwargs_unpacking)
void string_method_dispatch::ensure_allowed_keywords (const std::string &method_name, const keyword_valuest &keyword_values, std::initializer_list< const char * > allowed)
const nlohmann::json * string_method_dispatch::find_keyword_value (const keyword_valuest &keyword_values, const std::string &name)
const nlohmann::json * string_method_dispatch::required_arg_node_or_throw (const std::string &method_name, const nlohmann::json &args, const keyword_valuest &keyword_values, const std::string &arg_name, std::size_t positional_index, const std::string &error_message)
long long string_method_dispatch::required_constant_int_arg (const nlohmann::json &arg_node, const std::string &error_message, python_converter &converter)
const nlohmann::json * string_method_dispatch::resolve_positional_or_keyword_arg (const std::string &method_name, const nlohmann::json &args, const keyword_valuest &keyword_values, const std::string &arg_name, std::size_t positional_index, bool required)