The definition of an identifier within the DataflowGraph|graph. This extends on the IdentifierReference by adding the NodeId of the definition (and using type to mark the object type).

Within a code snippet like a <- 3, the symbol processor will first create an identifier reference for a to reference the use and then promote it to an identifier definition.

interface InGraphIdentifierDefinition {
    controlDependencies: undefined | ControlDependency[];
    definedAt: NodeId;
    indicesCollection?: ContainerIndicesCollection;
    name: undefined | Identifier;
    nodeId: NodeId;
    type: InGraphReferenceType;
    value?: NodeId[];
}

Hierarchy (view full)

Hierarchy-Diagram

UML class diagram of InGraphIdentifierDefinition

Properties

controlDependencies: undefined | ControlDependency[]

If the reference is only effective, if, for example, an if-then-else condition is true, this references the root of the if. As a hacky intermediate solution (until we have pointer-analysis), an empty array may indicate a maybe which is due to pointer access (e.g., in a[x] <- 3).

definedAt: NodeId

The assignment node which ultimately defined this identifier (the arrow operator for e.g. x <- 3, or assign call in assign("x", 3))

indicesCollection?: ContainerIndicesCollection

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

name: undefined | Identifier

Name the reference is identified by (e.g., the name of the variable), undefined if the reference is "artificial" (e.g., anonymous)

nodeId: NodeId

The id of the node which represents the reference in the NormalizedAst|normalized AST and the DataflowGraph|dataflow graph.

Type of the reference to be resolved

value?: NodeId[]