Go to the documentation of this file.
29 std::size_t left_unique_count = 0, right_unique_count = 0;
30 while(right_index != left_index)
32 if(right_index > left_index)
38 " has no parent, can't find an ancestor.");
39 right_index = edge_map.begin()->first, right_unique_count++;
47 " has no parent, can't find an ancestor.");
48 left_index = edge_map.begin()->first, left_unique_count++;
53 return {right_index, left_unique_count, right_unique_count};
63 std::vector<destructor_and_idt> codes;
64 while(next_id > end_id)
67 auto &destructor = node.destructor_value;
71 next_id = node.in.begin()->first;
void descend_tree()
Walks the current node down to its child.
optionalt< codet > & get_destructor(node_indext index)
Fetches the destructor value for the passed-in node index.
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.
void add(const codet &destructor)
Adds a destructor to the current stack, attaching itself to the current node.
#define PRECONDITION(CONDITION)
nonstd::optional< T > optionalt
grapht< destructor_nodet > destruction_graph
void set_current_node(optionalt< node_indext > val)
Sets the current node.
node_indext get_current_node() const
Gets the node that the next addition will be added to as a child.
const ancestry_resultt get_nearest_common_ancestor_info(node_indext left_index, node_indext right_index)
Finds the nearest common ancestor of two nodes and then returns it.
const std::vector< destructor_and_idt > get_destructors(optionalt< node_indext > end_index={}, optionalt< node_indext > starting_index={})
Builds a vector of destructors that start from starting_index and ends at end_index.
Result of a tree query holding both destructor codet and the ID of the node that held it.
Result of an attempt to find ancestor information about two nodes.
Data structure for representing an arbitrary statement in a program.