NameAnalysis

Associates each use of a Name with its declaration, and every Name declaration with the set of its uses.

For example, Temporary variables are associated with LetNodes, ObjectVariables with DeclarationNodes, and JumpLabels with InfiniteLoopNodes.

Types

Link copied to clipboard

Functions

Link copied to clipboard

Returns the set of arguments where node is used.

Link copied to clipboard

Returns the set of calls to the given function declaration.

Link copied to clipboard
fun check()

Asserts that every referenced Name has a declaration, and that no Name is declared multiple times in the same scope.

Link copied to clipboard

Returns the set of BreakNodes that reference node.

Link copied to clipboard
Link copied to clipboard

Returns the loop that node is breaking out of.

Link copied to clipboard

Returns the declaration of the Host in node.

Returns the declaration of the function being called in node.

Returns the object referenced by the node function argument.

Returns the declaration of the out parameter in node.

Returns the statement that declares the ObjectVariable in node.

Returns the statement that defines the Temporary in node.

Link copied to clipboard

Returns the block that encloses this statement.

Link copied to clipboard

Returns the function declaration enclosing node.

Link copied to clipboard

Returns the function declaration enclosing node.

Link copied to clipboard

Return the statement enclosing the read node.

Link copied to clipboard

Returns the function call that contains argument.

Link copied to clipboard

Returns the function declaration that contains parameter.

Link copied to clipboard

Returns the list of InfiniteLoopNodes node is contained in.

Link copied to clipboard

Returns the object type declaration for node.

Link copied to clipboard

Returns the parameter for which node is the argument.

Link copied to clipboard

Returns the set of arguments for ParameterNode.

Link copied to clipboard

Returns the set of parameters for which node is used as an argument.

Link copied to clipboard

Returns the set of QueryNodes that reference the ObjectVariable declared by node.

Link copied to clipboard
fun reachableFunctions(node: Node): PersistentSet<FunctionName>

Returns the set of functions transitively reachable from a statement node.

Link copied to clipboard

Returns the set of StatementNodes that read the Temporary defined by node.

Link copied to clipboard
fun reads(node: Node): Set<ReadNode>

Returns all ReadNodes in this node.

Link copied to clipboard

Returns the set of UpdateNodes that reference the ObjectVariable declared by node.

Link copied to clipboard

Returns the variables used of a node.