Package it.unive.lisa.analysis.heap
Interface HeapDomain<D extends HeapDomain<D>>
-
- Type Parameters:
D
- the concrete type of theHeapDomain
- All Superinterfaces:
HeapSemanticOperation
,Lattice<D>
,SemanticDomain<D,SymbolicExpression,Identifier>
- All Known Implementing Classes:
BaseHeapDomain
,HeapEnvironment
public interface HeapDomain<D extends HeapDomain<D>> extends SemanticDomain<D,SymbolicExpression,Identifier>, Lattice<D>, HeapSemanticOperation
A semantic domain that can evaluate the semantic of statements that operate on heap locations, and not on concrete values. A heap domain can handle instances ofHeapExpression
s, and manage identifiers that areHeapLocation
s.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface it.unive.lisa.analysis.heap.HeapSemanticOperation
HeapSemanticOperation.HeapReplacement
-
Nested classes/interfaces inherited from interface it.unive.lisa.analysis.SemanticDomain
SemanticDomain.Satisfiability
-
-
Field Summary
-
Fields inherited from interface it.unive.lisa.analysis.Lattice
BOTTOM_STRING, TOP_STRING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ExpressionSet<ValueExpression>
rewrite(SymbolicExpression expression, ProgramPoint pp)
Rewrites aSymbolicExpression
, getting rid of the parts that access heap structures, substituting them with syntheticHeapLocation
s representing the accessed locations.default ExpressionSet<ValueExpression>
rewriteAll(ExpressionSet<SymbolicExpression> expressions, ProgramPoint pp)
Rewrites allSymbolicExpression
s, getting rid of the parts that access heap structures, substituting them with syntheticHeapLocation
s 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.SemanticDomain
assign, assume, forgetIdentifier, forgetIdentifiers, forgetIdentifiersIf, getDomainInstance, popScope, pushScope, representation, satisfies, smallStepSemantics
-
-
-
-
Method Detail
-
rewrite
ExpressionSet<ValueExpression> rewrite(SymbolicExpression expression, ProgramPoint pp) throws SemanticException
Rewrites aSymbolicExpression
, getting rid of the parts that access heap structures, substituting them with syntheticHeapLocation
s representing the accessed locations. The expression returned by this method should not containHeapExpression
s.
If no rewriting is necessary, the input expression can be returned instead.- Parameters:
expression
- the expression to rewritepp
- the program point that where this expression is being rewritten- Returns:
- the rewritten expression, or the original one
- Throws:
SemanticException
- if something goes wrong during the rewriting
-
rewriteAll
default ExpressionSet<ValueExpression> rewriteAll(ExpressionSet<SymbolicExpression> expressions, ProgramPoint pp) throws SemanticException
Rewrites allSymbolicExpression
s, getting rid of the parts that access heap structures, substituting them with syntheticHeapLocation
s representing the accessed locations. The expressions returned by this method should not containHeapExpression
s.
If no rewriting is necessary, the returnedExpressionSet
will contain the input expressions.
The default implementation of this method simply iterates over the input expressions, invokingrewrite(SymbolicExpression, 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 rewritepp
- 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
-
-