com.ibm.wala.ipa.callgraph
Class AnalysisOptions

java.lang.Object
  extended by com.ibm.wala.ipa.callgraph.AnalysisOptions

public class AnalysisOptions
extends java.lang.Object

Basic interface for options that control call graph generation.


Field Summary
static byte CHA_DISPATCH_BOUND
           
static byte NO_DISPATCH_BOUND
          Strategies for terminating a dispatch operator
static byte SIMPLE_DISPATCH_BOUND
           
static byte UNSPECIFIED
           
 
Constructor Summary
AnalysisOptions()
           
AnalysisOptions(AnalysisScope scope, IRFactory factory, java.lang.Iterable<Entrypoint> e)
           
AnalysisOptions(AnalysisScope scope, java.lang.Iterable<Entrypoint> e)
           
AnalysisOptions(IRFactory factory)
           
 
Method Summary
 AnalysisScope getAnalysisScope()
           
 CFGCache getCFGCache()
           
 ClassTargetSelector getClassTargetSelector()
           
 byte getDispatchBoundHeuristic()
           
 java.lang.Iterable<Entrypoint> getEntrypoints()
           
 IRFactory getIRFactory()
           
 int getMaxEvalBetweenTopo()
           
 MethodTargetSelector getMethodTargetSelector()
           
 int getMinEquationsForTopSort()
           
 ReflectionSpecification getReflectionSpec()
           
 SSACache getSSACache()
           
 SSAOptions getSSAOptions()
           
 boolean getSupportRefinement()
           
 double getTopologicalGrowthFactor()
           
 boolean getTraceStringConstants()
           
 boolean getUseConstantSpecificKeys()
           
 boolean getUseLexicalScopingForGlobals()
           
 boolean getUseStacksForLexicalScoping()
           
 void invalidateCache(IMethod method, Context C)
           
 void setAnalysisScope(AnalysisScope analysisScope)
           
 void setDispatchBoundHeuristic(byte b)
           
 void setMaxEvalBetweenTopo(int i)
           
 void setMinEquationsForTopSort(int i)
           
 void setReflectionSpec(ReflectionSpecification specification)
           
 void setSelector(ClassTargetSelector x)
          install a class target selector
 void setSelector(MethodTargetSelector x)
          install a method target selector
 void setSSAOptions(SSAOptions ssaOptions)
           
 void setSupportRefinement(boolean supportRefinement)
           
 void setTopologicalGrowthFactor(double d)
           
 void setTraceStringConstants(boolean v)
           
 void setUseConstantSpecificKeys(boolean useConstantSpecificKeys)
           
 void setUseLexicalScopingForGlobals(boolean v)
           
 void setUsePreTransitiveSolver(boolean b)
           
 void setUseStacksForLexicalScoping(boolean v)
           
 boolean usePreTransitiveSolver()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_DISPATCH_BOUND

public static final byte NO_DISPATCH_BOUND
Strategies for terminating a dispatch operator

See Also:
Constant Field Values

SIMPLE_DISPATCH_BOUND

public static final byte SIMPLE_DISPATCH_BOUND
See Also:
Constant Field Values

CHA_DISPATCH_BOUND

public static final byte CHA_DISPATCH_BOUND
See Also:
Constant Field Values

UNSPECIFIED

public static final byte UNSPECIFIED
See Also:
Constant Field Values
Constructor Detail

AnalysisOptions

public AnalysisOptions(IRFactory factory)

AnalysisOptions

public AnalysisOptions()

AnalysisOptions

public AnalysisOptions(AnalysisScope scope,
                       IRFactory factory,
                       java.lang.Iterable<Entrypoint> e)

AnalysisOptions

public AnalysisOptions(AnalysisScope scope,
                       java.lang.Iterable<Entrypoint> e)
Method Detail

getAnalysisScope

public AnalysisScope getAnalysisScope()

setAnalysisScope

public void setAnalysisScope(AnalysisScope analysisScope)

getEntrypoints

public java.lang.Iterable<Entrypoint> getEntrypoints()

getReflectionSpec

public ReflectionSpecification getReflectionSpec()
Returns:
An object which represents the user specification for reflection

setReflectionSpec

public void setReflectionSpec(ReflectionSpecification specification)
Parameters:
specification - An object which represents the user specification for reflection

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

getDispatchBoundHeuristic

public byte getDispatchBoundHeuristic()
Returns:
one of NO_DISPATCH_BOUND, SIMPLE_DISPATCH_BOUND, CHA_DISPATCH_BOUND, UNSPECIFIED

setDispatchBoundHeuristic

public void setDispatchBoundHeuristic(byte b)
Parameters:
b - one of NO_DISPATCH_BOUND, SIMPLE_DISPATCH_BOUND, CHA_DISPATCH_BOUND, UNSPECIFIED

getSupportRefinement

public boolean getSupportRefinement()

setSupportRefinement

public void setSupportRefinement(boolean supportRefinement)
Parameters:
supportRefinement - whether the call graph builder should contruct a pointer-flow graph as it solves

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()

setUseConstantSpecificKeys

public void setUseConstantSpecificKeys(boolean useConstantSpecificKeys)

getUseStacksForLexicalScoping

public boolean getUseStacksForLexicalScoping()

setUseStacksForLexicalScoping

public void setUseStacksForLexicalScoping(boolean v)

getUseLexicalScopingForGlobals

public boolean getUseLexicalScopingForGlobals()

setTraceStringConstants

public void setTraceStringConstants(boolean v)

getTraceStringConstants

public boolean getTraceStringConstants()

setUseLexicalScopingForGlobals

public void setUseLexicalScopingForGlobals(boolean v)

usePreTransitiveSolver

public boolean usePreTransitiveSolver()
Returns:
true iff we should solve with the sub-transitive solver

getIRFactory

public IRFactory getIRFactory()

getSSACache

public SSACache getSSACache()

getCFGCache

public CFGCache getCFGCache()

invalidateCache

public void invalidateCache(IMethod method,
                            Context C)

setUsePreTransitiveSolver

public void setUsePreTransitiveSolver(boolean b)