|
| static bool | sizes_target_by_first_argument (const nlohmann::json &value) |
| const nlohmann::json & | get_return_statement (const nlohmann::json &function) |
| static bool | is_subscripted_as (const nlohmann::json &return_type, const nlohmann::json &node, const char *name, const char *alt=nullptr) |
| | A subscripted annotation spelled with either of name or alt, e.g.
|
| static bool | param_is_mutated_in_body (const std::string ¶m_name, const nlohmann::json &body) |
| static void | collect_self_attr_stores_of_param (const std::string ¶m_name, const nlohmann::json &body, std::vector< std::string > &out) |
| static bool | node_unpacks_param (const std::string ¶m_name, const nlohmann::json &node) |
| | True for a, b = x / first, *rest = x, which iterates x.
|
| static bool | body_unpacks_param (const std::string ¶m_name, const nlohmann::json &node) |
| | True if node anywhere within it unpacks param_name; the unpacking is commonly guarded (if xs: first, *rest = xs), so this has to look inside nested statements rather than only at the top level of the body.
|
| static bool | node_uses_param_as_list_like (const std::string ¶m_name, const nlohmann::json &node) |
| static bool | param_is_list_like_in_body (const std::string ¶m_name, const nlohmann::json &body) |
| static std::optional< std::vector< std::size_t > > | numpy_param_full_shape_of (bool numpy_array_param, const typet &arg_type, const type_handler &type_handler) |
| static bool | is_numpy_array_literal_call (const nlohmann::json &node) |
| static bool | is_literal_node (const nlohmann::json &node) |
| static bool | is_numpy_literal_constructor (const nlohmann::json &node) |
| static bool | numpy_arange_length_is_symbolic (const nlohmann::json &args) |
| static bool | numpy_linspace_length_is_symbolic (const nlohmann::json &ctor_call) |
| static bool | numpy_ctor_shape_arg_is_symbolic (const nlohmann::json &ctor_call) |
| static void | collect_reachable_returns (const nlohmann::json &body, std::vector< const nlohmann::json * > &out) |
| static bool | numpy_array_literal_return (const nlohmann::json &func_def, nlohmann::json &out_literal_call, const type_handler &type_handler) |
| static void | collect_call_sites (const nlohmann::json &node, const std::string &enclosing_function, std::vector< numpy_param_call_site > &out) |
| static const nlohmann::json * | find_function_def (const nlohmann::json &module_body, const std::string &name) |
| static bool | is_name_target (const nlohmann::json &target, const std::string &name) |
| static bool | is_integer_valued (const nlohmann::json &value) |
| static bool | statement_binds_integer (const std::string &name, const nlohmann::json &node) |
| static bool | binds_integer_index (const std::string &name, const nlohmann::json &node) |
| static bool | is_variable_index_subscript_of (const std::string ¶m_name, const nlohmann::json &node, const nlohmann::json &function) |
| static bool | param_used_in_variable_index_subscript (const std::string ¶m_name, const nlohmann::json &node, const nlohmann::json &function) |
| static bool | list_literal_for_call_arg (const nlohmann::json &arg, const std::string &enclosing_function, const nlohmann::json &ast, nlohmann::json &out) |
| | Element type a bare list parameter receives, taken from the call sites that can be resolved statically.
|
| static bool | only_compared_for_equality (const nlohmann::json &node, const std::string &name) |
| | Whether name appears in node, at least once, and only as an operand of a single == or !=.
|
| static bool | is_name_node (const nlohmann::json &node, const std::string &name) |
| static bool | is_unsigned_constant (const nlohmann::json &node) |
| static bool | only_reads_fixed_positions (const nlohmann::json &node, const std::string &name, bool any_index) |
| | Whether every use of name in node reads one element at a non-negative constant index (any index with any_index) or takes its length.
|
| static bool | reads_fixed_position (const nlohmann::json &node, const std::string &name, bool any_index) |
| | Whether node reads one element of name at a non-negative constant index, or at any index that leaves name alone when any_index, or takes its length.
|
| static bool | only_called_directly (const nlohmann::json &node, const std::string &name) |
| | Whether name appears in node only as the callee of a direct call, so the calls collect_call_sites finds are every way it receives arguments.
|
| static std::vector< typet > | pooled_kinds (const std::vector< std::vector< typet > > &k) |
| static std::vector< nlohmann::json > | nested_lists (const std::vector< nlohmann::json > &literals, std::optional< size_t > pos) |
| | The nested list displays among literals' elements, at pos only when given.
|
| static std::optional< double > | literal_number (const nlohmann::json &node) |
| static std::string | literal_kind (const nlohmann::json &node) |
| static std::optional< std::vector< long long > > | literal_shape (const nlohmann::json &node) |
| static std::optional< numpy_layout > | filled_layout (const std::string &ctor, const nlohmann::json &args) |
| static std::optional< numpy_layout > | square_layout (const std::string &ctor, const nlohmann::json &args) |
| static std::optional< numpy_layout > | arange_layout (const nlohmann::json &args) |
| static std::optional< numpy_layout > | literal_constructor_layout (const nlohmann::json &call) |
| static nlohmann::json | zero_literal (const std::vector< long long > &shape, std::size_t axis, const std::string &kind) |
| static bool | is_numpy_static_shape_name (const nlohmann::json &node, const std::string ¶m_name) |
| static bool | is_numpy_static_shape_attribute_of (const nlohmann::json &node, const std::string ¶m_name) |
| static bool | is_numpy_static_shape_call_on (const nlohmann::json &node, const std::string ¶m_name) |
| static bool | uses_numpy_static_shape_op (const nlohmann::json &node, const std::string ¶m_name) |
| static std::optional< std::string > | numpy_call_site_arg_name (const nlohmann::json &call, const std::string &func_name, size_t param_index) |
| static const nlohmann::json * | module_numpy_literal (const nlohmann::json &module_body, const std::string &arg_name) |
| static std::size_t | count_name_stores (const nlohmann::json &node, const std::string &name) |
| static const nlohmann::json * | sole_local_numpy_literal (const nlohmann::json &def, const std::string &name) |
| static void | record_param_type (std::optional< typet > &resolved, const typet &candidate, const std::string &func_name, size_t param_index) |
| static std::optional< long long > | resolve_bytes_call_size (const nlohmann::json &call) |
| static std::string | assignment_target_name (const nlohmann::json &stmt) |
| static std::size_t | count_scope_stores (const nlohmann::json &node, const std::string &name) |
| static bool | declared_global_or_nonlocal (const nlohmann::json &node, const std::string &name) |
| static std::optional< std::string > | binding_function (const nlohmann::json &module_body, const std::string &enclosing_function, const std::string &name) |
| static const nlohmann::json * | single_assigned_value (const nlohmann::json &module_body, const std::string &function, const std::string &name) |
| static const nlohmann::json * | reaching_assigned_value (const nlohmann::json &module_body, const std::string &function, const std::string &name, int line) |
| static void | collect_assigned_values (const nlohmann::json &node, const std::string &name, std::vector< const nlohmann::json * > &out) |
| static const nlohmann::json * | resolve_view_subscript (const nlohmann::json &arg, const nlohmann::json &module_body, std::string &function, unsigned depth=0) |
| static std::optional< std::pair< std::vector< std::size_t >, typet > > | array_type_shape_and_elem (const typet &arr_type) |
| static std::optional< std::size_t > | forwarded_param_index (const nlohmann::json &arg, const nlohmann::json &module_body, const std::string &function_name) |
| static bool | is_index_node (const nlohmann::json &node) |
| static const nlohmann::json * | find_method_def (const nlohmann::json &module_body, const std::string &cls, const std::string &method) |
| static const nlohmann::json * | find_callee_def (const nlohmann::json &module_body, const std::string &callee) |
| static bool | is_module_class (const nlohmann::json &module_body, const std::string &name) |
| static std::string | receiver_class (const nlohmann::json &receiver, const nlohmann::json &body) |
| static std::optional< std::size_t > | callee_parameter_offset (const nlohmann::json &call, const nlohmann::json &module_body, const std::string &callee) |
| static const nlohmann::json * | call_site_argument (const nlohmann::json &call, const nlohmann::json &module_body, const std::string &func_name, std::size_t param_index) |
| static std::string | view_param_key (const std::string &func_name, std::size_t param_index) |
| static bool | forwards_param_being_inferred (const nlohmann::json &arg, const nlohmann::json &module_body, const std::string &enclosing_function, const std::set< std::string > &visiting) |
| static std::string | filled_array_dtype (const std::string &ctor, const nlohmann::json &call) |
| static bool | has_only_dtype_keyword (const nlohmann::json &call) |
| static std::optional< long long > | resolve_bytes_expr_size (const nlohmann::json &expr, const nlohmann::json &scope_body, std::set< std::string > &visited) |
| static std::optional< long long > | resolve_bytes_expr_size (const nlohmann::json &expr, const nlohmann::json &scope_body) |
| static bool | is_bare_callable_annotation (const nlohmann::json &ann) |
| | A Callable annotation with no [[A], R] signature, spelled either bare or through typing.
|
| static std::string | bound_name (const nlohmann::json &node) |
| | The name a single AST node binds, or "" when it binds none.
|
| static bool | binds_name (const nlohmann::json &node, const std::string &name) |
| | Whether node binds name (a parameter, nested definition, import or assignment target), which would shadow the module-level function.
|
| static std::vector< std::string > | returned_function_names (const nlohmann::json &function_node) |
| | The functions a body returns by name, through conditional expressions.
|
| static bool | parameter_defaults_to_any (const nlohmann::json &element) |
| | Whether the parameter takes the Any (void*) default: no annotation at all, a class of a module with no model (#9204), or a bare Callable, which is worse than none.
|
| static bool | references_name (const nlohmann::json &node, const std::string ¶m_name) |
| static bool | return_value_safe_for_tagged_param (const nlohmann::json &value, const std::string ¶m_name) |
| static bool | any_return_unsafe_for_tagged_param (const nlohmann::json &body, const std::string ¶m_name) |
| static std::vector< std::string > | constructor_callees (const nlohmann::json &module_body, const std::string &callee) |
| static bool | is_local_of (const std::string &symbol_id, const std::string &function_id) |
| static void | hoist_nested_declarations (exprt &code, const std::set< std::string > &ids, exprt::operandst &out, bool outermost) |
| static bool | contains_call_node (const nlohmann::json &node) |
| static const nlohmann::json * | statement_level_call (const nlohmann::json &stmt) |
| static bool | is_simple_name_assign_to (const nlohmann::json &stmt, const std::string &name) |
| static bool | is_if_else_with_both_arms (const nlohmann::json &stmt) |
| static bool | block_assigns_name_anywhere (const nlohmann::json &block, const std::string &name) |
| static std::optional< std::string > | get_directly_returned_name (const nlohmann::json &body) |
| static void | throw_if_branch_shapes_mismatch (const nlohmann::json *then_value, const nlohmann::json *else_value) |
| static bool | is_written_int_annotation (const nlohmann::json &returns) |
| | Whether the program, not the annotator, wrote -> int.
|
| static bool | any_return (const nlohmann::json &stmts, const std::function< bool(const nlohmann::json &)> &pred) |
| | Whether a return in stmts (nested blocks included) satisfies pred.
|
| static bool | returns_none (const nlohmann::json &body) |
| | Whether a return in body yields None: a bare return, return None, or a conditional expression with a None arm.
|
| static bool | is_dynamic_lookup (const nlohmann::json &node) |
| static bool | json_mentions (const nlohmann::json &node, const std::string &name) |
| static bool | options_name_functions () |
| static void | collect_nested_local_decls (exprt &code, bool nested, std::vector< codet > &hoisted, std::set< irep_idt > &seen) |