Skip to main content

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 Propert 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
typeRefVisits TYPE_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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
argumentIndexintint
lineNumberintint
orderintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
codeRegExstring
lineNumberintint
nameRegExstring
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
codeRegExstring
lineNumberintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
nameRegExstring
orderintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
codeRegExstring
lineNumberintint
nameRegExstring
orderintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
codeRegExstring
lineNumberintint
orderintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
codeRegExstring
lineNumberintint
nameRegExstring
orderintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
codeRegExstring
nameRegExstring
orderintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

None.

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
fullNameRegExstring
isExternalbooleanboolean
lineNumberintint
lineNumberEndintint
nameRegExstring
orderintint
signatureRegExstring
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
codeRegExstring
lineNumberintint
orderintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

typeRef

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
parameterVisits PARAMETER nodes
tagVisits TAG nodes
typVisits TYPE nodes

Supported Filter Steps

Filter StepParameter TypeReturn TypeDescription
codeRegExstring
lineNumberintint
orderintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
codeRegExstring
lineNumberintint
orderintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
orderintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
fullNameRegExstring
nameRegExstring
orderintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
nameRegExstring
orderintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
lineNumberintint
nameRegExstring
orderintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
codeRegExstring
lineNumberintint
orderintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
nameRegExstring
valueRegExstring
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
fullNameRegExstring
isExternalbooleanboolean
nameRegExstring
orderintint
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep

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 Filter Steps

Filter StepParameter TypeReturn TypeDescription
fullNameRegExstring
nameRegExstring
filterBooleanReturningExpressionStep
filterNotBooleanReturningExpressionStep
whereStepReturningExpressionStep
whereNotStepReturningExpressionStep