Package it.unive.lisa.analysis.heap
Class BaseHeapDomain.Rewriter
- java.lang.Object
-
- it.unive.lisa.analysis.heap.BaseHeapDomain.Rewriter
-
- All Implemented Interfaces:
ExpressionVisitor<ExpressionSet<ValueExpression>>
- Enclosing class:
- BaseHeapDomain<H extends BaseHeapDomain<H>>
public abstract static class BaseHeapDomain.Rewriter extends java.lang.Object implements ExpressionVisitor<ExpressionSet<ValueExpression>>
AnExpressionVisitor
that rewritesSymbolicExpression
s toValueExpression
s. The visiting ofHeapExpression
s is left unimplemented for concrete instances to provide their logic.
-
-
Constructor Summary
Constructors Constructor Description Rewriter()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface it.unive.lisa.symbolic.ExpressionVisitor
visit, visit, visit, visit
-
-
-
-
Method Detail
-
visit
public ExpressionSet<ValueExpression> visit(UnaryExpression expression, ExpressionSet<ValueExpression> arg, java.lang.Object... params) throws SemanticException
Description copied from interface:ExpressionVisitor
Visits aUnaryExpression
. This callback is invoked after the inner expressions have been visited, and their produced value is passed as argument.- Specified by:
visit
in interfaceExpressionVisitor<ExpressionSet<ValueExpression>>
- Parameters:
expression
- the expressionarg
- the value produced by visiting the argument of the expressionparams
- the additional parameters provided toSymbolicExpression.accept(ExpressionVisitor, Object...)
, if any- Returns:
- the value produced by visiting the expression
- Throws:
SemanticException
- if an error occurs during the visit operation
-
visit
public ExpressionSet<ValueExpression> visit(BinaryExpression expression, ExpressionSet<ValueExpression> left, ExpressionSet<ValueExpression> right, java.lang.Object... params) throws SemanticException
Description copied from interface:ExpressionVisitor
Visits aBinaryExpression
. This callback is invoked after the inner expressions have been visited, and their produced value is passed as argument.- Specified by:
visit
in interfaceExpressionVisitor<ExpressionSet<ValueExpression>>
- Parameters:
expression
- the expressionleft
- the value produced by visiting the left-hand side of the expressionright
- the value produced by visiting the right-hand side of the expressionparams
- the additional parameters provided toSymbolicExpression.accept(ExpressionVisitor, Object...)
, if any- Returns:
- the value produced by visiting the expression
- Throws:
SemanticException
- if an error occurs during the visit operation
-
visit
public ExpressionSet<ValueExpression> visit(TernaryExpression expression, ExpressionSet<ValueExpression> left, ExpressionSet<ValueExpression> middle, ExpressionSet<ValueExpression> right, java.lang.Object... params) throws SemanticException
Description copied from interface:ExpressionVisitor
Visits aTernaryExpression
. This callback is invoked after the inner expressions have been visited, and their produced value is passed as argument.- Specified by:
visit
in interfaceExpressionVisitor<ExpressionSet<ValueExpression>>
- Parameters:
expression
- the expressionleft
- the value produced by visiting the left-hand side of the expressionmiddle
- the value produced by visiting the middle-hand side of the expressionright
- the value produced by visiting the right-hand side of the expressionparams
- the additional parameters provided toSymbolicExpression.accept(ExpressionVisitor, Object...)
, if any- Returns:
- the value produced by visiting the expression
- Throws:
SemanticException
- if an error occurs during the visit operation
-
visit
public ExpressionSet<ValueExpression> visit(Skip expression, java.lang.Object... params) throws SemanticException
Description copied from interface:ExpressionVisitor
Visits aSkip
.- Specified by:
visit
in interfaceExpressionVisitor<ExpressionSet<ValueExpression>>
- Parameters:
expression
- the skipparams
- the additional parameters provided toSymbolicExpression.accept(ExpressionVisitor, Object...)
, if any- Returns:
- the value produced by visiting the skip
- Throws:
SemanticException
- if an error occurs during the visit operation
-
visit
public ExpressionSet<ValueExpression> visit(PushAny expression, java.lang.Object... params) throws SemanticException
Description copied from interface:ExpressionVisitor
Visits aPushAny
.- Specified by:
visit
in interfaceExpressionVisitor<ExpressionSet<ValueExpression>>
- Parameters:
expression
- the pushanyparams
- the additional parameters provided toSymbolicExpression.accept(ExpressionVisitor, Object...)
, if any- Returns:
- the value produced by visiting the pushany
- Throws:
SemanticException
- if an error occurs during the visit operation
-
visit
public ExpressionSet<ValueExpression> visit(Constant expression, java.lang.Object... params) throws SemanticException
Description copied from interface:ExpressionVisitor
Visits aConstant
.- Specified by:
visit
in interfaceExpressionVisitor<ExpressionSet<ValueExpression>>
- Parameters:
expression
- the constantparams
- the additional parameters provided toSymbolicExpression.accept(ExpressionVisitor, Object...)
, if any- Returns:
- the value produced by visiting the constant
- Throws:
SemanticException
- if an error occurs during the visit operation
-
visit
public ExpressionSet<ValueExpression> visit(Identifier expression, java.lang.Object... params) throws SemanticException
Description copied from interface:ExpressionVisitor
Visits anIdentifier
.- Specified by:
visit
in interfaceExpressionVisitor<ExpressionSet<ValueExpression>>
- Parameters:
expression
- the identifierparams
- the additional parameters provided toSymbolicExpression.accept(ExpressionVisitor, Object...)
, if any- Returns:
- the value produced by visiting the identifier
- Throws:
SemanticException
- if an error occurs during the visit operation
-
-