ConstReadonlycreate: {Dispatches to helper functions to create new dataflow graphs, e.g. from a pipeline or an empty graph.
Readonlyempty: (Creates an empty dataflow graph with the given id map (or a new one if not provided).
Compare two dataflow graphs and return a report on the differences.
If you simply want to check whether they equal, use <result>.isEqual().
Optionalconfig: Partial<GenericDiffConfiguration>Readonlyedge: {Maps to flowR's dataflow edge helper to work with the edges in the dataflow graph
Check if the given-edge type does not include the given type.
As types are bitmasks, you can combine multiple types with a bitwise OR (|).
Counterpart of DfEdge#includesType.
Check if the given-edge type has any of the given types.
As types are bitmasks, you can combine multiple types with a bitwise OR (|).
Readonlyname: "DfEdge"Takes joint edge types and splits them into their individual components.
Takes joint edge types and returns their human-readable names.
Only use this function to retrieve a human-readable name if you know that it is a single bitmask. Otherwise, use DfEdge#typesToNames which handles these cases.
Readonlygraph: typeof DataflowGraphMaps to flowR's main graph object to store and manipulate the dataflow graph
Whether any argument of the call carries a value the program worked out, rather than only literals the
author typed: cat("starting\n") is a log line, cat("n =", length(m)) is a finding.
A call among the arguments counts as computed, even one over literals such as paste("a", "b").
Inverts the given dataflow graph by reversing all edges.
Whether the node is quoted, i.e., affected by a EdgeType.NonStandardEvaluation edge that actually
keeps it from being evaluated (as quote and substitute do).
Loops mark their body as non-standard-evaluated as well, yet that body really is evaluated (and its symbols really are read), so such an edge does not quote. Use this instead of testing for the edge type directly whenever you want to know whether something is evaluated at all.
The id of the node to check
The graph the node is part of
Whether to also consider the outgoing edges of the node (i.e., whether the node itself quotes something), and not just the ingoing ones (i.e., whether it is quoted)
Readonlyname: "Dataflow"Readonlyorigin: (this: void, dfg: DataflowGraph, id: NodeId) => Origin[] | undefinedReturns the origin of a vertex in the dataflow graph
getOriginInDfg - for the underlying function
The packages the given nodes call into, as Dataflow.qualify resolves every call among them.
This is what a selection needs, which is not what the program loads: a library() whose exports the
selection never calls does not make the package needed. Base R is left out unless includeBaseR.
the ids to consider, e.g. the result of a slice
the graph the ids belong to
whether to also report base-R packages
Given the id of a vertex (usually a variable use), this returns a reachable provenance set by calculating a non-interprocedural and non-context sensitive backward slice, but stopping at the given ids! You can obtain the corresponding graph using Dataflow.reduceGraph.
The id to use as a seed for provenance calculation
The graph to perform the provenance calculation on
Optionalconsider: ReadonlySet<NodeId>
The ids to restrict the calculation too (e.g., the ids contained within a function definition to restrict the analysis to)
Which edges to consider in the provenance traversal, if you set this to undefined this will automatically track all edges
Dataflow.provenanceGraph - for a convenience wrapper to directly obtain the graph of the provenance.
A convenience wrapper for reducing the provenance of a graph.
The id to use as a seed for provenance calculation
The graph to perform the provenance calculation on
Optionalconsider: ReadonlySet<NodeId>
The ids to restrict the calculation too (e.g., the ids contained within a function definition to restrict the analysis to)
The qualified identifier of the call with the given id, or undefined if it does not resolve to a package
export and is not itself already namespaced (with purrr loaded, a map() call yields
Identifier.make('map', 'purrr'); an explicit pkg::fn() call yields pkg::fn unchanged).
This is the compact form of Identifier.toQualified, reconstructing both the origins and the call's name from the graph.
The id of the call to qualify
The graph the call is part of
Whether to also qualify a bare base-R call from the package exporting it
(sd yields stats::sd), which needs neither a loaded database nor graph edges.
Set this to false to only qualify what the origins resolve to (or what is already namespaced).
Determines whether there is a path from from to to in the given graph (via any edge type, only respecting direction)
Equivalent to reduceGraph followed by invertGraph
but in a single pass over the graph, allocating only one intermediate object instead of two.
Use this when you need the reduced-and-inverted graph for a forward traversal within a restriction set.
Only returns the sub-part of the graph that is determined by the given selection. In other words, this will return a graph with only vertices that are part of the selected ids, and edges that are between such selected vertices.
Readonlyresolve: {Name and value resolution.
Resolve - the helper object itself, which documents which entry point to reach for
Readonlyargument: {The same, for the arguments of a call.
Readonlyname: "argument"ReadonlystringVector: (id: (...) | (...) | (...), info: ResolveInfo) => (...) | (...)The argument's value as a vector of strings.
ReadonlysymbolName: (id: (...) | (...) | (...), info: ResolveInfo) => (...) | (...)The argument's value as the name of the symbol it holds.
ReadonlytoName: (id: (...) | (...) | (...), info: ResolveInfo) => (...) | (...)The argument's name.
Readonlyvalue: (The argument's value.
ReadonlyvectorLength: (id: (...) | (...) | (...), info: ResolveInfo) => (...) | (...)The length of the vector the argument holds.
ReadonlybyName: (id: Identifier, environment: REnvironmentInformation) => (...)[] | undefinedEvery definition the identifier may refer to, whatever its type.
ReadonlybyNameAndType: (The definitions the identifier may refer to that fit the wanted ReferenceType.
Readonlyname: "Resolve"ReadonlytoBuiltIn: (Whether the name always, never, or maybe refers to a built-in constant of the given value.
ReadonlytoConstants: (The constant values the name resolves to.
ReadonlytoSingleString: (The single string the node resolves to, or undefined if it is not exactly one.
ReadonlytoValue: (The value(s) the node may hold, tracking aliases as the configuration allows.
Resolves the dataflow graph ids from slicing criterion form to ids.
This returns a new graph with the resolved ids.
The main use-case for this is testing - if you do not know/want to fix the specific id,
you can use, e.g. 2@x as a placeholder for the first x in the second line!
OptionalidMap: AstIdMapReadonlysideEffects: {Interprocedural propagation of escaped side effects (attached packages, <<- definitions) to their callers.
ReadonlycallGraphSummaries: <T>(ReadonlypropagateTransitive: (Whether the call's result is passed on -- assigned, handed to another call, returned -- rather than left
for R to auto-print. A bare anova(a, b) is an output the program reports; the summary(m) of
x <- summary(m) is not.
Only an edge that carries the value counts. A plain EdgeType.Reads does not: it also chains the
calls that share a side effect, which would report plot(x) as consumed by the lines(y) drawn after it.
Readonlyviews: {Dispatches to helper objects that relate to (sub-) views of the dataflow graph, e.g. the call graph.
ReadonlycallGraph: {Maps to flowR's helper object for the call-graph
Computes the call graph from the given dataflow graph.
Compare two dataflow graphs and return a report on the differences.
If you simply want to check whether they equal, use <result>.isEqual().
Optionalconfig: Partial<(...)>Inverts the given dataflow graph by reversing all edges.
Readonlyname: "CallGraph"Determines whether there is a path from from to to in the given graph (via any edge type, only respecting direction)
Resolves the dataflow graph ids from slicing criterion form to ids.
This returns a new graph with the resolved ids.
The main use-case for this is testing - if you do not know/want to fix the specific id,
you can use, e.g. 2@x as a placeholder for the first x in the second line!
OptionalidMap: AstIdMapReadonlyvisualize: {Maps to the mermaid-centric visualization helper for dataflow graphs and their views
Readonlymermaid: {Mermaid rendering helper for dataflow graphs
Converts a dataflow graph to mermaid graph code that visualizes the graph.
DataflowMermaid.url - render the given graph to a url to mermaid.live
Readonlyname: ...This is a simplified version of DataflowMermaid.convert
OptionalincludeEnvironments: ...Optionalmark: ...Converts a dataflow graph to a mermaid url that visualizes the graph. This is basically a combination of DataflowMermaid.raw and Mermaid.codeToUrl.
the dataflow graph to render
OptionalincludeEnvironments: ...
whether to include the environment content in the output
Optionalmark: ...
which vertices to highlight in the visualization
whether to show a simplified use of the graph with fewer details on the vertices and edges
show the edge-free base-R qualification (stats::acf); false when the signature database is disabled
Readonlyquads: { convert: ... }A simple visitor akin to RNode.visitAst to traverse the dataflow graph starting from the start id and only respecting edge direction.
The dataflow graph to operate on.
The start id of the visitation.
The function to execute for each vertex, if this returns true the visitation will stop from this vertex.
Readonlyvisualize: {Maps to the mermaid-centric visualization helper for dataflow graphs and their views
Readonlymermaid: {Mermaid rendering helper for dataflow graphs
Converts a dataflow graph to mermaid graph code that visualizes the graph.
DataflowMermaid.url - render the given graph to a url to mermaid.live
Readonlyname: "DataflowMermaid"This is a simplified version of DataflowMermaid.convert
OptionalincludeEnvironments: booleanOptionalmark: ReadonlySet<(...)>Converts a dataflow graph to a mermaid url that visualizes the graph. This is basically a combination of DataflowMermaid.raw and Mermaid.codeToUrl.
the dataflow graph to render
OptionalincludeEnvironments: boolean
whether to include the environment content in the output
Optionalmark: ReadonlySet<(...)>
which vertices to highlight in the visualization
whether to show a simplified use of the graph with fewer details on the vertices and edges
show the edge-free base-R qualification (stats::acf); false when the signature database is disabled
Readonlyquads: {Readonlyconvert: (graph: DataflowGraph, config: QuadSerializationConfiguration) => string
This is the root helper object to work with the DataflowGraph.
pkg::fnidentifier of a call from its id and graph,