This DataflowGraphBuilder extends DataflowGraph with builder methods to easily and compactly add vertices and edges to a dataflow graph. Its usage thus simplifies writing tests for dataflow graphs.

Hierarchy (View Summary)

Hierarchy-Diagram

UML class diagram of DataflowGraphBuilder

Constructors

Properties

rootVertices: Set<NodeId> = ...

Contains the vertices of the root level graph (i.e., included those vertices from the complete graph, that are nested within function definitions)

Accessors

Methods

  • Adds a vertex for a function call (V2).

    Parameters

    • id: NodeId

      AST node ID

    • name: string

      Function name

    • args: FunctionArgument[]

      Function arguments; may be empty

    • Optionalinfo: {
          controlDependencies?: ControlDependency[];
          environment?: REnvironmentInformation;
          onlyBuiltIn?: boolean;
          reads?: readonly NodeId[];
          returns?: readonly NodeId[];
      }

      Additional/optional properties.

    • asRoot: boolean = true

      should the vertex be part of the root vertex set of the graph (i.e., be a valid entry point), or is it nested (e.g., as part of a function definition)

    Returns DataflowGraphBuilder

  • Returns true if the graph contains a node with the given id.

    Parameters

    • id: NodeId

      The id to check for

    • includeDefinedFunctions: boolean = true

      If true this will check function definitions as well and not just the toplevel

    Returns boolean