Package it.unive.lisa.symbolic.heap
Class HeapExpression
- java.lang.Object
-
- it.unive.lisa.symbolic.SymbolicExpression
-
- it.unive.lisa.symbolic.heap.HeapExpression
-
- Direct Known Subclasses:
AccessChild,HeapAllocation,HeapDereference,HeapReference
public abstract class HeapExpression extends SymbolicExpression
A symbolic expression that identifies a location in the program's heap. Instances of this expressions must be rewritten byHeapDomains to aValueExpressionbefore being evaluated from aValueDomain.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHeapExpression(ExternalSet<Type> types, CodeLocation location)Builds the heap expression.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SymbolicExpressionpopScope(ScopeToken token)Pops the scope identified by the given token from the expression.SymbolicExpressionpushScope(ScopeToken token)Pushes a new scope, identified by the give token, in the expression.-
Methods inherited from class it.unive.lisa.symbolic.SymbolicExpression
accept, equals, getCodeLocation, getDynamicType, getTypes, hashCode, toString
-
-
-
-
Constructor Detail
-
HeapExpression
protected HeapExpression(ExternalSet<Type> types, CodeLocation location)
Builds the heap expression.- Parameters:
types- the runtime types of this expressionlocation- the code location of the statement that has generated this heap expression
-
-
Method Detail
-
pushScope
public final SymbolicExpression pushScope(ScopeToken token)
Description copied from class:SymbolicExpressionPushes a new scope, identified by the give token, in the expression. This causes allVariables to becomeOutOfScopeIdentifiers associated with the given token.- Specified by:
pushScopein classSymbolicExpression- Parameters:
token- the token identifying the scope to push- Returns:
- a copy of this expression where the local variables have gone out of scope
-
popScope
public final SymbolicExpression popScope(ScopeToken token) throws SemanticException
Description copied from class:SymbolicExpressionPops the scope identified by the given token from the expression. This causes all the invisible variables (i.e.OutOfScopeIdentifiers) mapped to the given scope to become visible (i.e.Variables) again.- Specified by:
popScopein classSymbolicExpression- Parameters:
token- the token of the scope to be restored- Returns:
- a copy of this expression where the local variables associated with the given scope are visible again
- Throws:
SemanticException- if an error occurs during the computation
-
-