accrue.analysis.callgraph

## Class PreciseCallGraphAnalysisUtil

- java.lang.Object
- - accrue.analysis.interprocanalysis.AnalysisUtil<PCGAbsVal>
  - - accrue.analysis.callgraph.PreciseCallGraphAnalysisUtil

-     public class PreciseCallGraphAnalysisUtil
      extends AnalysisUtil<PCGAbsVal>

- - ### Field Summary

    - ### Fields inherited from class accrue.analysis.interprocanalysis.AnalysisUtil

      `extInfo, instanceInitializersChecked, workQueue`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PreciseCallGraphAnalysisUtil(WorkQueue<PCGAbsVal> workQueue, AnalysisUnit currentAnalysisUnit, AccrueExtensionInfo extInfo)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ExitMap<PCGAbsVal>` | `analyze(polyglot.ast.CodeNode n, PCGAbsVal before)` Analyze the given code with the given current analysis results
    `ExitMap<PCGAbsVal>` | `analyzeInitializers(polyglot.ast.ConstructorCall cc, PCGAbsVal input)`
    `ExitMap<PCGAbsVal>` | `analyzeInitializers(PCGAbsVal input)` Deprecated.
    `PCGAbsVal` | `call(polyglot.types.ConstructorInstance ci, polyglot.ast.Expr n)`
    `PCGAbsVal` | `call(polyglot.types.MethodInstance mi, polyglot.ast.Call n)`
    `boolean` | `canTerminateNormally(polyglot.ast.Node n)`
    `PCGAbsVal` | `constructorCall(polyglot.types.ConstructorInstance ci, polyglot.ast.ConstructorCall n)`
    `protected void` | `recordCallTargets(polyglot.ast.Term n, java.util.Set<EdgeIdentifier> targets)` There is a many-to-many relationship between call sites and CodeDecls.

    - ### Methods inherited from class accrue.analysis.interprocanalysis.AnalysisUtil

      `abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocations, abstractLocationsForArray, abstractLocationsForArray, abstractLocationsForArray, abstractLocationsImplicitTarget, analysisName, analyzeStaticInitializers, createExitMap, currentAnalysisUnit, currentClass, currentContext, extensionInfo, instanceInitializers, leq, maybeRecursiveCall, pointsTo, pointsTo, pointsTo, pointsTo, pointsTo, pointsTo, pointsTo, pointsTo, pointsTo, pointsToGraph, pointsToThis, process, recordMissingCode, typeSystem, upperBound, workQueue`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PreciseCallGraphAnalysisUtil

          public PreciseCallGraphAnalysisUtil(WorkQueue<PCGAbsVal> workQueue,
                                      AnalysisUnit currentAnalysisUnit,
                                      AccrueExtensionInfo extInfo)

  - ### Method Detail

    - #### analyze

          public ExitMap<PCGAbsVal> analyze(polyglot.ast.CodeNode n,
                                   PCGAbsVal before)
                                     throws polyglot.types.SemanticException

      Description copied from class: `AnalysisUtil`
      Analyze the given code with the given current analysis results
      Specified by:
        `analyze` in class `AnalysisUtil<PCGAbsVal>`
      Parameters:
        `n` - Code to analyze
        `before` - analysis result before analyzing the given code
      Returns:
        Map from exit condition to analysis result
      Throws:
        `polyglot.types.SemanticException` - thrown if the analysis fails

    - #### analyzeInitializers

          @Deprecated
          public ExitMap<PCGAbsVal> analyzeInitializers(PCGAbsVal input)
                                                 throws polyglot.types.SemanticException

      Deprecated.
      Description copied from class: `AnalysisUtil`
      Analyze the initializers for the current analysis unit given the current analysis results
      Overrides:
        `analyzeInitializers` in class `AnalysisUtil<PCGAbsVal>`
      Parameters:
        `input` - current analysis results
      Returns:
        Map from exit condition to analysis result
      Throws:
        `polyglot.types.SemanticException` - thrown if the analysis fails

    - #### analyzeInitializers

          public ExitMap<PCGAbsVal> analyzeInitializers(polyglot.ast.ConstructorCall cc,
                                               PCGAbsVal input)
                                                 throws polyglot.types.SemanticException

      Throws:
        `polyglot.types.SemanticException`

    - #### call

          public PCGAbsVal call(polyglot.types.MethodInstance mi,
                       polyglot.ast.Call n)

    - #### call

          public PCGAbsVal call(polyglot.types.ConstructorInstance ci,
                       polyglot.ast.Expr n)

    - #### constructorCall

          public PCGAbsVal constructorCall(polyglot.types.ConstructorInstance ci,
                                  polyglot.ast.ConstructorCall n)

    - #### canTerminateNormally

          public boolean canTerminateNormally(polyglot.ast.Node n)

    - #### recordCallTargets

          protected void recordCallTargets(polyglot.ast.Term n,
                               java.util.Set<EdgeIdentifier> targets)

      There is a many-to-many relationship between call sites and CodeDecls. A call site in a certain AnalysisContext has many potential target CodeDecls, each with a distinct calleeContext. callSite@currentContext <--> codeDecl@calleeContext