Marker vertex for a value in the dataflow of the program. This does not contain the value of the referenced constant as this is available with the id in the NormalizedAst|normalized AST (or more specifically the AstIdMap).

If you have a DataflowGraph|dataflow graph named graph with an AstIdMap and a value vertex object with name value the following Code should work:

const node = graph.idMap.get(value.id)

This then returns the corresponding node in the NormalizedAst|normalized AST, for example, an RNumber or RString.

This works similarly for IdentifierReference|identifier references for which you can use the IdentifierReference#nodeId|nodeId.

isValueVertex - to check if a vertex is a value vertex

interface DataflowGraphVertexValue {
    cds: undefined | ControlDependency[];
    environment?: undefined;
    id: NodeId;
    indicesCollection?: ContainerIndicesCollection;
    link?: DataflowGraphVertexAstLink;
    tag: Value;
    [key: string]: unknown;
}

Hierarchy (View Summary)

Indexable

  • [key: string]: unknown

Hierarchy-Diagram

UML class diagram of DataflowGraphVertexValue

Properties

cds: undefined | ControlDependency[]

ControlDependency - the collection of control dependencies which have an influence on whether the vertex is executed.

environment?: undefined

The environment in which the vertex is set.

id: NodeId

The id of the node (the id assigned by the ParentInformation decoration). This unanimously identifies the vertex in the DataflowGraph|dataflow graph as well as the corresponding NormalizedAst|normalized AST.

indicesCollection?: ContainerIndicesCollection

this attribute links a vertex to indices (pointer links) it may be affected by or related to

Describes the collection of AST vertices that contributed to this vertex. For example, this is useful with replacement operators, telling you which assignment operator caused them

tag: Value

Used to identify and separate different types of vertices.