Class AbstractRefinementPolicy
java.lang.Object
com.ibm.wala.demandpa.alg.refinepolicy.AbstractRefinementPolicy
- All Implemented Interfaces:
RefinementPolicy
- Direct Known Subclasses:
ManualRefinementPolicy
,SinglePassRefinementPolicy
,TunedRefinementPolicy
Default
RefinementPolicy
implementation, delegating to some provided FieldRefinePolicy
and CallGraphRefinePolicy
- Author:
- manu
-
Field Summary
Modifier and TypeFieldDescriptionprotected final int[]
protected final CallGraphRefinePolicy
protected static final int
protected final FieldRefinePolicy
protected static final int
protected final int
-
Constructor Summary
ConstructorDescriptionAbstractRefinementPolicy
(FieldRefinePolicy fieldRefinePolicy, CallGraphRefinePolicy cgRefinePolicy) AbstractRefinementPolicy
(FieldRefinePolicy fieldRefinePolicy, CallGraphRefinePolicy cgRefinePolicy, int numPasses, int[] budgetPerPass) -
Method Summary
-
Field Details
-
DEFAULT_NUM_PASSES
protected static final int DEFAULT_NUM_PASSES- See Also:
-
LONGER_PASS_BUDGET
protected static final int LONGER_PASS_BUDGET- See Also:
-
fieldRefinePolicy
-
cgRefinePolicy
-
numPasses
protected final int numPasses -
budgetPerPass
protected final int[] budgetPerPass
-
-
Constructor Details
-
AbstractRefinementPolicy
public AbstractRefinementPolicy(FieldRefinePolicy fieldRefinePolicy, CallGraphRefinePolicy cgRefinePolicy, int numPasses, int[] budgetPerPass) -
AbstractRefinementPolicy
public AbstractRefinementPolicy(FieldRefinePolicy fieldRefinePolicy, CallGraphRefinePolicy cgRefinePolicy)
-
-
Method Details
-
getBudgetForPass
public int getBudgetForPass(int passNum) - Specified by:
getBudgetForPass
in interfaceRefinementPolicy
- Returns:
- the maximum number of nodes to traverse in pass
passNum
-
getCallGraphRefinePolicy
- Specified by:
getCallGraphRefinePolicy
in interfaceRefinementPolicy
- Returns:
- the call graph refinement policy
-
getFieldRefinePolicy
- Specified by:
getFieldRefinePolicy
in interfaceRefinementPolicy
- Returns:
- the field refinement policy
-
getNumPasses
public int getNumPasses()- Specified by:
getNumPasses
in interfaceRefinementPolicy
- Returns:
- the maximum number of refinement iterations for the query
-
nextPass
public boolean nextPass()- Specified by:
nextPass
in interfaceRefinementPolicy
- Returns:
true
if more refinement can be done, and hence another pass can be attempted;false
otherwise
-