|
| static void | collect_classinfo (const nlohmann::json &node, std::vector< nlohmann::json > &out) |
| static bool | admits_class_object (const std::vector< nlohmann::json > &types) |
| static exprt | evaluate_after (const exprt &binding, const exprt &result) |
| | result evaluated after binding, or result alone if it is nil.
|
| static exprt | list_item_of_scalar_read (const exprt &read, const typet &item_type) |
| | The list item a read *(T *)item->value of a scalar element comes from, or nil.
|
| static exprt | tagged_isinstance_operand (const exprt &obj, const std::string &type_name, const type_handler &types) |
| | The tagged object whose type_id answers isinstance(obj, type_name): obj itself when it is a tagged scalar, the list item a scalar element read comes from when type_name is a scalar type, else nil.
|
| static std::string | isinstance_type_name (const nlohmann::json &node) |
| static bool | is_plain_receiver (const nlohmann::json &node) |
| static bool | is_plain_identifier (const std::string &name) |
| | A plain identifier with no __: dunder attributes come from object, and a private __x is stored unmangled, so neither matches the class struct.
|
| static bool | binds_name (const nlohmann::json &node, const std::string &name) |
| | Whether node, a single AST node, could bind name: an attribute or name store, any named binder (def, class, import alias, except or match capture), or a generic hook (setattr, dict) that binds any attribute.
|
| static bool | may_bind (const nlohmann::json &node, const std::string &name) |
| static bool | may_delete (const nlohmann::json &node, const std::string &attr) |
| static const nlohmann::json * | find_user_class (const std::string &name, const nlohmann::json &ast) |
| static const nlohmann::json * | user_class_of (const typet &type, const nlohmann::json &ast) |
| | The program's ClassDef for type when it and every base are defined in the program; null otherwise.
|
| static bool | is_self_attribute (const nlohmann::json &target, const std::string &self, const std::string &attr) |
| static bool | is_super_init_call (const nlohmann::json &stmt) |
| static bool | assigns_self_attribute (const nlohmann::json &stmt, const std::string &self, const std::string &attr) |
| static bool | init_binds (const nlohmann::json &cls, const std::string &attr, const nlohmann::json &ast) |
| | Whether every constructed instance of cls has attr: its init (or the one it inherits or delegates to through super().__init__()) assigns self.attr in straight-line code before any return.
|
| static bool | base_init_binds (const nlohmann::json &cls, const std::string &attr, const nlohmann::json &ast) |
| static bool | has_subclass (const std::string &name, const nlohmann::json &ast) |
| static bool | imports_other_modules (const nlohmann::json &ast) |
| | An imported module can subclass a class or bind attributes that the scan of this module does not see; typing and future bind neither.
|
| static bool | attribute_decided (const typet &type, const std::string &attr, const nlohmann::json &ast, bool &present) |
| | Whether attr is decided for every instance whose static type is type: sets present to whether it exists.
|
| static bool | runs_call (const nlohmann::json &node, const nlohmann::json &call) |
| | Whether node holds call where it runs as node runs, not in a nested function, class or generator that may run later.
|
| static bool | set_before_call (const nlohmann::json &body, const std::string &name, const std::string &attr, const nlohmann::json &call) |
| | Whether body binds name and then sets name.
|
| static bool | may_intercept (const nlohmann::json &node, const std::string &attr) |
| | Whether user code can intercept setting, reading or removing attr: a property or method of that name, a descriptor, or an attribute hook.
|
| static bool | receiver_given_attribute (const nlohmann::json &receiver, const typet &type, const std::string &attr, const nlohmann::json &call, const python_converter &converter) |
| | Whether the plain name receiver, an instance of a program class, was given attr in the scope running call before the call (#8508).
|
| static bool | body_constructs (const nlohmann::json &body, const std::string &name, const std::string &cls) |
| static bool | is_method_self (const nlohmann::json &ast, const std::vector< std::string > &function, const std::string &name, const std::string &cls) |
| static bool | reads_class_as_value (const nlohmann::json &node, const std::string &cls) |
| static bool | yields_class_object (const nlohmann::json &node) |
| static bool | class_object_escapes (const nlohmann::json &node, bool used=false) |
| static bool | is_exact_self (const nlohmann::json &ast, const std::vector< std::string > &function, const std::string &name, const std::string &cls) |
| static std::string | class_key (const nlohmann::json &node, const nlohmann::json &ast) |
| | The class a classinfo node names: a collections.abc class as "collections.abc.<name>", any other Name as its id, and otherwise empty.
|
| static const std::vector< std::string > * | abc_supers (const std::string &key) |
| | The collections.abc classes each builtin class and each such ABC is a subclass of, as CPython 3.14 reports them.
|
| static const std::vector< std::string > * | abc_hook_methods (const std::string &key) |
| | The methods by whose presence a structural collections.abc class (one with a subclasshook) admits a class that does not inherit it.
|
| static bool | defines_method (const nlohmann::json &cls, const std::string &name) |
| static std::vector< std::string > | class_ancestors (const std::string &cls, const nlohmann::json &ast) |
| | cls and the classes it inherits, explicitly or implicitly, nearest first.
|
| static bool | is_hashable (const std::vector< std::string > &ancestors, const nlohmann::json &ast) |
| | Whether instances of a class are hashable: the nearest class to define hash or eq decides, as defining eq alone sets hash to None.
|
| static bool | is_subclass (const std::vector< std::string > &ancestors, const std::string &target, const nlohmann::json &ast) |
| | Whether a class with ancestors is a subclass of target: by inheritance, by a builtin's registration with a collections.abc class, or by defining the methods a structural collections.abc class looks for.
|
| static bool | is_std_stream (const nlohmann::json &target) |