Class DelegatingFieldRefinePolicy
- java.lang.Object
-
- com.ibm.wala.demandpa.alg.refinepolicy.DelegatingFieldRefinePolicy
-
- All Implemented Interfaces:
FieldRefinePolicy
public class DelegatingFieldRefinePolicy extends java.lang.Object implements FieldRefinePolicy
A field refine policy that first checks with A, then delegates to B
-
-
Constructor Summary
Constructors Constructor Description DelegatingFieldRefinePolicy(FieldRefinePolicy a, FieldRefinePolicy b)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
nextPass()
boolean
shouldRefine(IField field, PointerKey basePtr, PointerKey val, IFlowLabel label, StateMachine.State state)
returnstrue
ifA.shouldRefine(field) || B.shouldRefine(field)
.
-
-
-
Constructor Detail
-
DelegatingFieldRefinePolicy
public DelegatingFieldRefinePolicy(FieldRefinePolicy a, FieldRefinePolicy b)
-
-
Method Detail
-
nextPass
public boolean nextPass()
- Specified by:
nextPass
in interfaceFieldRefinePolicy
- Returns:
true
if more refinement can be done, and hence another pass can be attempted;false
otherwise
-
shouldRefine
public boolean shouldRefine(IField field, PointerKey basePtr, PointerKey val, IFlowLabel label, StateMachine.State state)
returnstrue
ifA.shouldRefine(field) || B.shouldRefine(field)
. Note that ifA.shouldRefine(field)
istrue
,B.shouldRefine(field)
is not called.- Specified by:
shouldRefine
in interfaceFieldRefinePolicy
- Parameters:
field
- the accessed fieldbasePtr
- the base pointer of the access- Returns:
true
if match edges for the field access should be refined. Otherwise,false
is returned, indicating that the field can be handled with match edges.
-
-