ProtectedrootContains the vertices of the root level graph (i.e., included those vertices from the complete graph, that are nested within function definitions)
Retrieves the id-map to the normalized AST attached to the dataflow graph
Retrieves the set of vertices which have side effects that we do not know anything about.
StaticfromConstructs a dataflow graph instance from the given JSON data, e.g. as sent by the flowR server for further analysis.
Adds vertex to the graph, filling in fallbackEnv if it carries no environment. asRoot = false skips
adding it to rootIds|root vertices (mostly useful when constructing graphs for tests); overwrite replaces an existing vertex of the same id.
Ids of all edges in the graph together with their edge information, see DataflowGraph#vertices.
The edges leaving id, i.e. what it depends on, as a map from target to edge.
A vertex without any answers with the shared empty NoEdges rather than with undefined,
so this can be iterated straight away.
The edges arriving at id, i.e. what depends on it, as a map from source to edge.
A vertex without any answers with the shared empty NoEdges rather than with undefined.
The first call builds the index over every edge of the graph; it is kept until the graph changes.
Gets the DataflowGraphVertexInfo attached to id (searching function definitions too if includeDefinedFunctions) and its outgoing edges.
Gets the DataflowGraphVertexInfo attached to id, but only if it is a root-level vertex, see DataflowGraph#getVertex.
Gets the DataflowGraphVertexInfo attached to id, see DataflowGraph#getRootVertex.
Whether the graph contains a node with id (checking function definitions too if includeDefinedFunctions).
The edges arriving at id, building the incoming index on first use.
Whether id is quoted, i.e. affected by a EdgeType.NonStandardEvaluation edge that keeps it from being
evaluated (a loop's own NSE-marked body still is evaluated, so that does not count). withOutgoing also checks whether id itself quotes something.
Returns true if the root level of the graph contains a node with the given id.
Merges otherGraph into this one in-place (the return value is only for convenience);
mergeRootVertices = false excludes its root vertices (useful when merging in a function definition).
consume takes otherGraph's edge tables instead of copying them (perf). Pass it only for a graph that dies with the call.
The edges leaving id, the mutable map the graph stores, undefined for a vertex that has none.
The cached pkg::fn name of the call id, asking resolve only for a call the cache does not know yet.
The cached pkg::fn name of every call, resolving the calls that are still missing.
Marks the vertex referenced by reference as a definition, with sourceIds as the source vertex ids of the def if known.
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 the vertex info.id in the graph to be a function call with the new info.
The ids of DataflowGraph#verticesOfType|verticesOfType, as a fresh array the caller may keep.
Ids of all toplevel vertices (or all, including those nested in function definitions, if includeDefinedFunctions) with their info, see DataflowGraph#edges.
Every vertex carrying type, in the order the graph learned of them.
The dataflow graph holds the dataflow information found within the given AST: directed edges (EdgeType) are hoisted into a flat adjacency list, while vertices (DataflowGraphVertexArgument) nest hierarchically (a function-definition vertex contains its subgraph's node ids). After analysis every edge endpoint must be a vertex, though not yet during construction. All methods return the modified graph to allow for chaining. The helper object associated with the DFG is Dataflow.