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

    A read-only view of the ControlFlowGraph.

    interface ReadOnlyControlFlowGraph {
        edges: () => ReadonlyMap<NodeId, ReadonlyMap<NodeId, CfgEdge>>;
        getBasicBlock: (elemId: NodeId) => CfgBasicBlockVertex | undefined;
        getVertex: (id: NodeId, includeBlocks?: boolean) => CfgVertex | undefined;
        hasVertex: (id: NodeId, includeBlocks?: boolean) => boolean;
        ingoingEdges: (id: NodeId) => ReadonlyMap<NodeId, CfgEdge> | undefined;
        mayHaveBasicBlocks: () => boolean;
        outgoingEdges: (id: NodeId) => ReadonlyMap<NodeId, CfgEdge> | undefined;
        rootIds: () => ReadonlySet<NodeId>;
        vertices: (
            includeBasicBlockElements: boolean,
        ) => ReadonlyMap<NodeId, CfgVertex>;
    }

    Implemented by

    Index

    Properties

    edges: () => ReadonlyMap<NodeId, ReadonlyMap<NodeId, CfgEdge>>

    Get all edges in the graph, independent of their sources and targets. If you are only interested in the edges of a specific node, please use outgoingEdges() or ingoingEdges().

    This is the pendant of DataflowGraph#edges|edges() on a DataflowGraph.

    getBasicBlock: (elemId: NodeId) => CfgBasicBlockVertex | undefined

    Obtain the basic block associated with the given element id (i.e. if this is an element within a basic block, return the blockit belongs to).

    getVertex: (id: NodeId, includeBlocks?: boolean) => CfgVertex | undefined

    Retrieve a vertex by its id.

    Type Declaration

      • (id: NodeId, includeBlocks?: boolean): CfgVertex | undefined
      • Parameters

        • id: NodeId

          the id of the vertex to retrieve

        • OptionalincludeBlocks: boolean

          if true, the elements of basic block elements are included in the result, otherwise this will only the basic blocks themselves

          This is the pendant of DataflowGraph#getVertex|getVertex() on a DataflowGraph.

        Returns CfgVertex | undefined

    hasVertex: (id: NodeId, includeBlocks?: boolean) => boolean

    Check if a vertex with the given id exists in the graph.

    Type Declaration

      • (id: NodeId, includeBlocks?: boolean): boolean
      • Parameters

        • id: NodeId

          the id of the vertex to check

        • OptionalincludeBlocks: boolean

          if true, the elements of basic block elements are included in the check, otherwise this will only check the basic blocks themselves

          This is the pendant of DataflowGraph#hasVertex|hasVertex() on a DataflowGraph.

        Returns boolean

    ingoingEdges: (id: NodeId) => ReadonlyMap<NodeId, CfgEdge> | undefined

    Receive all ingoing edges of a given vertex.

    This is the pendant of DataflowGraph#outgoingEdges|outgoingEdges() on a DataflowGraph.

    outgoingEdges() - for a way to get all outgoing edges of a vertex.

    mayHaveBasicBlocks: () => boolean

    Returns true if the graph may contain basic blocks and false if we know that it does not. This can be used for optimizations.

    outgoingEdges: (id: NodeId) => ReadonlyMap<NodeId, CfgEdge> | undefined

    Receive all outgoing edges of a given vertex.

    This is the pendant of DataflowGraph#ingoingEdges|ingoingEdges() on a DataflowGraph.

    ingoingEdges() - for a way to get all ingoing edges of a vertex.

    rootIds: () => ReadonlySet<NodeId>

    Get all ids of the root vertices — vertices that are not part of any function definition or basic block and hence part of the "top-level" control flow.

    This is the pendant of DataflowGraph#rootIds|rootIds() on a DataflowGraph.

    • vertices() - for a way to get all vertices in the graph.
    • getVertex() - for a way to get a specific vertex by its id.
    • edges() - for a way to get all edges in the graph.
    vertices: (includeBasicBlockElements: boolean) => ReadonlyMap<NodeId, CfgVertex>

    Provide a view of all vertices in the graph.

    Type Declaration

      • (includeBasicBlockElements: boolean): ReadonlyMap<NodeId, CfgVertex>
      • Parameters

        • includeBasicBlockElements: boolean

          if true, the elements of basic block elements are included in the result, otherwise only the basic blocks themselves are included

        Returns ReadonlyMap<NodeId, CfgVertex>

    • ReadOnlyControlFlowGraph#rootVertexIds|rootVertexIds() - for a way to get the root vertices of the graph.
    • getVertex() - for a way to get a specific vertex by its id.
    • edges() - for a way to get all edges in the graph.