Interface InferredValue<T extends InferredValue<T>>
-
- Type Parameters:
T
- the concrete type of inferred value
- All Superinterfaces:
Lattice<T>
,NonRelationalElement<T,ValueExpression,InferenceSystem<T>>
,SemanticEvaluator
,StructuredObject
- All Known Subinterfaces:
BaseInferredValue<T>
public interface InferredValue<T extends InferredValue<T>> extends NonRelationalElement<T,ValueExpression,InferenceSystem<T>>
ANonRelationalElement
that can be inferred byInferenceSystem
s. The main difference between aNonRelationalDomain
and anInferredValue
is thateval(ValueExpression, InferenceSystem, ProgramPoint, SemanticOracle)
returns instances ofInferredValue.InferredPair
, to model the fact that every semantic evaluation also modifies the execution state.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
InferredValue.InferredPair<T extends InferredValue<T>>
A pair of instances ofInferredValue
, representing the result of an evaluation in the form of<inferred value, new execution state>
.
-
Field Summary
-
Fields inherited from interface it.unive.lisa.analysis.Lattice
BOTTOM_STRING, TOP_STRING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InferredValue.InferredPair<T>
eval(ValueExpression expression, InferenceSystem<T> environment, ProgramPoint pp, SemanticOracle oracle)
Evaluates aValueExpression
, assuming that the values of program variables are the ones stored inenvironment
.-
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.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
-
eval
InferredValue.InferredPair<T> eval(ValueExpression expression, InferenceSystem<T> environment, ProgramPoint pp, SemanticOracle oracle) throws SemanticException
Evaluates aValueExpression
, assuming that the values of program variables are the ones stored inenvironment
.- Parameters:
expression
- the expression to evaluateenvironment
- the environment containing the values of program variables for the evaluationpp
- the program point that where this operation is being evaluatedoracle
- the oracle for inter-domain communication- Returns:
- an new instance of this domain, representing the abstract result
of
expression
when evaluated onenvironment
. The returned value is a pair that express both the result of the evaluation and the updated execution state - Throws:
SemanticException
- if something goes wrong during the computation
-
-