Node-Type Steps

Node-Type Steps are CPGQL Steps that traverse nodes based on their type.

Overview #

StepDescription
allVisits all nodes in the Code Property Graph
blockVisits BLOCK nodes
callVisits CALL nodes, represent call-sites
commentVisits COMMENT nodes, COMMENT nodes exist only for source-based Code Property Graphs
fileVisits FILE nodes, in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
identifierVisits IDENTIFIER nodes; e.g. occurrences of local variables or class members in method bodies
literalVisits LITERAL nodes; e.g. numbers or strings
localVisits LOCAL nodes; represent local variable
memberVisits MEMBER nodes; MEMBER nodes refer to members of complex types like classes or structs
metaDataVisits the META_DATA node
methodVisits METHOD nodes
methodRefVisits METHOD_REF nodes
methodReturnVisits METHOD_RETURN nodes; all formal return parameters
modifierVisits MODIFIER nodes; e.g. public, private, static
namespaceVisits NAMESPACE nodes
namespaceBlockVisits NAMESPACE_BLOCK nodes
parameterVisits PARAMETER nodes
returnsVisits RETURN nodes
typeDeclVisits TYPE_DECL nodes
tagVisits TAG nodes
typVisits TYPE nodes

all #

The all Node-Type Step represents a traversal which visits all nodes of a Code Property Graph. It supports the two only Property Directives which are common to all Node-Type Steps, id and label.

Supported Property Directives

Property DirectiveReturn TypeDescription
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type

Supported Node Type Steps

Node Type StepDescription
fileVisits FILE nodes attached to all nodes in the graph
tagVisits TAG nodes attached to all nodes in the graph

Supported Complex Steps

None.

block #

Supported Property Directives

Property DirectiveReturn TypeDescription
argumentIndexintIdentifies different AST children of CALL nodes or BLOCK nodes. Ordered 1 to N, with 0 reserved for implicit arguments like this or self
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
lineNumberintFirst line at which the code representing this node is found
orderintGeneral ordering property for AST nodes

Supported Node Type Steps

Node Type StepDescription
callVisits CALL nodes; represent call-sites
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
localVisits LOCAL nodes; represent local variable
tagVisits TAG nodes
typVisits TYPE nodes

Supported Complex Steps

Complex StepDescription
location

call #

Supported Property Directives

Property DirectiveReturn TypeDescription
codestringThe source code construct this node represents
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
lineNumberintFirst line at which the code representing this node is found
namestringGeneral string identifier for various nodes

Supported Node Type Steps

Node Type StepDescription
callVisits CALL nodes; represent call-sites
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
methodVisits METHOD nodes
parameterVisits PARAMETER nodes
tagVisits TAG nodes

Supported Complex Steps

Complex StepDescription
argumentVisits nodes connected by ARGUMENT edges; actual parameters
isDynamic
isStatic
location

comment #

Supported Property Directives

Property DirectiveReturn TypeDescription
idintUnique node identifier
codestringThe source code construct this node represents
labelstringReturns the value of the LABEL property which represents the node type
lineNumberintFirst line at which the code representing this node is found

Supported Node Type Steps

Node Type StepDescription
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
tagVisits TAG nodes

Supported Complex Steps

Complex StepDescription
location

file #

Supported Property Directives

Property DirectiveReturn TypeDescription
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
namestringGeneral string identifier for various nodes
orderintGeneral ordering property for AST nodes

Supported Node Type Steps

Node Type StepDescription
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
namespaceVisits NAMESPACE nodes
namespaceBlockVisits NAMESPACE_BLOCK nodes
tagVisits TAG nodes
typeDeclVisits TYPE_DECL nodes

Supported Complex Steps

Complex StepDescription
location

identifier #

Supported Property Directives

Property DirectiveReturn TypeDescription
codestringThe source code construct this node represents
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
lineNumberintFirst line at which the code representing this node is found
namestringGeneral string identifier for various nodes
orderintGeneral ordering property for AST nodes

Supported Node Type Steps

Node Type StepDescription
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
parameterVisits PARAMETER nodes
tagVisits TAG nodes
typVisits TYPE nodes

Supported Complex Steps

Complex StepDescription
location

literal #

Supported Property Directives

Property DirectiveReturn TypeDescription
codestringThe source code construct this node represents
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
lineNumberintFirst line at which the code representing this node is found
orderintGeneral ordering property for AST nodes

Supported Node Type Steps

Node Type StepDescription
callVisits CALL nodes; represent call-sites
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
methodVisits METHOD nodes
parameterVisits PARAMETER nodes
tagVisits TAG nodes
typVisits TYPE nodes

Supported Complex Steps

Complex StepDescription
location

local #

Supported Property Directives

Property DirectiveReturn TypeDescription
codestringThe source code construct this node represents
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
lineNumberintFirst line at which the code representing this node is found
namestringGeneral string identifier for various nodes
orderintGeneral ordering property for AST nodes

Supported Node Type Steps

Node Type StepDescription
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
tagVisits TAG nodes
typVisits TYPE nodes

Supported Complex Steps

Complex StepDescription
location

member #

Supported Property Directives

Property DirectiveReturn TypeDescription
codestringThe source code construct this node represents
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
namestringGeneral string identifier for various nodes
orderintGeneral ordering property for AST nodes

Supported Node Type Steps

Node Type StepDescription
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
modifierVisits MODIFIER nodes; e.g. public, private, static
tagVisits TAG nodes
typVisits TYPE nodes
typeDeclVisits TYPE_DECL nodes

Supported Complex Steps

Complex StepDescription
location

metaData #

Supported Property Directives

Property DirectiveReturn TypeDescription
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
languagestringThe programming language this graph originates from
versionstringA version, given as a string

Supported Node Type Steps

Node Type StepDescription
tagVisits TAG nodes
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist

Supported Complex Steps

Complex StepDescription
location

method #

Supported Property Directives

Property DirectiveReturn TypeDescription
fullNamestringGeneral string identifier which includes various details of the node it is defined on
idintUnique node identifier
isExternalbooleanIndicates that the node represents a program construct that is not defined directly in its source code
labelstringReturns the value of the LABEL property which represents the node type
lineNumberintFirst line at which the code representing this node is found
lineNumberEndintLast line at which the code representing this node is found
namestringGeneral string identifier for various nodes
orderintGeneral ordering property for AST nodes
signaturestringThe method signature; usually includes the method name, and the number, types and order of its parameters

Supported Node Type Steps

Node Type StepDescription
localVisits LOCAL nodes; represent local variable
methodVisits METHOD nodes
methodReturnVisits METHOD_RETURN nodes; all formal return parameters
modifierVisits MODIFIER nodes; e.g. public, private, static
namespaceVisits NAMESPACE nodes
parameterVisits PARAMETER nodes
tagVisit TAG nodes attached to the METHOD nodes; that is, tags found on methods

Supported Complex Steps

Complex StepDescription
isPrivateFilter for the METHOD nodes which are connected to MODIFIER nodes with the modifierType property set to PRIVATE
isProtectedFilter for the METHOD nodes which are connected to MODIFIER nodes with the modifierType property set to PROTECTED
isPublicFilter for the METHOD nodes which are connected to MODIFIER nodes with the modifierType property set to PUBLIC
isStaticFilter for the METHOD nodes which are connected to MODIFIER nodes with the modifierType property set to STATIC
isVirtualFilter for the METHOD nodes which are connected to MODIFIER nodes with the modifierType property set to VIRTUAL
location

methodRef #

Supported Property Directives

Property DirectiveReturn TypeDescription
codestringThe source code construct this node represents
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
lineNumberintFirst line at which the code representing this node is found
orderintGeneral ordering property for AST nodes

Supported Node Type Steps

Node Type StepDescription
fileVisits
methodVisits
parameterVisits
tagVisits
typVisits

Supported Complex Steps

Complex StepDescription
location

methodReturn #

Supported Property Directives

Property DirectiveReturn TypeDescription
codestringThe source code construct this node represents
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
lineNumberintFirst line at which the code representing this node is found
orderintGeneral ordering property for AST nodes

Supported Node Type Steps

Node Type StepDescription
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
methodVisits METHOD nodes
tagVisits TAG nodes
typVisits TYPE nodes

Supported Complex Steps

Complex StepDescription
location

modifier #

Supported Property Directives

Property DirectiveReturn TypeDescription
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
orderintGeneral ordering property for AST nodes

Supported Node Type Steps

Node Type StepDescription
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
tagVisits TAG nodes

Supported Complex Steps

Complex StepDescription
location

namespaceBlock #

Supported Property Directives

Property DirectiveReturn TypeDescription
idintUnique node identifier
fullNamestringGeneral string identifier which includes various details of the node it is defined on
labelstringReturns the value of the LABEL property which represents the node type
namestringGeneral string identifier for various nodes
orderintGeneral ordering property for AST nodes

Supported Node Type Steps

Node Type StepDescription
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
tagVisits TAG nodes
typeDeclVisits TYPE_DECL nodes

Supported Complex Steps

Complex StepDescription
location

namespace #

Supported Property Directives

Property DirectiveReturn TypeDescription
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
namestringGeneral string identifier for various nodes
orderintGeneral ordering property for AST nodes

Supported Node Type Steps

Node Type StepDescription
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
tagVisits TAG nodes
typeDeclVisits TYPE_DECL nodes

Supported Complex Steps

Complex StepDescription
location

parameter #

Supported Property Directives

Property DirectiveReturn TypeDescription
codestringThe source code construct this node represents
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
lineNumberintFirst line at which the code representing this node is found
namestringGeneral string identifier for various nodes
orderintGeneral ordering property for AST nodes

Supported Node Type Steps

Node Type StepDescription
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
methodVisits METHOD nodes
tagVisits TAG nodes
typVisits TYPE nodes

Supported Complex Steps

Complex StepDescription
location

returns #

Supported Property Directives

Property DirectiveReturn TypeDescription
codestringThe source code construct this node represents
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
lineNumberintFirst line at which the code representing this node is found
orderintGeneral ordering property for AST nodes

Supported Node Type Steps

Node Type StepDescription
callVisits CALL nodes; represent call-sites
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
methodVisits METHOD nodes
parameterVisits PARAMETER nodes
tagVisits TAG nodes

Supported Complex Steps

Complex StepDescription
location

tag #

Supported Property Directives

Property DirectiveReturn TypeDescription
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
namestringGeneral string identifier for various nodes
valuestringGeneric string value container

Supported Node Type Steps

Node Type StepDescription
callVisits CALL nodes attached to the TAG nodes
fileVisits FILE nodes attached to the TAG nodes
literalVisits LITERAL nodes attached to the TAG nodes
localVisits LOCAL nodes attached to the TAG nodes
methodVisits METHOD nodes attached to the TAG nodes
methodReturnVisits METHOD_RETURN nodes attached to the TAG nodes
parameterVisits PARAMETER nodes attached to the TAG nodes
tagVisits TAG nodes attached to the TAG nodes

Supported Complex Steps

Complex StepDescription
location

typeDecl #

Supported Property Directives

Property DirectiveReturn TypeDescription
fullNamestringGeneral string identifier which includes various details of the node it is defined on
idintUnique node identifier
isExternalbooleanIndicates that the node represents a program construct that is not defined directly in its source code
labelstringReturns the value of the LABEL property which represents the node type
namestringGeneral string identifier for various nodes
orderintGeneral ordering property for AST nodes

Supported Node Type Steps

Node Type StepDescription
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
memberVisits MEMBER nodes; MEMBER nodes refer to members of complex types like classes or structs
methodVisits METHOD nodes
modifierVisits MODIFIER nodes; e.g. public, private, static
namespaceVisits NAMESPACE nodes
tagVisits TAG nodes

Supported Complex Steps

Complex StepDescription
methodBinding
aliasTypeDecl
aliasTypeDeclTransitive
baseType
baseTypeDecl
baseTypeDeclTransitive
derivedTypeDecl
derivedTypeDeclTransitive
location

typ #

Supported Property Directives

Property DirectiveReturn TypeDescription
fullNamestringGeneral string identifier which includes various details of the node it is defined on
idintUnique node identifier
labelstringReturns the value of the LABEL property which represents the node type
namestringGeneral string identifier for various nodes

Supported Node Type Steps

Node Type StepDescription
fileVisits FILE nodes; in source-based Code Property Graphs, FILE nodes will point both to the actual source code files of the program under analysis and paths to the referenced files from the standard library, for IR-based Code Property Graphs, the nodes representing source code files will not exist
methodVisits METHOD nodes
memberVisits MEMBER nodes; MEMBER nodes refer to members of complex types like classes or structs
parameterVisits PARAMETER nodes
tagVisits TAG nodes

Supported Complex Steps

Complex StepDescription
aliasType
aliasTypeDecl
aliasTypeTransitive
baseType
baseTypeTransitive
derivedType
derivedTypeDecl
derivedTypeTransitive
location
referencedTypeDecl