Class DelegatingExtendedHeapModel
java.lang.Object
com.ibm.wala.ipa.modref.DelegatingExtendedHeapModel
- All Implemented Interfaces:
HeapModel
,InstanceKeyFactory
,PointerKeyFactory
,ExtendedHeapModel
An implementation of
ExtendedHeapModel
based on a normal HeapModel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetFilteredPointerKeyForLocal
(CGNode node, int valueNumber, FilteredPointerKey.TypeFilter filter) getInstanceKeyForAllocation
(CGNode node, NewSiteReference allocation) <T> InstanceKey
getInstanceKeyForConstant
(TypeReference type, T S) getInstanceKeyForMetadataObject
(Object obj, TypeReference objType) getInstanceKeyForMultiNewArray
(CGNode node, NewSiteReference allocation, int dim) getInstanceKeyForPEI
(CGNode node, ProgramCounter instr, TypeReference type) TODO: expand this API to differentiate between different array indicesgetPointerKeyForInstanceField
(InstanceKey I, IField field) getPointerKeyForLocal
(CGNode node, int valueNumber)
-
Constructor Details
-
DelegatingExtendedHeapModel
-
-
Method Details
-
getClassHierarchy
- Specified by:
getClassHierarchy
in interfaceHeapModel
- Returns:
- the governing class hierarchy for this heap model
-
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.
-
getInstanceKeyForAllocation
- Specified by:
getInstanceKeyForAllocation
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents a particular allocation
-
getInstanceKeyForMetadataObject
- Specified by:
getInstanceKeyForMetadataObject
in interfaceInstanceKeyFactory
- Parameters:
objType
- TODO- Returns:
- the instance key that represents the metadata object obj
-
getInstanceKeyForConstant
- Specified by:
getInstanceKeyForConstant
in 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:
getInstanceKeyForMultiNewArray
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents the array allocated as the dim_th dimension at a particular allocation
-
getInstanceKeyForPEI
- Specified by:
getInstanceKeyForPEI
in interfaceInstanceKeyFactory
- Returns:
- the instance key that represents the exception of type _type_ thrown by a particular PEI.
-
getPointerKeyForArrayContents
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.
-
getPointerKeyForExceptionalReturnValue
- Specified by:
getPointerKeyForExceptionalReturnValue
in interfacePointerKeyFactory
- Returns:
- the PointerKey that acts as a representative for the class of pointers that includes the exceptional return value
-
getPointerKeyForInstanceField
- Specified by:
getPointerKeyForInstanceField
in interfacePointerKeyFactory
- Returns:
- the PointerKey that acts as a representation for the class of pointers that includes the given instance field.
-
getPointerKeyForLocal
- 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.
-
getPointerKeyForReturnValue
- 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
-
getPointerKeyForStaticField
- 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
-
iteratePointerKeys
- Specified by:
iteratePointerKeys
in interfaceHeapModel
- Returns:
- an Iterator of all PointerKeys that are modeled.
-
getPointerKeyForArrayLength
- Specified by:
getPointerKeyForArrayLength
in 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
-