Package it.unive.lisa.analysis
Interface Lattice<L extends Lattice<L>>
-
- Type Parameters:
L- the concreteLatticeinstance
- All Known Subinterfaces:
AbstractState<A,H,V>,HeapDomain<D>,InferredValue<T>,NonRelationalDomain<T,E,F>,NonRelationalElement<T,E,F>,NonRelationalHeapDomain<T>,NonRelationalValueDomain<T>,ValueDomain<D>
- All Known Implementing Classes:
AllocationSites,AnalysisState,BaseHeapDomain,BaseInferredValue,BaseLattice,BaseNonRelationalValueDomain,CartesianProduct,CFGResults,CFGWithAnalysisResults,DataflowDomain,DefiniteForwardDataflowDomain,Environment,ExpressionSet,FieldSensitivePointBasedHeap,FixpointResults,FunctionalLattice,HeapEnvironment,InferenceSystem,InferredTypes,InferredValue.InferredPair,IntegerConstantPropagation,Interval,InverseSetLattice,MonolithicHeap,NonInterference,Parity,PointBasedHeap,PossibleForwardDataflowDomain,SemanticDomain.Satisfiability,SetLattice,Sign,SimpleAbstractState,StatementStore,TypeBasedHeap,ValueCartesianProduct,ValueEnvironment
public interface Lattice<L extends Lattice<L>>An interface for elements that follow a lattice structure. Implementers of this interface should inherit fromBaseLattice, unless explicitly needed.
-
-
Field Summary
Fields Modifier and Type Field Description static DomainRepresentationBOTTOM_REPRADomainRepresentationthat can be used to represent bottom values.static java.lang.StringBOTTOM_STRINGA string constant that can be used to represent bottom values.static DomainRepresentationTOP_REPRADomainRepresentationthat can be used to represent top values.static java.lang.StringTOP_STRINGA string constant that can be used to represent top values.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Lbottom()Yields the bottom element of this lattice.default booleanisBottom()Yieldstrueif and only if this object represents the bottom of the lattice.default booleanisTop()Yieldstrueif and only if this object represents the top of the lattice.booleanlessOrEqual(L other)Yieldstrueif and only if this lattice element is in relation with (usually represented through ≤) the given one.Llub(L other)Performs the least upper bound operation between this lattice element and the given one.Ltop()Yields the top element of this lattice.Lwidening(L other)Performs the widening operation between this lattice element and the given one.
-
-
-
Field Detail
-
TOP_STRING
static final java.lang.String TOP_STRING
A string constant that can be used to represent top values.- See Also:
- Constant Field Values
-
TOP_REPR
static final DomainRepresentation TOP_REPR
ADomainRepresentationthat can be used to represent top values.
-
BOTTOM_STRING
static final java.lang.String BOTTOM_STRING
A string constant that can be used to represent bottom values.- See Also:
- Constant Field Values
-
BOTTOM_REPR
static final DomainRepresentation BOTTOM_REPR
ADomainRepresentationthat can be used to represent bottom values.
-
-
Method Detail
-
lub
L lub(L other) throws SemanticException
Performs the least upper bound operation between this lattice element and the given one. This operation is commutative.- Parameters:
other- the other lattice element- Returns:
- the least upper bound
- Throws:
SemanticException- if an error occurs during the computation
-
widening
L widening(L other) throws SemanticException
Performs the widening operation between this lattice element and the given one. This operation is not commutative.- Parameters:
other- the other lattice element- Returns:
- the widening between this and other
- Throws:
SemanticException- if an error occurs during the computation
-
lessOrEqual
boolean lessOrEqual(L other) throws SemanticException
Yieldstrueif and only if this lattice element is in relation with (usually represented through ≤) the given one. This operation is not commutative.- Parameters:
other- the other lattice element- Returns:
trueif and only if that condition holds- Throws:
SemanticException- if an error occurs during the computation
-
top
L top()
Yields the top element of this lattice. The returned element should be unique across different calls to this method, sinceisTop()uses reference equality by default. If the value returned by this method is not a singleton, overrideisTop()accordingly to provide a coherent test.- Returns:
- the top element
-
bottom
L bottom()
Yields the bottom element of this lattice. The returned element should be unique across different calls to this method, sinceisBottom()uses reference equality by default. If the value returned by this method is not a singleton, overrideisBottom()accordingly to provide a coherent test.- Returns:
- the bottom element
-
isTop
default boolean isTop()
Yieldstrueif and only if this object represents the top of the lattice. The default implementation of this method uses reference equality betweenthisand the value returned bytop(), thus assuming that the top element is a singleton. If this is not the case, override this method accordingly to provide a coherent test.- Returns:
trueif this is the top of the lattice
-
isBottom
default boolean isBottom()
Yieldstrueif and only if this object represents the bottom of the lattice. The default implementation of this method uses reference equality betweenthisand the value returned bybottom(), thus assuming that the bottom element is a singleton. If this is not the case, override this method accordingly to provide a coherent test.- Returns:
trueif this is the bottom of the lattice
-
-