RecoverForXCompilationUnit
Performs type recovery from the root of a compilation unit level
Attributes
- CompilationUnitType
the AstNode type used to represent a compilation unit of the language.
- builder
the graph builder
- cpg
the graph.
- cu
a compilation unit, e.g. file, procedure, type, etc.
- Graph
- Supertypes
- class RecursiveTask[Boolean]class ForkJoinTask[Boolean]trait Serializabletrait Future[Boolean]class Objecttrait Matchableclass Any
Members list
Type members
Classlikes
Convenience class for transporting field names.
Convenience class for transporting field names.
Attributes
- compUnitFullName
qualified path to base type holding the member.
- identifier
the member name.
- Graph
- Supertypes
- trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Value members
Abstract methods
A heuristic method to determine if a call is a constructor or not.
A heuristic method to determine if a call is a constructor or not.
Attributes
Concrete methods
Given a LHS call, will retrieve its symbol to the given types.
Given a LHS call, will retrieve its symbol to the given types.
Attributes
Similar to associateTypes but used in the case where there is some kind of field load.
Similar to associateTypes but used in the case where there is some kind of field load.
Attributes
Associates the types with the identifier. This may sometimes be an identifier that should be considered a field which this method uses isField to determine.
Associates the types with the identifier. This may sometimes be an identifier that should be considered a field which this method uses isField to determine.
Attributes
Associates the types with the identifier. This may sometimes be an identifier that should be considered a field which this method uses isField to determine.
Associates the types with the identifier. This may sometimes be an identifier that should be considered a field which this method uses isField to determine.
Attributes
Attributes
- Definition Classes
- RecursiveTask
Extracts a string representation of the name of the field within this field access.
Extracts a string representation of the name of the field within this field access.
Attributes
Returns the appropriate field parent scope.
Returns the appropriate field parent scope.
Attributes
Will attempt to retrieve index access types otherwise will return dummy value.
Will attempt to retrieve index access types otherwise will return dummy value.
Attributes
Not all frontends populate typeFullName
for literals so we allow this to be overridden.
Not all frontends populate typeFullName
for literals so we allow this to be overridden.
Attributes
Given an identifier that has been determined to be a field, an attempt is made to get the corresponding member. This implementation follows more the way dynamic languages define method/type relations.
Given an identifier that has been determined to be a field, an attempt is made to get the corresponding member. This implementation follows more the way dynamic languages define method/type relations.
Attributes
- i
the identifier.
- Returns:
the corresponding member, if found
Tries to identify the underlying symbol from the call operation as it is used on the LHS of an assignment. The second element is a list of any associated global keys if applicable.
Tries to identify the underlying symbol from the call operation as it is used on the LHS of an assignment. The second element is a list of any associated global keys if applicable.
Attributes
Given a call operation, will attempt to retrieve types from it.
Given a call operation, will attempt to retrieve types from it.
Attributes
Generates an identifier for collection/index-access operations in the symbol table.
Generates an identifier for collection/index-access operations in the symbol table.
Attributes
A heuristic method to determine if an identifier may be a field or not. The result means that it would be stored in the global symbol table. By default this checks if the identifier name matches a member name.
A heuristic method to determine if an identifier may be a field or not. The result means that it would be stored in the global symbol table. By default this checks if the identifier name matches a member name.
This has found to be an expensive operation accessed often so we have memoized this step.
Attributes
Will attempt to find the return values of a method if in the CPG, otherwise will give a dummy value.
Will attempt to find the return values of a method if in the CPG, otherwise will give a dummy value.
Attributes
Given a type full name and member name, will persist the given types to the member.
Given a type full name and member name, will persist the given types to the member.
Attributes
- memberName
the member name.
- typeFullName
the type full name.
- types
the types to associate.
Allows an implementation to perform an operation once type persistence is complete.
Allows an implementation to perform an operation once type persistence is complete.
Attributes
The initial import setting is over-approximated, so this step checks the CPG for any matches and prunes against these findings. If there are no findings, it will leave the table as is. The latter is significant for external types or methods.
The initial import setting is over-approximated, so this step checks the CPG for any matches and prunes against these findings. If there are no findings, it will leave the table as is. The latter is significant for external types or methods.
Attributes
Provides an entrypoint to add known symbols and their possible types.
Provides an entrypoint to add known symbols and their possible types.
Attributes
Will build a call full path using the call base node. This method assumes the base node is in the symbol table.
Will build a call full path using the call base node. This method assumes the base node is in the symbol table.
Attributes
Using an entry from the symbol table, will queue the CPG modification to persist the recovered type information.
Using an entry from the symbol table, will queue the CPG modification to persist the recovered type information.
Attributes
If there is only 1 type hint then this is set to the typeFullName
property and dynamicTypeHintFullName
is
cleared. If not then dynamicTypeHintFullName
is set to the types.
If there is only 1 type hint then this is set to the typeFullName
property and dynamicTypeHintFullName
is
cleared. If not then dynamicTypeHintFullName
is set to the types.
Attributes
Allows one to modify the types assigned to nodes otherwise.
Allows one to modify the types assigned to nodes otherwise.
Attributes
Allows one to modify the types assigned to identifiers.
Allows one to modify the types assigned to identifiers.
Attributes
Allows one to modify the types assigned to locals.
Allows one to modify the types assigned to locals.
Attributes
Type decls where member access are required need to point to the correct type decl that holds said members. This allows implementations to use the type names to find the correct type holding members.
Type decls where member access are required need to point to the correct type decl that holds said members. This allows implementations to use the type names to find the correct type holding members.
Attributes
- typeFullName
the type full name.
- Returns:
the type full name that has member children.
Using assignment and import information (in the global symbol table), will propagate these types in the symbol table.
Using assignment and import information (in the global symbol table), will propagate these types in the symbol table.
Attributes
- a
assignment call pointer.
Visits a call operation being assigned to the result of some operation.
Visits a call operation being assigned to the result of some operation.
Attributes
Visits a call assigned to the return value of a call. This is often when there are operators involved.
Visits a call assigned to the return value of a call. This is often when there are operators involved.
Attributes
Visits a call assigned to an identifier. This is often when there are operators involved.
Visits a call assigned to an identifier. This is often when there are operators involved.
Attributes
Handles a call operation assigned to a method/function pointer.
Handles a call operation assigned to a method/function pointer.
Attributes
Visits an identifier being assigned to the result of some operation.
Visits an identifier being assigned to the result of some operation.
Attributes
Visits an identifier being assigned to a call. This call could be an operation, function invocation, or constructor invocation.
Visits an identifier being assigned to a call. This call could be an operation, function invocation, or constructor invocation.
Attributes
Visits an identifier being assigned to a call's return value.
Visits an identifier being assigned to a call's return value.
Attributes
Visits an identifier being assigned to a constructor and attempts to speculate the constructor path.
Visits an identifier being assigned to a constructor and attempts to speculate the constructor path.
Attributes
Will handle an identifier being assigned to a field value.
Will handle an identifier being assigned to a field value.
Attributes
Visits an identifier being assigned to the value held by another identifier. This is a weak copy.
Visits an identifier being assigned to the value held by another identifier. This is a weak copy.
Attributes
Visits an identifier being assigned to the result of an index access operation.
Visits an identifier being assigned to the result of an index access operation.
Attributes
Will handle literal value assignments. Override if special handling is required.
Will handle literal value assignments. Override if special handling is required.
Attributes
Will handle an identifier holding a function pointer.
Will handle an identifier holding a function pointer.
Attributes
Visits an identifier being assigned to an operator call.
Visits an identifier being assigned to an operator call.
Attributes
Will handle an identifier holding a type pointer.
Will handle an identifier holding a type pointer.
Attributes
Visits an import and stores references in the symbol table as both an identifier and call.
Visits an import and stores references in the symbol table as both an identifier and call.
Attributes
Process each statement but only assign the type of the last statement to the identifier
Process each statement but only assign the type of the last statement to the identifier
Attributes
Inherited methods
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- RecursiveTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Attributes
- Inherited from:
- ForkJoinTask
Concrete fields
New node tracking set.
New node tracking set.
Attributes
The root of the target codebase.
The root of the target codebase.
Attributes
For tracking members and the type operations that need to be performed. Since these are mostly out of scope locally it helps to track these separately.
For tracking members and the type operations that need to be performed. Since these are mostly out of scope locally it helps to track these separately.
// TODO: Potentially a new use for a global table or modification to the symbol table?
Attributes
The delimiter used to separate methods/functions in qualified names.
The delimiter used to separate methods/functions in qualified names.
Attributes
Stores type information for local structures that live within this compilation unit, e.g. local variables.
Stores type information for local structures that live within this compilation unit, e.g. local variables.