Class PointerAnalysisImpl.HModel
- java.lang.Object
-
- com.ibm.wala.ipa.callgraph.propagation.PointerAnalysisImpl.HModel
-
- All Implemented Interfaces:
HeapModel
,InstanceKeyFactory
,PointerKeyFactory
- Enclosing class:
- PointerAnalysisImpl
protected class PointerAnalysisImpl.HModel extends Object implements HeapModel
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
HModel()
-
Method Summary
-
-
-
Method Detail
-
iteratePointerKeys
public Iterator<PointerKey> iteratePointerKeys()
- Specified by:
iteratePointerKeys
in interfaceHeapModel
- Returns:
- an Iterator of all PointerKeys that are modeled.
-
getInstanceKeyForAllocation
public InstanceKey getInstanceKeyForAllocation(CGNode node, NewSiteReference allocation)
- Specified by:
getInstanceKeyForAllocation
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents a particular allocation
-
getInstanceKeyForMultiNewArray
public InstanceKey getInstanceKeyForMultiNewArray(CGNode node, NewSiteReference allocation, int dim)
- Specified by:
getInstanceKeyForMultiNewArray
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents the array allocated as the dim_th dimension at a particular allocation
-
getInstanceKeyForConstant
public <T> InstanceKey getInstanceKeyForConstant(TypeReference type, T S)
- Specified by:
getInstanceKeyForConstant
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents a constant with value S, when considered as a particular type
-
getInstanceKeyForPEI
public InstanceKey getInstanceKeyForPEI(CGNode node, ProgramCounter peiLoc, TypeReference type)
- Specified by:
getInstanceKeyForPEI
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents the exception of type _type_ thrown by a particular PEI.
-
getInstanceKeyForMetadataObject
public InstanceKey getInstanceKeyForMetadataObject(Object obj, TypeReference objType)
- Specified by:
getInstanceKeyForMetadataObject
in interfaceInstanceKeyFactory
objType
- TODO- Returns:
- the instance key that represents the metadata object obj
-
getPointerKeyForLocal
public PointerKey getPointerKeyForLocal(CGNode node, int valueNumber)
- Specified by:
getPointerKeyForLocal
in interfacePointerKeyFactory
- Returns:
- the PointerKey that acts as a representative for the class of pointers that includes the local variable identified by the value number parameter.
-
getFilteredPointerKeyForLocal
public FilteredPointerKey getFilteredPointerKeyForLocal(CGNode node, int valueNumber, FilteredPointerKey.TypeFilter filter)
- Specified by:
getFilteredPointerKeyForLocal
in interfacePointerKeyFactory
- Returns:
- the PointerKey that acts as a representative for the class of pointers that includes the local variable identified by the value number parameter.
-
getPointerKeyForReturnValue
public PointerKey getPointerKeyForReturnValue(CGNode node)
- Specified by:
getPointerKeyForReturnValue
in interfacePointerKeyFactory
- Returns:
- the PointerKey that acts as a representative for the class of pointers that includes the return value for a node
-
getPointerKeyForExceptionalReturnValue
public PointerKey getPointerKeyForExceptionalReturnValue(CGNode node)
- Specified by:
getPointerKeyForExceptionalReturnValue
in interfacePointerKeyFactory
- Returns:
- the PointerKey that acts as a representative for the class of pointers that includes the exceptional return value
-
getPointerKeyForStaticField
public PointerKey getPointerKeyForStaticField(IField f)
- Specified by:
getPointerKeyForStaticField
in interfacePointerKeyFactory
- Returns:
- the PointerKey that acts as a representative for the class of pointers that includes the contents of the static field
-
getPointerKeyForInstanceField
public PointerKey getPointerKeyForInstanceField(InstanceKey I, IField field)
- Specified by:
getPointerKeyForInstanceField
in interfacePointerKeyFactory
- Returns:
- the PointerKey that acts as a representation for the class of pointers that includes the given instance field.
-
getPointerKeyForArrayContents
public PointerKey getPointerKeyForArrayContents(InstanceKey I)
Description copied from interface:PointerKeyFactory
TODO: expand this API to differentiate between different array indices- Specified by:
getPointerKeyForArrayContents
in interfacePointerKeyFactory
- Parameters:
I
- an InstanceKey representing an abstract array- Returns:
- the PointerKey that acts as a representation for the class of pointers that includes the given array contents.
-
getClassHierarchy
public IClassHierarchy getClassHierarchy()
- Specified by:
getClassHierarchy
in interfaceHeapModel
- Returns:
- the governing class hierarchy for this heap model
-
-