Class FieldSensitivePointBasedHeap
- java.lang.Object
-
- it.unive.lisa.analysis.BaseLattice<H>
-
- it.unive.lisa.analysis.heap.BaseHeapDomain<PointBasedHeap>
-
- it.unive.lisa.analysis.impl.heap.pointbased.PointBasedHeap
-
- it.unive.lisa.analysis.impl.heap.pointbased.FieldSensitivePointBasedHeap
-
- All Implemented Interfaces:
HeapDomain<PointBasedHeap>,HeapSemanticOperation,Lattice<PointBasedHeap>,SemanticDomain<PointBasedHeap,SymbolicExpression,Identifier>
public class FieldSensitivePointBasedHeap extends PointBasedHeap
A field-sensitive point-based heap implementation that abstracts heap locations depending on their allocation sites, namely the position of the code where heap locations are generated. All heap locations that are generated at the same allocation sites are abstracted into a single unique heap identifier. The analysis is field-sensitive in the sense that all the field accesses, with the same field, to a specific allocation site are abstracted into a single heap identifier. The implementation follows X. Rival and K. Yi, "Introduction to Static Analysis An Abstract Interpretation Perspective", Section 8.3.4
-
-
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 class it.unive.lisa.analysis.impl.heap.pointbased.PointBasedHeap
heapEnv
-
Fields inherited from interface it.unive.lisa.analysis.Lattice
BOTTOM_REPR, BOTTOM_STRING, TOP_REPR, TOP_STRING
-
-
Constructor Summary
Constructors Constructor Description FieldSensitivePointBasedHeap()Builds a new instance of field-sensitive point-based heap.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FieldSensitivePointBasedHeapfrom(PointBasedHeap original)Builds a point-based heap from a reference one.ExpressionSet<ValueExpression>rewrite(SymbolicExpression expression, ProgramPoint pp)Rewrites aSymbolicExpression, getting rid of the parts that access heap structures, substituting them with syntheticHeapLocations representing the accessed locations.-
Methods inherited from class it.unive.lisa.analysis.impl.heap.pointbased.PointBasedHeap
assign, assume, bottom, equals, forgetIdentifier, getSubstitution, hashCode, isBottom, isTop, lessOrEqualAux, lubAux, mk, popScope, pushScope, representation, satisfies, semanticsOf, top, wideningAux
-
Methods inherited from class it.unive.lisa.analysis.heap.BaseHeapDomain
smallStepSemantics, toString
-
Methods inherited from class it.unive.lisa.analysis.BaseLattice
lessOrEqual, lub, widening
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface it.unive.lisa.analysis.heap.HeapDomain
rewriteAll
-
Methods inherited from interface it.unive.lisa.analysis.Lattice
lessOrEqual, lub, widening
-
Methods inherited from interface it.unive.lisa.analysis.SemanticDomain
forgetIdentifiers
-
-
-
-
Method Detail
-
from
protected FieldSensitivePointBasedHeap from(PointBasedHeap original)
Description copied from class:PointBasedHeapBuilds a point-based heap from a reference one.- Overrides:
fromin classPointBasedHeap- Parameters:
original- reference point-based heap- Returns:
- a point-based heap build from the original one
-
rewrite
public ExpressionSet<ValueExpression> rewrite(SymbolicExpression expression, ProgramPoint pp) throws SemanticException
Description copied from interface:HeapDomainRewrites aSymbolicExpression, getting rid of the parts that access heap structures, substituting them with syntheticHeapLocations representing the accessed locations. The expression returned by this method should not containHeapExpressions.
If no rewriting is necessary, the input expression can be returned instead.- Specified by:
rewritein interfaceHeapDomain<PointBasedHeap>- Overrides:
rewritein classPointBasedHeap- 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
-
-