@eagleoutice/flowr - v2.17.7
    Preparing search index...

    Class DataflowGraph<Vertex, Edge>

    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).

    Type Parameters

    Hierarchy (View Summary)

    Index
    fileWritesPerCall: ReadonlySet<NodeId> | undefined

    The file writes within function bodies whose readers read the calls writing their file as well, so only a slice starting in their body needs every call they have an EdgeType.SideEffectOnCall on.

    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)

    statementOrder: ReadonlyMap<NodeId, readonly [number, number]> | undefined

    Where the top-level statements of every file start and end running, counted in the order they first do, as a statement sourcing a file runs that file's statements in between.

    • The ids of all calls recorded as touching the global state. The iterator is live, so do not record or forget while you iterate.

      Returns IterableIterator<NodeId>

    • Forgets what the call id was recorded to touch, for code that never runs, like the calls of an expression that is only quoted.

      Parameters

      Returns this

    • Whether the graph contains a node with id (checking function definitions too if includeDefinedFunctions).

      Parameters

      • id: NodeId
      • includeDefinedFunctions: boolean = true

      Returns boolean

    • How often a read arriving at id was added or removed since tracking started; an equal number means the reads are unchanged.

      Parameters

      Returns number

    • 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).

      Parameters

      Returns this

    • 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)

      Parameters

      Returns void

    • Runs fn with each walk for call targets on its own: code that changes the graph after nearly every call it asks about (as linking calls does) would only start the shared walks anew each time, which costs more than walking alone.

      Type Parameters

      • T

      Parameters

      • fn: () => T

      Returns T