3#include <nlohmann/json.hpp>
22 : converter_(converter), set_value_(set_node)
56 const nlohmann::json &element);
68 const nlohmann::json &element);
80 const nlohmann::json &element);
100 const nlohmann::json &element);
118 const nlohmann::json &element,
119 const std::string &method_name);
133 const nlohmann::json &element,
134 const std::string &method_name);
149 const std::string &op,
152 const nlohmann::json &element);
167 static void emit_filtered_extend(
169 const exprt &source_expr,
170 const exprt &ref_expr,
173 const nlohmann::json &element);
176 const nlohmann::json &set_value_;
Main converter for transforming Python AST into ESBMC's intermediate representation.
Definition python_converter.h:76
python_set(python_converter &converter, const nlohmann::json &set_node)
Definition python_set.h:21
exprt get_empty_set()
Create an empty set.
Definition python_set.cpp:95
exprt build_set_copy(const symbolt &self, const nlohmann::json &element)
Build a fresh shallow copy of self as a new set.
Definition python_set.cpp:725
exprt build_set_intersection_call(const exprt &lhs, const exprt &rhs, const nlohmann::json &element)
Build set intersection operation (set1 & set2).
Definition python_set.cpp:603
exprt build_set_union_call(const exprt &lhs, const exprt &rhs, const nlohmann::json &element)
Build set union operation (set1 | set2).
Definition python_set.cpp:734
static exprt handle_operations(python_converter &converter, const std::string &op, exprt &lhs, exprt &rhs, const nlohmann::json &element)
Handle set operations (difference, intersection, union) Entry point for all set binary operations.
Definition python_set.cpp:1146
exprt build_set_method_call(const symbolt &self, const exprt &other, const nlohmann::json &element, const std::string &method_name)
Emit the IR for a binary set method (issubset / issuperset / isdisjoint / update / symmetric_differen...
Definition python_set.cpp:1107
exprt build_set_relation_call(const exprt &self, const exprt &other, const nlohmann::json &element, const std::string &method_name)
Emit the IR for issubset / issuperset / isdisjoint over two list-typed expressions and return the boo...
Definition python_set.cpp:991
exprt build_set_difference_call(const exprt &lhs, const exprt &rhs, const nlohmann::json &element)
Build set difference operation (set1 - set2).
Definition python_set.cpp:476
exprt get_from_iterable(const exprt &iterable, const nlohmann::json &element)
Create a set from an iterable (e.g., set(list) or set(str)).
Definition python_set.cpp:105
exprt build_set_symmetric_difference_call(const exprt &lhs, const exprt &rhs, const nlohmann::json &element)
Build set symmetric difference (set1 ^ set2): (lhs - rhs) ∪ (rhs - lhs), collected into a fresh set.
Definition python_set.cpp:1210
exprt get()
Create a set from a set literal.
Definition python_set.cpp:61
@ other
Definition converter_compare.cpp:887