Package it.unive.lisa.symbolic.heap
Class HeapReference
- java.lang.Object
-
- it.unive.lisa.symbolic.SymbolicExpression
-
- it.unive.lisa.symbolic.heap.HeapExpression
-
- it.unive.lisa.symbolic.heap.HeapReference
-
- All Implemented Interfaces:
ScopedObject<SymbolicExpression>
public class HeapReference extends HeapExpression
A reference to a memory location, identified by its name.
-
-
Constructor Summary
Constructors Constructor Description HeapReference(Type staticType, SymbolicExpression expression, CodeLocation location)
Builds the heap reference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
accept(ExpressionVisitor<T> visitor, java.lang.Object... params)
Accepts anExpressionVisitor
, visiting this expression recursively.boolean
equals(java.lang.Object obj)
SymbolicExpression
getExpression()
Yields the referred expression.int
hashCode()
java.lang.String
toString()
-
Methods inherited from class it.unive.lisa.symbolic.heap.HeapExpression
mightNeedRewriting, popScope, pushScope
-
Methods inherited from class it.unive.lisa.symbolic.SymbolicExpression
getCodeLocation, getStaticType
-
-
-
-
Constructor Detail
-
HeapReference
public HeapReference(Type staticType, SymbolicExpression expression, CodeLocation location)
Builds the heap reference.- Parameters:
staticType
- the static type of this expressionexpression
- the expression that this refers tolocation
- the code location of the statement that has generated this expression
-
-
Method Detail
-
toString
public java.lang.String toString()
- Specified by:
toString
in classSymbolicExpression
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classSymbolicExpression
-
getExpression
public SymbolicExpression getExpression()
Yields the referred expression.- Returns:
- the referred expression
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classSymbolicExpression
-
accept
public <T> T accept(ExpressionVisitor<T> visitor, java.lang.Object... params) throws SemanticException
Description copied from class:SymbolicExpression
Accepts anExpressionVisitor
, visiting this expression recursively.- Specified by:
accept
in classSymbolicExpression
- Type Parameters:
T
- the type of value produced by the visiting callbacks- Parameters:
visitor
- the visitorparams
- 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
-
-