Packages

c

io.joern.x2cpg.passes.frontend

RecoverForXCompilationUnit

abstract class RecoverForXCompilationUnit[CompilationUnitType <: AstNode] extends RecursiveTask[Unit]

Performs type recovery from the root of a compilation unit level

CompilationUnitType

the AstNode type used to represent a compilation unit of the language.

Linear Supertypes
RecursiveTask[Unit], ForkJoinTask[Unit], Serializable, Future[Unit], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RecoverForXCompilationUnit
  2. RecursiveTask
  3. ForkJoinTask
  4. Serializable
  5. Future
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new RecoverForXCompilationUnit(cpg: Cpg, cu: CompilationUnitType, builder: DiffGraphBuilder, globalTable: SymbolTable[GlobalKey], addedNodes: Set[(Long, String)])

    cpg

    the graph.

    cu

    a compilation unit, e.g. file, procedure, type, etc.

    builder

    the graph builder

    globalTable

    the global symbol table.

    addedNodes

    new node tracking set.

Abstract Value Members

  1. abstract def isConstructor(c: Call): Boolean

    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
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def assignTypesToCall(x: Call, types: Set[String]): Set[String]

    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
    protected
  6. def assignments: Traversal[Assignment]
    Attributes
    protected
  7. def associateInterproceduralTypes(i: Identifier, fieldFullName: String, fieldName: String, globalTypes: Set[String], baseTypes: Set[String]): Set[String]
    Attributes
    protected
  8. def associateInterproceduralTypes(i: Identifier, base: Identifier, fi: FieldIdentifier, fieldName: String, baseTypes: Set[String]): Set[String]

    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
    protected
  9. def associateTypes(symbol: LocalVar, fa: FieldAccess, types: Set[String]): Set[String]

    Associates the types with the identifier.

    Associates the types with the identifier. This may sometimes be an identifier that should be considered a field which this method uses isField(i) to determine.

    Attributes
    protected
  10. def associateTypes(i: Identifier, types: Set[String]): Set[String]

    Associates the types with the identifier.

    Associates the types with the identifier. This may sometimes be an identifier that should be considered a field which this method uses isField(i) to determine.

    Attributes
    protected
  11. def cancel(arg0: Boolean): Boolean
    Definition Classes
    ForkJoinTask → Future
  12. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  13. final def compareAndSetForkJoinTaskTag(arg0: Short, arg1: Short): Boolean
    Definition Classes
    ForkJoinTask
  14. def complete(arg0: Unit): Unit
    Definition Classes
    ForkJoinTask
  15. def completeExceptionally(arg0: Throwable): Unit
    Definition Classes
    ForkJoinTask
  16. def compute(): Unit
    Definition Classes
    RecoverForXCompilationUnit → RecursiveTask
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  19. final def exec(): Boolean
    Attributes
    protected[concurrent]
    Definition Classes
    RecursiveTask → ForkJoinTask
  20. final def fork(): ForkJoinTask[Unit]
    Definition Classes
    ForkJoinTask
  21. final def get(arg0: Long, arg1: TimeUnit): Unit
    Definition Classes
    ForkJoinTask → Future
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @throws(classOf[java.util.concurrent.ExecutionException]) @throws(classOf[java.util.concurrent.TimeoutException])
  22. final def get(): Unit
    Definition Classes
    ForkJoinTask → Future
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @throws(classOf[java.util.concurrent.ExecutionException])
  23. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  24. final def getException(): Throwable
    Definition Classes
    ForkJoinTask
  25. def getFieldBaseType(baseName: String, fieldName: String): Set[String]
    Attributes
    protected
  26. def getFieldBaseType(base: Identifier, fi: FieldIdentifier): Set[String]
    Attributes
    protected
  27. def getFieldName(fa: FieldAccess, prefix: String = "", suffix: String = ""): String

    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
    protected
  28. def getFieldParents(fa: FieldAccess): Set[String]

    Returns the appropriate field parent scope.

    Returns the appropriate field parent scope.

    Attributes
    protected
  29. final def getForkJoinTaskTag(): Short
    Definition Classes
    ForkJoinTask
  30. def getIndexAccessTypes(ia: Call): Set[String]

    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
    protected
  31. def getLiteralType(l: Literal): Set[String]

    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
    protected
  32. final def getRawResult(): Unit
    Definition Classes
    RecursiveTask → ForkJoinTask
  33. def getSymbolFromCall(c: Call): (LocalKey, Set[GlobalKey])

    Tries to identify the underlying symbol from the call operation as it is used on the LHS of an assignment.

    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
    protected
  34. def getTypesFromCall(c: Call): Set[String]

    Given a call operation, will attempt to retrieve types from it.

    Given a call operation, will attempt to retrieve types from it.

    Attributes
    protected
  35. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  36. def importNodes(cu: AstNode): Traversal[AstNode]

    returns

    the import nodes of this compilation unit.

    Attributes
    protected
  37. def indexAccessToCollectionVar(c: Call): Option[CollectionVar]

    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
    protected
  38. final def invoke(): Unit
    Definition Classes
    ForkJoinTask
  39. final def isCancelled(): Boolean
    Definition Classes
    ForkJoinTask → Future
  40. final def isCompletedAbnormally(): Boolean
    Definition Classes
    ForkJoinTask
  41. final def isCompletedNormally(): Boolean
    Definition Classes
    ForkJoinTask
  42. final def isDone(): Boolean
    Definition Classes
    ForkJoinTask → Future
  43. def isField(i: Identifier): Boolean

    A heuristic method to determine if an identifier may be a field or not.

    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.

    Attributes
    protected
  44. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  45. final def join(): Unit
    Definition Classes
    ForkJoinTask
  46. val logger: Logger
    Attributes
    protected
  47. def members: Traversal[Member]
    Attributes
    protected
  48. def methodReturnValues(methodFullNames: Seq[String]): Set[String]

    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
    protected
  49. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  50. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  51. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  52. def postVisitImports(): Unit

    The initial import setting is over-approximated, so this step checks the CPG for any matches and prunes against these findings.

    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
    protected
  53. def prepopulateSymbolTable(): Unit

    Provides an entrypoint to add known symbols and their possible types.

    Provides an entrypoint to add known symbols and their possible types.

    Attributes
    protected
  54. final def quietlyComplete(): Unit
    Definition Classes
    ForkJoinTask
  55. final def quietlyInvoke(): Unit
    Definition Classes
    ForkJoinTask
  56. final def quietlyJoin(): Unit
    Definition Classes
    ForkJoinTask
  57. def reinitialize(): Unit
    Definition Classes
    ForkJoinTask
  58. def setCallMethodFullNameFromBase(c: Call): Set[String]

    Will build a call full path using the call base node.

    Will build a call full path using the call base node. This method assumes the base node is in the symbol table.

    Attributes
    protected
  59. final def setForkJoinTaskTag(arg0: Short): Short
    Definition Classes
    ForkJoinTask
  60. final def setRawResult(arg0: Unit): Unit
    Attributes
    protected[concurrent]
    Definition Classes
    RecursiveTask → ForkJoinTask
  61. def setTypeInformation(): Unit

    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
    protected
  62. val symbolTable: SymbolTable[LocalKey]

    Stores type information for local structures that live within this compilation unit, e.g.

    Stores type information for local structures that live within this compilation unit, e.g. local variables.

    Attributes
    protected
  63. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  64. def toString(): String
    Definition Classes
    AnyRef → Any
  65. def tryUnfork(): Boolean
    Definition Classes
    ForkJoinTask
  66. def visitAssignments(a: Assignment): Set[String]

    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.

    a

    assignment call pointer.

    Attributes
    protected
  67. def visitCall(call: Call): Unit

    For each call that contains the returnValue directive, attempt to replace the return value by the dynamic

    For each call that contains the returnValue directive, attempt to replace the return value by the dynamic

    Attributes
    protected
  68. def visitCallAssignedToBlock(c: Call, b: Block): Set[String]

    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
    protected
  69. def visitCallAssignedToCall(x: Call, y: Call): Set[String]

    Visits a call assigned to the return value of a call.

    Visits a call assigned to the return value of a call. This is often when there are operators involved.

    Attributes
    protected
  70. def visitCallAssignedToIdentifier(c: Call, i: Identifier): Set[String]

    Visits a call assigned to an identifier.

    Visits a call assigned to an identifier. This is often when there are operators involved.

    Attributes
    protected
  71. def visitCallAssignedToLiteral(c: Call, l: Literal): Set[String]
    Attributes
    protected
  72. def visitCallAssignedToMethodRef(c: Call, m: MethodRef): Set[String]

    Handles a call operation assigned to a method/function pointer.

    Handles a call operation assigned to a method/function pointer.

    Attributes
    protected
  73. def visitIdentifierAssignedToBlock(i: Identifier, b: Block): Set[String]

    Visits an identifier being assigned to the result of some operation.

    Visits an identifier being assigned to the result of some operation.

    Attributes
    protected
  74. def visitIdentifierAssignedToCall(i: Identifier, c: Call): Set[String]

    Visits an identifier being assigned to a call.

    Visits an identifier being assigned to a call. This call could be an operation, function invocation, or constructor invocation.

    Attributes
    protected
  75. def visitIdentifierAssignedToCallRetVal(i: Identifier, c: Call): Set[String]

    Visits an identifier being assigned to a call's return value.

    Visits an identifier being assigned to a call's return value.

    Attributes
    protected
  76. def visitIdentifierAssignedToConstructor(i: Identifier, c: Call): Set[String]

    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
    protected
  77. def visitIdentifierAssignedToFieldLoad(i: Identifier, fa: FieldAccess): Set[String]

    Will handle an identifier being assigned to a field value.

    Will handle an identifier being assigned to a field value.

    Attributes
    protected
  78. def visitIdentifierAssignedToIdentifier(x: Identifier, y: Identifier): Set[String]

    Visits an identifier being assigned to the value held by another identifier.

    Visits an identifier being assigned to the value held by another identifier. This is a weak copy.

    Attributes
    protected
  79. def visitIdentifierAssignedToIndexAcess(i: Identifier, c: Call): Set[String]

    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
    protected
  80. def visitIdentifierAssignedToLiteral(i: Identifier, l: Literal): Set[String]

    Will handle literal value assignments.

    Will handle literal value assignments. Override if special handling is required.

    Attributes
    protected
  81. def visitIdentifierAssignedToMethodRef(i: Identifier, m: MethodRef): Set[String]

    Will handle an identifier holding a function pointer.

    Will handle an identifier holding a function pointer.

    Attributes
    protected
  82. def visitIdentifierAssignedToOperator(i: Identifier, c: Call, operation: String): Set[String]

    Visits an identifier being assigned to an operator call.

    Visits an identifier being assigned to an operator call.

    Attributes
    protected
  83. def visitIdentifierAssignedToTypeRef(i: Identifier, t: TypeRef): Set[String]

    Will handle an identifier holding a type pointer.

    Will handle an identifier holding a type pointer.

    Attributes
    protected
  84. def visitImport(i: Import): Unit

    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
    protected
  85. def visitImport(i: Call): Unit

    Refers to the declared import information.

    Refers to the declared import information. This is for legacy import notation.

    i

    the call that imports entities into this scope.

    Attributes
    protected
  86. def visitImports(procedureDeclarations: Traversal[AstNode]): Unit

    Using import information and internally defined procedures, will generate a mapping between how functions and types are aliased and called and themselves.

    Using import information and internally defined procedures, will generate a mapping between how functions and types are aliased and called and themselves.

    procedureDeclarations

    imports to types or functions and internally defined methods themselves.

    Attributes
    protected
  87. def visitParameter(param: MethodParameterIn): Unit
    Attributes
    protected
  88. def visitStatementsInBlock(b: Block): Set[String]

    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
    protected
  89. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  90. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  91. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from RecursiveTask[Unit]

Inherited from ForkJoinTask[Unit]

Inherited from Serializable

Inherited from Future[Unit]

Inherited from AnyRef

Inherited from Any

Ungrouped