Class MemoryPointer


  • public class MemoryPointer
    extends Identifier
    A memory pointer to a heap location.
    • Constructor Detail

      • MemoryPointer

        public MemoryPointer​(Type staticType,
                             HeapLocation loc,
                             CodeLocation location)
        Builds a memory pointer with empty annotations.
        Parameters:
        staticType - the static type of this expression
        loc - the heap location pointed by this memory pointer
        location - the code location of the statement that has generated this expression
      • MemoryPointer

        public MemoryPointer​(Type staticType,
                             HeapLocation loc,
                             Annotations annotations,
                             CodeLocation location)
        Builds a memory pointer.
        Parameters:
        staticType - the static type of this expression
        loc - the heap location pointed by this memory pointer
        annotations - the annotation of this memory pointer
        location - the code location of the statement that has generated this expression
    • Method Detail

      • getReferencedLocation

        public HeapLocation getReferencedLocation()
        Yields the heap location pointed by this pointer.
        Returns:
        the heap location pointed by this pointer
      • accept

        public <T> T accept​(ExpressionVisitor<T> visitor,
                            java.lang.Object... params)
                     throws SemanticException
        Description copied from class: SymbolicExpression
        Accepts an ExpressionVisitor, visiting this expression recursively.
        Specified by:
        accept in class SymbolicExpression
        Type Parameters:
        T - the type of value produced by the visiting callbacks
        Parameters:
        visitor - the visitor
        params - additional optional parameters to pass to each visiting callback
        Returns:
        the value produced by the visiting operation
        Throws:
        SemanticException - if an error occurs during the visiting