Class AllocationSite
- java.lang.Object
-
- it.unive.lisa.symbolic.SymbolicExpression
-
- it.unive.lisa.symbolic.value.ValueExpression
-
- it.unive.lisa.symbolic.value.Identifier
-
- it.unive.lisa.symbolic.value.HeapLocation
-
- it.unive.lisa.analysis.heap.pointbased.AllocationSite
-
public class AllocationSite extends it.unive.lisa.symbolic.value.HeapLocation
A heap identifier that track also the source location where it has been allocated and a field (optional). This class is used inPointBasedHeap
andFieldSensitivePointBasedHeap
.
-
-
Constructor Summary
Constructors Constructor Description AllocationSite(it.unive.lisa.type.Type staticType, java.lang.String locationName, boolean isWeak, it.unive.lisa.program.cfg.CodeLocation location)
Builds an allocation site from its source code location (without field) and specifying if it is weak.AllocationSite(it.unive.lisa.type.Type staticType, java.lang.String locationName, it.unive.lisa.program.cfg.CodeLocation location)
Builds a strong allocation site from its source code location (without field).AllocationSite(it.unive.lisa.type.Type staticType, java.lang.String locationName, it.unive.lisa.symbolic.SymbolicExpression field, boolean isWeak, it.unive.lisa.program.cfg.CodeLocation location)
Builds an allocation site from its source code location and its field and specifying if it is weak.AllocationSite(it.unive.lisa.type.Type staticType, java.lang.String locationName, it.unive.lisa.symbolic.SymbolicExpression field, it.unive.lisa.program.cfg.CodeLocation location)
Builds a strong allocation site from its source code location and its field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getField()
Yields the string that identifies the subfield of the location (getLocationName()
) that this allocation site has been allocated.java.lang.String
getLocationName()
Yields the code location string representation where this allocation site has been allocated.-
Methods inherited from class it.unive.lisa.symbolic.value.HeapLocation
accept, equals, hashCode, lub, popScope, pushScope, toString
-
Methods inherited from class it.unive.lisa.symbolic.value.Identifier
addAnnotation, getAnnotations, getName, isWeak
-
-
-
-
Constructor Detail
-
AllocationSite
public AllocationSite(it.unive.lisa.type.Type staticType, java.lang.String locationName, it.unive.lisa.program.cfg.CodeLocation location)
Builds a strong allocation site from its source code location (without field).- Parameters:
staticType
- the static type of this allocation sitelocationName
- the source code location string representation where this allocation site has been allocatedlocation
- the code location of the statement that has generated this expression
-
AllocationSite
public AllocationSite(it.unive.lisa.type.Type staticType, java.lang.String locationName, boolean isWeak, it.unive.lisa.program.cfg.CodeLocation location)
Builds an allocation site from its source code location (without field) and specifying if it is weak.- Parameters:
staticType
- the static type of this allocation sitelocationName
- the source code location string representation where this allocation site has been allocatedisWeak
- boolean value specifying if this allocation site is weaklocation
- the code location of the statement that has generated this expression
-
AllocationSite
public AllocationSite(it.unive.lisa.type.Type staticType, java.lang.String locationName, it.unive.lisa.symbolic.SymbolicExpression field, it.unive.lisa.program.cfg.CodeLocation location)
Builds a strong allocation site from its source code location and its field.- Parameters:
staticType
- the static type of this allocation sitelocationName
- the source code location string representation where this allocation site has been allocatedfield
- the field of this allocation sitelocation
- the code location of the statement that has generated this expression
-
AllocationSite
public AllocationSite(it.unive.lisa.type.Type staticType, java.lang.String locationName, it.unive.lisa.symbolic.SymbolicExpression field, boolean isWeak, it.unive.lisa.program.cfg.CodeLocation location)
Builds an allocation site from its source code location and its field and specifying if it is weak.- Parameters:
staticType
- the static type of this allocation sitelocationName
- the source code location string representation where this allocation site has been allocatedfield
- the field of this allocation siteisWeak
- boolean value specifying if this allocation site is weaklocation
- the code location of the statement that has generated this expression
-
-
Method Detail
-
getLocationName
public java.lang.String getLocationName()
Yields the code location string representation where this allocation site has been allocated.- Returns:
- the code location string representation where this allocation site has been allocated.
-
getField
public java.lang.String getField()
Yields the string that identifies the subfield of the location (getLocationName()
) that this allocation site has been allocated.- Returns:
- the subfield name (can be
null
)
-
-