Class AnalysisOptions

java.lang.Object
com.ibm.wala.ipa.callgraph.AnalysisOptions
Direct Known Subclasses:
JSAnalysisOptions

public class AnalysisOptions extends Object
Basic interface for options that control call graph generation.

TODO: This class should be refactored into an abstract base class and language-specific subclasses.

  • Constructor Details

  • Method Details

    • getAnalysisScope

      public AnalysisScope getAnalysisScope()
    • setAnalysisScope

      public void setAnalysisScope(AnalysisScope analysisScope)
    • getEntrypoints

      public Iterable<? extends Entrypoint> getEntrypoints()
      TODO: this really should go away. The entrypoints don't belong here.
    • setEntrypoints

      public void setEntrypoints(Iterable<? extends Entrypoint> entrypoints)
    • getMaxNumberOfNodes

      public long getMaxNumberOfNodes()
    • setMaxNumberOfNodes

      public void setMaxNumberOfNodes(long maxNumberOfNodes)
    • getMethodTargetSelector

      public MethodTargetSelector getMethodTargetSelector()
      Returns:
      Policy that determines methods called at call sites.
    • getClassTargetSelector

      public ClassTargetSelector getClassTargetSelector()
      Returns:
      Policy that determines types allocated at new statements.
    • setSelector

      public void setSelector(MethodTargetSelector x)
      install a method target selector
      Parameters:
      x - an object which controls the policy for selecting the target at a call site
    • setSelector

      public void setSelector(ClassTargetSelector x)
      install a class target selector
      Parameters:
      x - an object which controls the policy for selecting the allocated object at a new site
    • getMinEquationsForTopSort

      public int getMinEquationsForTopSort()
      Returns:
      the mininum number of equations that the pointer analysis system must contain before the solver will try to topologically sore
    • setMinEquationsForTopSort

      public void setMinEquationsForTopSort(int i)
      Parameters:
      i - the mininum number of equations that the pointer analysis system must contain before the solver will try to topologically sore
    • getMaxEvalBetweenTopo

      public int getMaxEvalBetweenTopo()
      Returns:
      the maximum number of evaluations that the pointer analysis solver will perform before topologically resorting the system
    • getTopologicalGrowthFactor

      public double getTopologicalGrowthFactor()
      Returns:
      a fraction x s.t. the solver will resort the system when it grows by a factor of x
    • setMaxEvalBetweenTopo

      public void setMaxEvalBetweenTopo(int i)
      Parameters:
      i - the maximum number of evaluations that the pointer analysis solver will perform before topologically resorting the system
    • setTopologicalGrowthFactor

      public void setTopologicalGrowthFactor(double d)
      Parameters:
      d - a fraction x s.t. the solver will resort the system when it grows by a factor of x
    • getSSAOptions

      public SSAOptions getSSAOptions()
      Returns:
      options governing SSA construction
    • setSSAOptions

      public void setSSAOptions(SSAOptions ssaOptions)
      Parameters:
      ssaOptions - options governing SSA construction
    • getUseConstantSpecificKeys

      public boolean getUseConstantSpecificKeys()
      Use distinct instance keys for distinct string constants?
    • setUseConstantSpecificKeys

      public void setUseConstantSpecificKeys(boolean useConstantSpecificKeys)
      Use distinct instance keys for distinct string constants?
    • getUseStacksForLexicalScoping

      public boolean getUseStacksForLexicalScoping()
      Should analysis of lexical scoping consider call stacks?
    • setUseStacksForLexicalScoping

      public void setUseStacksForLexicalScoping(boolean v)
      Should analysis of lexical scoping consider call stacks?
    • getUseLexicalScopingForGlobals

      public boolean getUseLexicalScopingForGlobals()
      Should global variables be considered lexically-scoped from the root node?
    • setUseLexicalScopingForGlobals

      public void setUseLexicalScopingForGlobals(boolean v)
      Should global variables be considered lexically-scoped from the root node?
    • setTraceStringConstants

      public void setTraceStringConstants(boolean v)
      Should analysis try to understand the results of string constants flowing to a + operator? Note that this option does not apply to Java bytecode analysis, since the + operators have been compiled away for that. It is used for the Java CAst front end.
    • getTraceStringConstants

      public boolean getTraceStringConstants()
      Should analysis try to understand the results of string constants flowing to a + operator? Note that this option does not apply to Java bytecode analysis, since the + operators have been compiled away for that. It is used for the Java CAst front end.
    • getReflectionOptions

      public AnalysisOptions.ReflectionOptions getReflectionOptions()
      Should call graph construction attempt to handle reflection via detection of flows to casts, analysis of string constant parameters to reflective methods, etc.?
      See Also:
    • setReflectionOptions

      public void setReflectionOptions(AnalysisOptions.ReflectionOptions reflectionOptions)
      Should call graph construction attempt to handle reflection via detection of flows to casts, analysis of string constant parameters to reflective methods, etc.?
      See Also:
    • getHandleStaticInit

      public boolean getHandleStaticInit()
      Should call graph construction handle possible invocations of static initializer methods?
    • setHandleStaticInit

      public void setHandleStaticInit(boolean handleStaticInit)
      Should call graph construction handle possible invocations of static initializer methods?
    • getHandleZeroLengthArray

      public boolean getHandleZeroLengthArray()
      Should call graph construction handle arrays of zero-length differently?
    • setHandleZeroLengthArray

      public void setHandleZeroLengthArray(boolean handleZeroLengthArray)
      Should call graph construction handle arrays of zero-length differently?