Package com.ibm.wala.ipa.callgraph
Class AnalysisOptions
- java.lang.Object
-
- com.ibm.wala.ipa.callgraph.AnalysisOptions
-
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAnalysisOptions.ReflectionOptionsoptions for handling reflection during call graph construction
-
Constructor Summary
Constructors Constructor Description AnalysisOptions()AnalysisOptions(AnalysisScope scope, Iterable<? extends Entrypoint> e)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnalysisScopegetAnalysisScope()ClassTargetSelectorgetClassTargetSelector()Iterable<? extends Entrypoint>getEntrypoints()TODO: this really should go away.booleangetHandleStaticInit()Should call graph construction handle possible invocations of static initializer methods?intgetMaxEvalBetweenTopo()longgetMaxNumberOfNodes()MethodTargetSelectorgetMethodTargetSelector()intgetMinEquationsForTopSort()AnalysisOptions.ReflectionOptionsgetReflectionOptions()Should call graph construction attempt to handle reflection via detection of flows to casts, analysis of string constant parameters to reflective methods, etc.?SSAOptionsgetSSAOptions()doublegetTopologicalGrowthFactor()booleangetTraceStringConstants()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.booleangetUseConstantSpecificKeys()Use distinct instance keys for distinct string constants?booleangetUseLexicalScopingForGlobals()Should global variables be considered lexically-scoped from the root node?booleangetUseStacksForLexicalScoping()Should analysis of lexical scoping consider call stacks?voidsetAnalysisScope(AnalysisScope analysisScope)voidsetEntrypoints(Iterable<? extends Entrypoint> entrypoints)voidsetHandleStaticInit(boolean handleStaticInit)Should call graph construction handle possible invocations of static initializer methods?voidsetMaxEvalBetweenTopo(int i)voidsetMaxNumberOfNodes(long maxNumberOfNodes)voidsetMinEquationsForTopSort(int i)voidsetReflectionOptions(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.?voidsetSelector(ClassTargetSelector x)install a class target selectorvoidsetSelector(MethodTargetSelector x)install a method target selectorvoidsetSSAOptions(SSAOptions ssaOptions)voidsetTopologicalGrowthFactor(double d)voidsetTraceStringConstants(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.voidsetUseConstantSpecificKeys(boolean useConstantSpecificKeys)Use distinct instance keys for distinct string constants?voidsetUseLexicalScopingForGlobals(boolean v)Should global variables be considered lexically-scoped from the root node?voidsetUseStacksForLexicalScoping(boolean v)Should analysis of lexical scoping consider call stacks?
-
-
-
Constructor Detail
-
AnalysisOptions
public AnalysisOptions()
-
AnalysisOptions
public AnalysisOptions(AnalysisScope scope, Iterable<? extends Entrypoint> e)
-
-
Method Detail
-
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.?
-
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.?
-
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?
-
-