Protected
rootContains the vertices of the root level graph (i.e., included those vertices from the complete graph, that are nested within function definitions)
Retrieves the set of vertices which have side effects that we do not know anything about.
Static
fromConstructs a dataflow graph instance from the given JSON data and returns the result. This can be useful for data sent by the flowR server when analyzing it further.
The JSON data to construct the graph from
Adds a new vertex to the graph, for ease of use, some arguments are optional and filled automatically.
The vertex to add
If false, this will only add the vertex but do not add it to the rootIds|root vertices of the graph. This is probably only of use, when you construct dataflow graphs for tests.
the ids of all edges in the graph together with their edge information
Get the DataflowGraphVertexInfo attached to a node as well as all outgoing edges.
The id of the node to get
If true this will search function definitions as well and not just the toplevel
the node info for the given id (if it exists)
Get the DataflowGraphVertexInfo attached to a vertex.
The id of the node to get
If true this will search function definitions as well and not just the toplevel
the node info for the given id (if it exists)
Returns true if the graph contains a node with the given id.
The id to check for
If true this will check function definitions as well and not just the toplevel
Returns true if the root level of the graph contains a node with the given id.
Merges the other graph into this one (in-place). The return value is only for convenience.
The graph to merge into this one
If false, this will only merge the vertices and edges but exclude the root vertices this is probably only of use in the context of function definitions
Marks a vertex in the graph to be a definition
The reference to the vertex to mark as definition
Allows setting the id-map explicitly (which should only be used when, e.g., you plan to compare two dataflow graphs on the same AST-basis)
Marks a vertex in the graph to be a function call with the new information
The information about the new function call node
If true this will iterate over function definitions as well and not just the toplevel
the ids of all toplevel vertices in the graph together with their vertex information
The dataflow graph holds the dataflow information found within the given AST. We differentiate the directed edges in EdgeType and the vertices indicated by DataflowGraphVertexArgument
The vertices of the graph are organized in a hierarchical fashion, with a function-definition node containing the node ids of its subgraph. However, all edges are hoisted at the top level in the form of an (attributed) adjacency list. After the dataflow analysis, all sources and targets of the edges must be part of the vertices. However, this does not have to hold during the construction as edges may point from or to vertices which are yet to be constructed.
All methods return the modified graph to allow for chaining.