File src/plugins/built_in/classes/stub/cl_graph.luadoc
Declares methods that can be invoked on a graph (instance of the 'graph' class)
Functions
graph:add_new_edge (src, dst, userdata) | Creates an edge and inserts it into a graph New edge is returned |
graph:add_new_node (userdata) | Creates a node and inserts it into a graph New node is returned |
graph:free () | Frees memory allocated for a graph |
graph:get_connected_components () | Returns graph connected components |
graph:get_edge2cc () | Returns graph edge2cc index |
graph:get_node2cc () | Returns graph node2cc index |
graph:new () | Returns new empty graph |
graph:tostring () | Prints "Graph: " (meta-method) |
graph_connected_component:get_edges () | Returns connected component edges |
graph_connected_component:get_entry_nodes () | Returns connected component entry nodes |
graph_connected_component:get_nodes () | Returns connected component nodes |
graph_connected_component:tostring () | Prints "Graph connected component: " (meta-method) |
graph_edge:get_data_dependence () | Returns data dependency data of a DDG edge |
graph_edge:get_dst_node () | Returns destination node of an edge |
graph_edge:get_src_node () | Returns source (origin) node of an edge |
graph_edge:tostring () | Prints "Graph edge: " (meta-method) |
graph_node:get_block () | Returns basic block contained into a node |
graph_node:get_incoming_edges () | Returns incoming edges of a node |
graph_node:get_insn () | Returns instruction contained into a node |
graph_node:get_outgoing_edges () | Returns outgoing edges of a node |
graph_node:get_predecessors () | Returns predecessor nodes of a node |
graph_node:get_successors () | Returns successor nodes of a node |
graph_node:tostring () | Prints "Graph node: " (meta-method) |
Functions
- graph:add_new_edge (src, dst, userdata)
-
Creates an edge and inserts it into a graph New edge is returned
Parameters
- src: source node
- dst: destination node
- userdata:
Return value:
new edge - graph:add_new_node (userdata)
-
Creates a node and inserts it into a graph New node is returned
Parameters
- userdata:
Return value:
new node - graph:free ()
- Frees memory allocated for a graph
- graph:get_connected_components ()
-
Returns graph connected components
Return value:
list (indexed table) of connected components - graph:get_edge2cc ()
-
Returns graph edge2cc index
Return value:
table of pairs (key=edge, value=connected component) - graph:get_node2cc ()
-
Returns graph node2cc index
Return value:
table of pairs (key=node, value=connected component) - graph:new ()
-
Returns new empty graph
Return value:
graph - graph:tostring ()
- Prints "Graph: " (meta-method)
- graph_connected_component:get_edges ()
-
Returns connected component edges
Return value:
list (indexed table) of edges - graph_connected_component:get_entry_nodes ()
-
Returns connected component entry nodes
Return value:
list (indexed table) of nodes - graph_connected_component:get_nodes ()
-
Returns connected component nodes
Return value:
list (indexed table) of nodes - graph_connected_component:tostring ()
- Prints "Graph connected component: " (meta-method)
- graph_edge:get_data_dependence ()
-
Returns data dependency data of a DDG edge
Return value:
data_dependency table (keys: "latency min", "latency max", "kind" and "distance") - graph_edge:get_dst_node ()
-
Returns destination node of an edge
Return value:
node - graph_edge:get_src_node ()
-
Returns source (origin) node of an edge
Return value:
node - graph_edge:tostring ()
- Prints "Graph edge: " (meta-method)
- graph_node:get_block ()
-
Returns basic block contained into a node
Return value:
block - graph_node:get_incoming_edges ()
-
Returns incoming edges of a node
Return value:
incoming edges (as array) - graph_node:get_insn ()
-
Returns instruction contained into a node
Return value:
instruction - graph_node:get_outgoing_edges ()
-
Returns outgoing edges of a node
Return value:
outgoing edges (as array) - graph_node:get_predecessors ()
-
Returns predecessor nodes of a node
Return value:
predecessor nodes (as array) - graph_node:get_successors ()
-
Returns successor nodes of a node
Return value:
successor nodes (as array) - graph_node:tostring ()
- Prints "Graph node: " (meta-method)