Package com.ibm.wala.ipa.modref
Class DelegatingExtendedHeapModel
- java.lang.Object
-
- com.ibm.wala.ipa.modref.DelegatingExtendedHeapModel
-
- All Implemented Interfaces:
HeapModel,InstanceKeyFactory,PointerKeyFactory,ExtendedHeapModel
public class DelegatingExtendedHeapModel extends Object implements ExtendedHeapModel
An implementation ofExtendedHeapModelbased on a normalHeapModel
-
-
Constructor Summary
Constructors Constructor Description DelegatingExtendedHeapModel(HeapModel h)
-
Method Summary
-
-
-
Constructor Detail
-
DelegatingExtendedHeapModel
public DelegatingExtendedHeapModel(HeapModel h)
-
-
Method Detail
-
getClassHierarchy
public IClassHierarchy getClassHierarchy()
- Specified by:
getClassHierarchyin interfaceHeapModel- Returns:
- the governing class hierarchy for this heap model
-
getFilteredPointerKeyForLocal
public FilteredPointerKey getFilteredPointerKeyForLocal(CGNode node, int valueNumber, FilteredPointerKey.TypeFilter filter)
- Specified by:
getFilteredPointerKeyForLocalin 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.
-
getInstanceKeyForAllocation
public InstanceKey getInstanceKeyForAllocation(CGNode node, NewSiteReference allocation)
- Specified by:
getInstanceKeyForAllocationin interfaceInstanceKeyFactory- Returns:
- the instance key that represents a particular allocation
-
getInstanceKeyForMetadataObject
public InstanceKey getInstanceKeyForMetadataObject(Object obj, TypeReference objType)
- Specified by:
getInstanceKeyForMetadataObjectin interfaceInstanceKeyFactoryobjType- TODO- Returns:
- the instance key that represents the metadata object obj
-
getInstanceKeyForConstant
public <T> InstanceKey getInstanceKeyForConstant(TypeReference type, T S)
- Specified by:
getInstanceKeyForConstantin interfaceInstanceKeyFactory- Returns:
- the instance key that represents a constant with value S, when considered as a particular type
-
getInstanceKeyForMultiNewArray
public InstanceKey getInstanceKeyForMultiNewArray(CGNode node, NewSiteReference allocation, int dim)
- Specified by:
getInstanceKeyForMultiNewArrayin interfaceInstanceKeyFactory- Returns:
- the instance key that represents the array allocated as the dim_th dimension at a particular allocation
-
getInstanceKeyForPEI
public InstanceKey getInstanceKeyForPEI(CGNode node, ProgramCounter instr, TypeReference type)
- Specified by:
getInstanceKeyForPEIin interfaceInstanceKeyFactory- Returns:
- the instance key that represents the exception of type _type_ thrown by a particular PEI.
-
getPointerKeyForArrayContents
public PointerKey getPointerKeyForArrayContents(InstanceKey I)
Description copied from interface:PointerKeyFactoryTODO: expand this API to differentiate between different array indices- Specified by:
getPointerKeyForArrayContentsin 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.
-
getPointerKeyForExceptionalReturnValue
public PointerKey getPointerKeyForExceptionalReturnValue(CGNode node)
- Specified by:
getPointerKeyForExceptionalReturnValuein interfacePointerKeyFactory- Returns:
- the PointerKey that acts as a representative for the class of pointers that includes the exceptional return value
-
getPointerKeyForInstanceField
public PointerKey getPointerKeyForInstanceField(InstanceKey I, IField field)
- Specified by:
getPointerKeyForInstanceFieldin interfacePointerKeyFactory- Returns:
- the PointerKey that acts as a representation for the class of pointers that includes the given instance field.
-
getPointerKeyForLocal
public PointerKey getPointerKeyForLocal(CGNode node, int valueNumber)
- Specified by:
getPointerKeyForLocalin 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:
getPointerKeyForReturnValuein interfacePointerKeyFactory- Returns:
- the PointerKey that acts as a representative for the class of pointers that includes the return value for a node
-
getPointerKeyForStaticField
public PointerKey getPointerKeyForStaticField(IField f)
- Specified by:
getPointerKeyForStaticFieldin interfacePointerKeyFactory- Returns:
- the PointerKey that acts as a representative for the class of pointers that includes the contents of the static field
-
iteratePointerKeys
public Iterator<PointerKey> iteratePointerKeys()
- Specified by:
iteratePointerKeysin interfaceHeapModel- Returns:
- an Iterator of all PointerKeys that are modeled.
-
getPointerKeyForArrayLength
public PointerKey getPointerKeyForArrayLength(InstanceKey I)
- Specified by:
getPointerKeyForArrayLengthin interfaceExtendedHeapModel- Parameters:
I- an InstanceKey representing an abstract array- Returns:
- the PointerKey that acts as a representation for the arraylength field of this abstract array
-
-