Class 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 in PointBasedHeap and FieldSensitivePointBasedHeap.
    • 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
      • Methods inherited from class it.unive.lisa.symbolic.value.ValueExpression

        removeNegations
      • Methods inherited from class it.unive.lisa.symbolic.SymbolicExpression

        getCodeLocation, getDynamicType, getRuntimeTypes, getStaticType, hasRuntimeTypes, setRuntimeTypes
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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 site
        locationName - the source code location string representation where this allocation site has been allocated
        location - 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 site
        locationName - the source code location string representation where this allocation site has been allocated
        isWeak - boolean value specifying if this allocation site is weak
        location - 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 site
        locationName - the source code location string representation where this allocation site has been allocated
        field - the field of this allocation site
        location - 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 site
        locationName - the source code location string representation where this allocation site has been allocated
        field - the field of this allocation site
        isWeak - boolean value specifying if this allocation site is weak
        location - 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)