Interface NonRelationalHeapDomain<T extends NonRelationalHeapDomain<T>>
-
- Type Parameters:
T- the concrete type of the domain
- All Superinterfaces:
HeapSemanticOperation,Lattice<T>,NonRelationalDomain<T,SymbolicExpression,HeapEnvironment<T>>,NonRelationalElement<T,SymbolicExpression,HeapEnvironment<T>>,SemanticEvaluator
- All Known Implementing Classes:
AllocationSites
public interface NonRelationalHeapDomain<T extends NonRelationalHeapDomain<T>> extends NonRelationalDomain<T,SymbolicExpression,HeapEnvironment<T>>, HeapSemanticOperation
A non-relational heap domain, that is able to compute the value of aSymbolicExpressionby knowing the values of all program variables. Instances of this class can be wrapped inside aHeapEnvironmentto represent abstract values of individualIdentifiers.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface it.unive.lisa.analysis.heap.HeapSemanticOperation
HeapSemanticOperation.HeapReplacement
-
-
Field Summary
-
Fields inherited from interface it.unive.lisa.analysis.Lattice
BOTTOM_REPR, BOTTOM_STRING, TOP_REPR, TOP_STRING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ExpressionSet<ValueExpression>rewrite(SymbolicExpression expression, HeapEnvironment<T> environment, ProgramPoint pp)Rewrites aSymbolicExpression, getting rid of the parts that access heap structures, substituting them with syntheticHeapLocations representing the accessed locations.default ExpressionSet<ValueExpression>rewriteAll(ExpressionSet<SymbolicExpression> expressions, HeapEnvironment<T> environment, ProgramPoint pp)Rewrites allSymbolicExpressions, getting rid of the parts that access heap structures, substituting them with syntheticHeapLocations representing the accessed locations.-
Methods inherited from interface it.unive.lisa.analysis.heap.HeapSemanticOperation
getSubstitution
-
Methods inherited from interface it.unive.lisa.analysis.Lattice
bottom, isBottom, isTop, lessOrEqual, lub, top, widening
-
Methods inherited from interface it.unive.lisa.analysis.nonrelational.NonRelationalDomain
eval
-
Methods inherited from interface it.unive.lisa.analysis.nonrelational.NonRelationalElement
assume, glb, representation, satisfies, variable
-
Methods inherited from interface it.unive.lisa.analysis.SemanticEvaluator
canProcess, tracksIdentifiers
-
-
-
-
Method Detail
-
rewrite
ExpressionSet<ValueExpression> rewrite(SymbolicExpression expression, HeapEnvironment<T> environment, ProgramPoint pp) throws SemanticException
Rewrites aSymbolicExpression, getting rid of the parts that access heap structures, substituting them with syntheticHeapLocations representing the accessed locations. The expression(s) returned by this method should not containHeapExpressions.
Note that a single expression might be rewritten to more than one expression, depending on the individual reasoning of the domain.
If no rewriting is necessary, the input expression can be returned instead.- Parameters:
expression- the expression to rewriteenvironment- the environment containing information about the program variablespp- the program point that where this expression is being rewritten- Returns:
- the rewritten expressions, or the original one
- Throws:
SemanticException- if something goes wrong during the rewriting
-
rewriteAll
default ExpressionSet<ValueExpression> rewriteAll(ExpressionSet<SymbolicExpression> expressions, HeapEnvironment<T> environment, ProgramPoint pp) throws SemanticException
Rewrites allSymbolicExpressions, getting rid of the parts that access heap structures, substituting them with syntheticHeapLocations representing the accessed locations. The expressions returned by this method should not containHeapExpressions.
If no rewriting is necessary, the returnedExpressionSetwill contain the input expressions.
The default implementation of this method simply iterates over the input expressions, invokingrewrite(SymbolicExpression, HeapEnvironment, ProgramPoint)on all of them.
The collection returned by this method usually contains one expression, but instances created through lattice operations (e.g., lub) might contain more.- Parameters:
expressions- the expressions to rewriteenvironment- the environment containing information about the program variablespp- the program point that where this expressions are being rewritten- Returns:
- the rewritten expressions, or the original ones
- Throws:
SemanticException- if something goes wrong during the rewriting
-
-