For the complete documentation index, see llms.txt. This page is also available as Markdown.

Node-Type Steps

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

Overview

Step
Description

Visits all nodes in the Code Property Graph

Visits BLOCK nodes

Visits CALL nodes; represent call-sites

Visits COMMENT nodes; COMMENT nodes exist only for source-based Code Propert Graphs

Visits 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

Visits IDENTIFIER nodes; e.g. occurrences of local variables or class members in method bodies

Visits LITERAL nodes; e.g. numbers or strings

Visits LOCAL nodes; represent local variable

Visits MEMBER nodes; MEMBER nodes refer to members of complex types like classes or structs

Visits the META_DATA node

Visits METHOD nodes

Visits METHOD_REF nodes

Visits TYPE_REF nodes

Visits METHOD_RETURN nodes; all formal return parameters

Visits MODIFIER nodes; e.g. public, private, static

Visits NAMESPACE nodes

Visits NAMESPACE_BLOCK nodes

Visits PARAMETER nodes

Visits RETURN nodes

Visits TYPE_DECL nodes

Visits TAG nodes

Visits 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 Directive
Return Type
Description

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

Supported Node-Type Steps

Node-Type Step
Description

file

Visits FILE nodes attached to all nodes in the graph

tag

Visits TAG nodes attached to all nodes in the graph

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

block

Supported Property Directives

Property Directive
Return Type
Description

argumentIndex

int

Identifies different AST children of CALL nodes or BLOCK nodes. Ordered 1 to N, with 0 reserved for implicit arguments like this or self

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

lineNumber

int

First line at which the code representing this node is found

order

int

General ordering property for AST nodes

Supported Node-Type Steps

Node-Type Step
Description

call

Visits CALL nodes; represent call-sites

file

Visits 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

local

Visits LOCAL nodes; represent local variable

tag

Visits TAG nodes

typ

Visits TYPE nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

argumentIndex

int

int

lineNumber

int

int

order

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

call

Supported Property Directives

Property Directive
Return Type
Description

code

string

The source code construct this node represents

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

lineNumber

int

First line at which the code representing this node is found

name

string

General string identifier for various nodes

Supported Node-Type Steps

Node-Type Step
Description

call

Visits CALL nodes; represent call-sites

file

Visits 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

method

Visits METHOD nodes

parameter

Visits PARAMETER nodes

tag

Visits TAG nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

code

RegEx

string

lineNumber

int

int

name

RegEx

string

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

comment

Supported Property Directives

Property Directive
Return Type
Description

id

int

Unique node identifier

code

string

The source code construct this node represents

label

string

Returns the value of the LABEL property which represents the node type

lineNumber

int

First line at which the code representing this node is found

Supported Node-Type Steps

Node-Type Step
Description

file

Visits 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

tag

Visits TAG nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

code

RegEx

string

lineNumber

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

file

Supported Property Directives

Property Directive
Return Type
Description

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

name

string

General string identifier for various nodes

order

int

General ordering property for AST nodes

Supported Node-Type Steps

Node-Type Step
Description

file

Visits 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

namespace

Visits NAMESPACE nodes

namespaceBlock

Visits NAMESPACE_BLOCK nodes

tag

Visits TAG nodes

typeDecl

Visits TYPE_DECL nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

name

RegEx

string

order

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

identifier

Supported Property Directives

Property Directive
Return Type
Description

code

string

The source code construct this node represents

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

lineNumber

int

First line at which the code representing this node is found

name

string

General string identifier for various nodes

order

int

General ordering property for AST nodes

Supported Node-Type Steps

Node-Type Step
Description

file

Visits 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

parameter

Visits PARAMETER nodes

tag

Visits TAG nodes

typ

Visits TYPE nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

code

RegEx

string

lineNumber

int

int

name

RegEx

string

order

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

literal

Supported Property Directives

Property Directive
Return Type
Description

code

string

The source code construct this node represents

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

lineNumber

int

First line at which the code representing this node is found

order

int

General ordering property for AST nodes

Supported Node-Type Steps

Node-Type Step
Description

call

Visits CALL nodes; represent call-sites

file

Visits 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

method

Visits METHOD nodes

parameter

Visits PARAMETER nodes

tag

Visits TAG nodes

typ

Visits TYPE nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

code

RegEx

string

lineNumber

int

int

order

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

local

Supported Property Directives

Property Directive
Return Type
Description

code

string

The source code construct this node represents

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

lineNumber

int

First line at which the code representing this node is found

name

string

General string identifier for various nodes

order

int

General ordering property for AST nodes

Supported Node-Type Steps

Node-Type Step
Description

file

Visits 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

tag

Visits TAG nodes

typ

Visits TYPE nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

code

RegEx

string

lineNumber

int

int

name

RegEx

string

order

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

member

Supported Property Directives

Property Directive
Return Type
Description

code

string

The source code construct this node represents

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

name

string

General string identifier for various nodes

order

int

General ordering property for AST nodes

Supported Node-Type Steps

Node-Type Step
Description

file

Visits 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

modifier

Visits MODIFIER nodes; e.g. public, private, static

tag

Visits TAG nodes

typ

Visits TYPE nodes

typeDecl

Visits TYPE_DECL nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

code

RegEx

string

name

RegEx

string

order

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

metaData

Supported Property Directives

Property Directive
Return Type
Description

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

language

string

The programming language this graph originates from

version

string

A version, given as a string

Supported Node-Type Steps

Node-Type Step
Description

tag

Visits TAG nodes

file

Visits 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 Directive
Return Type
Description

fullName

string

General string identifier which includes various details of the node it is defined on

id

int

Unique node identifier

isExternal

boolean

Indicates that the node represents a program construct that is not defined directly in its source code

label

string

Returns the value of the LABEL property which represents the node type

lineNumber

int

First line at which the code representing this node is found

lineNumberEnd

int

Last line at which the code representing this node is found

name

string

General string identifier for various nodes

order

int

General ordering property for AST nodes

signature

string

The method signature; usually includes the method name, and the number, types and order of its parameters

Supported Node-Type Steps

Node-Type Step
Description

local

Visits LOCAL nodes; represent local variable

method

Visits METHOD nodes

methodReturn

Visits METHOD_RETURN nodes; all formal return parameters

modifier

Visits MODIFIER nodes; e.g. public, private, static

namespace

Visits NAMESPACE nodes

parameter

Visits PARAMETER nodes

tag

Visit TAG nodes attached to the METHOD nodes; that is, tags found on methods

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

fullName

RegEx

string

isExternal

boolean

boolean

lineNumber

int

int

lineNumberEnd

int

int

name

RegEx

string

order

int

int

signature

RegEx

string

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

methodRef

Supported Property Directives

Property Directive
Return Type
Description

code

string

The source code construct this node represents

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

lineNumber

int

First line at which the code representing this node is found

order

int

General ordering property for AST nodes

Supported Node-Type Steps

Node-Type Step
Description

file

Visits 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

method

Visits METHOD nodes

parameter

Visits PARAMETER nodes

tag

Visits TAG nodes

typ

Visits TYPE nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

code

RegEx

string

lineNumber

int

int

order

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

typeRef

Supported Property Directives

Property Directive
Return Type
Description

code

string

The source code construct this node represents

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

lineNumber

int

First line at which the code representing this node is found

order

int

General ordering property for AST nodes

Supported Node-Type Steps

Node-Type Step
Description

file

Visits 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

method

Visits METHOD nodes

parameter

Visits PARAMETER nodes

tag

Visits TAG nodes

typ

Visits TYPE nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

code

RegEx

string

lineNumber

int

int

order

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

methodReturn

Supported Property Directives

Property Directive
Return Type
Description

code

string

The source code construct this node represents

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

lineNumber

int

First line at which the code representing this node is found

order

int

General ordering property for AST nodes

Supported Node-Type Steps

Node-Type Step
Description

file

Visits 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

method

Visits METHOD nodes

tag

Visits TAG nodes

typ

Visits TYPE nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

code

RegEx

string

lineNumber

int

int

order

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

modifier

Supported Property Directives

Property Directive
Return Type
Description

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

order

int

General ordering property for AST nodes

Supported Node-Type Steps

Node-Type Step
Description

file

Visits 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

tag

Visits TAG nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

order

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

namespaceBlock

Supported Property Directives

Property Directive
Return Type
Description

id

int

Unique node identifier

fullName

string

General string identifier which includes various details of the node it is defined on

label

string

Returns the value of the LABEL property which represents the node type

name

string

General string identifier for various nodes

order

int

General ordering property for AST nodes

Supported Node-Type Steps

Node-Type Step
Description

file

Visits 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

tag

Visits TAG nodes

typeDecl

Visits TYPE_DECL nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

fullName

RegEx

string

name

RegEx

string

order

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

namespace

Supported Property Directives

Property Directive
Return Type
Description

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

name

string

General string identifier for various nodes

order

int

General ordering property for AST nodes

Supported Node-Type Steps

Node-Type Step
Description

file

Visits 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

tag

Visits TAG nodes

typeDecl

Visits TYPE_DECL nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

name

RegEx

string

order

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

parameter

Supported Property Directives

Property Directive
Return Type
Description

code

string

The source code construct this node represents

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

lineNumber

int

First line at which the code representing this node is found

name

string

General string identifier for various nodes

order

int

General ordering property for AST nodes

Supported Node-Type Steps

Node-Type Step
Description

file

Visits 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

method

Visits METHOD nodes

tag

Visits TAG nodes

typ

Visits TYPE nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

lineNumber

int

int

name

RegEx

string

order

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

returns

Supported Property Directives

Property Directive
Return Type
Description

code

string

The source code construct this node represents

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

lineNumber

int

First line at which the code representing this node is found

order

int

General ordering property for AST nodes

Supported Node-Type Steps

Node-Type Step
Description

call

Visits CALL nodes; represent call-sites

file

Visits 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

method

Visits METHOD nodes

parameter

Visits PARAMETER nodes

tag

Visits TAG nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

code

RegEx

string

lineNumber

int

int

order

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

tag

Supported Property Directives

Property Directive
Return Type
Description

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

name

string

General string identifier for various nodes

value

string

Generic string value container

Supported Node-Type Steps

Node-Type Step
Description

call

Visits CALL nodes attached to the TAG nodes

file

Visits FILE nodes attached to the TAG nodes

literal

Visits LITERAL nodes attached to the TAG nodes

local

Visits LOCAL nodes attached to the TAG nodes

method

Visits METHOD nodes attached to the TAG nodes

methodReturn

Visits METHOD_RETURN nodes attached to the TAG nodes

parameter

Visits PARAMETER nodes attached to the TAG nodes

tag

Visits TAG nodes attached to the TAG nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

name

RegEx

string

value

RegEx

string

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

typeDecl

Supported Property Directives

Property Directive
Return Type
Description

fullName

string

General string identifier which includes various details of the node it is defined on

id

int

Unique node identifier

isExternal

boolean

Indicates that the node represents a program construct that is not defined directly in its source code

label

string

Returns the value of the LABEL property which represents the node type

name

string

General string identifier for various nodes

order

int

General ordering property for AST nodes

Supported Node-Type Steps

Node-Type Step
Description

file

Visits 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

member

Visits MEMBER nodes; MEMBER nodes refer to members of complex types like classes or structs

method

Visits METHOD nodes

modifier

Visits MODIFIER nodes; e.g. public, private, static

namespace

Visits NAMESPACE nodes

tag

Visits TAG nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

fullName

RegEx

string

isExternal

boolean

boolean

name

RegEx

string

order

int

int

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

typ

Supported Property Directives

Property Directive
Return Type
Description

fullName

string

General string identifier which includes various details of the node it is defined on

id

int

Unique node identifier

label

string

Returns the value of the LABEL property which represents the node type

name

string

General string identifier for various nodes

Supported Node-Type Steps

Node-Type Step
Description

file

Visits 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

method

Visits METHOD nodes

member

Visits MEMBER nodes; MEMBER nodes refer to members of complex types like classes or structs

parameter

Visits PARAMETER nodes

tag

Visits TAG nodes

Supported Filter Steps

Filter Step
Parameter Type
Return Type
Description

fullName

RegEx

string

name

RegEx

string

filter

BooleanReturningExpression

Step

filterNot

BooleanReturningExpression

Step

where

StepReturningExpression

Step

whereNot

StepReturningExpression

Step

Last updated

Was this helpful?