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
,StructuredObject
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 aSymbolicExpression
by knowing the values of all program variables. Instances of this class can be wrapped inside aHeapEnvironment
to represent abstract values of individualIdentifier
s.
-
-
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_STRING, TOP_STRING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Satisfiability
alias(SymbolicExpression x, SymbolicExpression y, HeapEnvironment<T> environment, ProgramPoint pp, SemanticOracle oracle)
Yields whether or not the two given expressions are aliases, that is, if they point to the same region of memory.Satisfiability
isReachableFrom(SymbolicExpression x, SymbolicExpression y, HeapEnvironment<T> environment, ProgramPoint pp, SemanticOracle oracle)
Yields whether or not theIdentifier
represented (directly or after rewriting) by the second expression is reachable starting from theIdentifier
represented (directly or after rewriting) by the first expression.default ExpressionSet
rewrite(ExpressionSet expressions, HeapEnvironment<T> environment, ProgramPoint pp, SemanticOracle oracle)
Rewrites allSymbolicExpression
s, getting rid of the parts that access heap structures, substituting them with syntheticHeapLocation
s representing the accessed locations.ExpressionSet
rewrite(SymbolicExpression expression, HeapEnvironment<T> environment, ProgramPoint pp, SemanticOracle oracle)
Rewrites aSymbolicExpression
, 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, glb, isBottom, isTop, lessOrEqual, lub, narrowing, top, widening
-
Methods inherited from interface it.unive.lisa.analysis.nonrelational.NonRelationalDomain
eval
-
Methods inherited from interface it.unive.lisa.analysis.nonrelational.NonRelationalElement
assume, fixedVariable, satisfies, unknownVariable
-
Methods inherited from interface it.unive.lisa.analysis.SemanticEvaluator
canProcess
-
Methods inherited from interface it.unive.lisa.util.representation.StructuredObject
representation
-
-
-
-
Method Detail
-
rewrite
ExpressionSet rewrite(SymbolicExpression expression, HeapEnvironment<T> environment, ProgramPoint pp, SemanticOracle oracle) throws SemanticException
Rewrites aSymbolicExpression
, getting rid of the parts that access heap structures, substituting them with syntheticHeapLocation
s representing the accessed locations. The expression(s) returned by this method should not containHeapExpression
s.
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 rewrittenoracle
- the oracle for inter-domain communication- Returns:
- the rewritten expressions, or the original one
- Throws:
SemanticException
- if something goes wrong during the rewriting
-
rewrite
default ExpressionSet rewrite(ExpressionSet expressions, HeapEnvironment<T> environment, ProgramPoint pp, SemanticOracle oracle) 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, HeapEnvironment, ProgramPoint, SemanticOracle)
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 rewrittenoracle
- the oracle for inter-domain communication- Returns:
- the rewritten expressions, or the original ones
- Throws:
SemanticException
- if something goes wrong during the rewriting
-
alias
Satisfiability alias(SymbolicExpression x, SymbolicExpression y, HeapEnvironment<T> environment, ProgramPoint pp, SemanticOracle oracle) throws SemanticException
Yields whether or not the two given expressions are aliases, that is, if they point to the same region of memory. Note that, for this method to returnSatisfiability.SATISFIED
, both expressions should be pointers to other expressions.- Parameters:
x
- the first expressiony
- the second expressionenvironment
- the environment containing information about the program variablespp
- theProgramPoint
where the computation happensoracle
- the oracle for inter-domain communication- Returns:
- whether or not the two expressions are aliases
- Throws:
SemanticException
- if something goes wrong during the computation
-
isReachableFrom
Satisfiability isReachableFrom(SymbolicExpression x, SymbolicExpression y, HeapEnvironment<T> environment, ProgramPoint pp, SemanticOracle oracle) throws SemanticException
Yields whether or not theIdentifier
represented (directly or after rewriting) by the second expression is reachable starting from theIdentifier
represented (directly or after rewriting) by the first expression. Note that, for this method to returnSatisfiability.SATISFIED
, not onlyx
needs to be a pointer to another expression, but the latter should be a pointer as well, and so on untily
is reached.- Parameters:
x
- the first expressiony
- the second expressionenvironment
- the environment containing information about the program variablespp
- theProgramPoint
where the computation happensoracle
- the oracle for inter-domain communication- Returns:
- whether or not the second expression can be reached from the first one
- Throws:
SemanticException
- if something goes wrong during the computation
-
-