Class AbstractHeapModel
java.lang.Object
pascal.taie.analysis.pta.core.heap.AbstractHeapModel
- All Implemented Interfaces:
Serializable
,HeapModel
,Indexer<Obj>
- Direct Known Subclasses:
AllocationSiteBasedModel
All heap models should inherit this class, and we can define
some uniform behaviors of heap modeling here.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected <T extends Obj>
Tadd
(T obj) Adds an obj to this model.protected Obj
doGetConstantObj
(ReferenceLiteral value) protected abstract Obj
The method which controls the heap modeling for normal objects.getConstantObj
(ReferenceLiteral value) int
protected MergedObj
getMergedObj
(New allocSite) Merges given object given by its type.getMockObj
(Descriptor desc, Object alloc, Type type, JMethod container, boolean isFunctional) protected NewObj
getObject
(int index) boolean
isStringConstant
(Obj obj) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface pascal.taie.analysis.pta.core.heap.HeapModel
getMockObj, getMockObj, getMockObj
-
Constructor Details
-
AbstractHeapModel
-
-
Method Details
-
getObj
-
getMergedObj
Merges given object given by its type.- Parameters:
allocSite
- the allocation site of the object- Returns:
- the merged object
-
getNewObj
-
doGetObj
The method which controls the heap modeling for normal objects. -
getConstantObj
- Specified by:
getConstantObj
in interfaceHeapModel
- Returns:
- the constant object for given value.
-
doGetConstantObj
-
isStringConstant
- Specified by:
isStringConstant
in interfaceHeapModel
- Returns:
true
ifobj
represents a string constant.
-
getMockObj
public Obj getMockObj(Descriptor desc, Object alloc, Type type, JMethod container, boolean isFunctional) - Specified by:
getMockObj
in interfaceHeapModel
-
add
Adds an obj to this model. This method also sets index for given obj. Each obj should be passed to this method only once. -
getObjects
- Specified by:
getObjects
in interfaceHeapModel
- Returns:
- all objects in this heap model.
-
getIndex
-
getObject
-