Interface NonRelationalElement<T extends NonRelationalElement<T,E,F>,E extends SymbolicExpression,F extends FunctionalLattice<F,Identifier,T>>
-
- Type Parameters:
T
- the concrete type of the domainE
- the type of expressions that this domain can evaluateF
- the type of functional lattice that is used in conjuntion with this domain
- All Superinterfaces:
Lattice<T>
,SemanticEvaluator
- All Known Subinterfaces:
InferredValue<T>
,NonRelationalDomain<T,E,F>
,NonRelationalHeapDomain<T>
,NonRelationalTypeDomain<T>
,NonRelationalValueDomain<T>
- All Known Implementing Classes:
BaseInferredValue
,BaseNonRelationalTypeDomain
,BaseNonRelationalValueDomain
public interface NonRelationalElement<T extends NonRelationalElement<T,E,F>,E extends SymbolicExpression,F extends FunctionalLattice<F,Identifier,T>> extends Lattice<T>, SemanticEvaluator
A non-relational domain, that is able to compute the value of aSymbolicExpression
s of typeE
by knowing the values of all program variables. Instances of this class can be wrapped inside anFunctionalLattice
to represent abstract values of individualIdentifier
s.
-
-
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 F
assume(F environment, E expression, ProgramPoint pp)
Yields the environmentenvironment
on which the expressionexpression
is assumed to hold by this domain.T
glb(T other)
Performs the greatest lower bound operation between this domain element andother
.DomainRepresentation
representation()
Yields aDomainRepresentation
of the information contained in this domain's instance.SemanticDomain.Satisfiability
satisfies(E expression, F environment, ProgramPoint pp)
Checks whetherexpression
is satisfied inenvironment
, assuming that the values of program variables are the ones stored inenvironment
and returning an instance ofSemanticDomain.Satisfiability
.default T
variable(Identifier id, ProgramPoint pp)
Yields a fixed abstraction of the given variable.-
Methods inherited from interface it.unive.lisa.analysis.Lattice
bottom, isBottom, isTop, lessOrEqual, lub, top, widening
-
Methods inherited from interface it.unive.lisa.analysis.SemanticEvaluator
canProcess, tracksIdentifiers
-
-
-
-
Method Detail
-
satisfies
SemanticDomain.Satisfiability satisfies(E expression, F environment, ProgramPoint pp) throws SemanticException
Checks whetherexpression
is satisfied inenvironment
, assuming that the values of program variables are the ones stored inenvironment
and returning an instance ofSemanticDomain.Satisfiability
.- Parameters:
expression
- the expression whose satisfiability is to be evaluatedenvironment
- the environment containing the values of program variables for the satisfiabilitypp
- the program point that where this operation is being evaluated- Returns:
SemanticDomain.Satisfiability.SATISFIED
if the expression is satisfied by the environment,SemanticDomain.Satisfiability.NOT_SATISFIED
if it is not satisfied, orSemanticDomain.Satisfiability.UNKNOWN
if it is either impossible to determine if it satisfied, or if it is satisfied by some values and not by some others (this is equivalent to a TOP boolean value)- Throws:
SemanticException
- if something goes wrong during the computation
-
assume
F assume(F environment, E expression, ProgramPoint pp) throws SemanticException
Yields the environmentenvironment
on which the expressionexpression
is assumed to hold by this domain.- Parameters:
environment
- the environmentexpression
- the expression to be assumedpp
- the program point whereexpression
occurs.- Returns:
- the environment
environment
whereexpression
is assumed to hold - Throws:
SemanticException
- if an error occurs during the computation
-
glb
T glb(T other) throws SemanticException
Performs the greatest lower bound operation between this domain element andother
.- Parameters:
other
- the other domain element- Returns:
- the greatest lowe bound between
this
andother
- Throws:
SemanticException
- if an error occurs during the computation
-
variable
default T variable(Identifier id, ProgramPoint pp) throws SemanticException
Yields a fixed abstraction of the given variable. The abstraction does not depend on the abstract values that get assigned to the variable, but is instead fixed among all possible execution paths. If this method does not return the bottom element (as the default implementation does), thenEnvironment.assign(Identifier, SymbolicExpression, ProgramPoint)
will store that abstract element instead of the one computed starting from the expression.- Parameters:
id
- The identifier representing the variable being assignedpp
- the program point that where this operation is being evaluated- Returns:
- the fixed abstraction of the variable
- Throws:
SemanticException
- if an error occurs during the computation
-
representation
DomainRepresentation representation()
Yields aDomainRepresentation
of the information contained in this domain's instance.- Returns:
- the representation
-
-