Package it.unive.lisa.interprocedural
Class ReturnTopPolicy
- java.lang.Object
-
- it.unive.lisa.interprocedural.ReturnTopPolicy
-
- All Implemented Interfaces:
OpenCallPolicy
public class ReturnTopPolicy extends java.lang.Object implements OpenCallPolicy
AnOpenCallPolicy
, where the post state is exactly the entry state, with the only difference of having a synthetic variable named "open_call_return" assigned to top only if the call returns a value. This variable, that is also stored as computed expression, represent the unknown result of the call, if any.
-
-
Field Summary
Fields Modifier and Type Field Description static ReturnTopPolicy
INSTANCE
The singleton instance of this class.-
Fields inherited from interface it.unive.lisa.interprocedural.OpenCallPolicy
RETURNED_VARIABLE_NAME
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A extends AbstractState<A,H,V,T>,H extends HeapDomain<H>,V extends ValueDomain<V>,T extends TypeDomain<T>>
AnalysisState<A,H,V,T>apply(OpenCall call, AnalysisState<A,H,V,T> entryState, ExpressionSet<SymbolicExpression>[] params)
Applies the policy to the given open call.
-
-
-
Field Detail
-
INSTANCE
public static final ReturnTopPolicy INSTANCE
The singleton instance of this class.
-
-
Method Detail
-
apply
public <A extends AbstractState<A,H,V,T>,H extends HeapDomain<H>,V extends ValueDomain<V>,T extends TypeDomain<T>> AnalysisState<A,H,V,T> apply(OpenCall call, AnalysisState<A,H,V,T> entryState, ExpressionSet<SymbolicExpression>[] params) throws SemanticException
Description copied from interface:OpenCallPolicy
Applies the policy to the given open call.- Specified by:
apply
in interfaceOpenCallPolicy
- Type Parameters:
A
- the type ofAbstractState
contained into the analysis stateH
- the type ofHeapDomain
contained into the computed abstract stateV
- the type ofValueDomain
contained into the computed abstract stateT
- the type ofTypeDomain
contained into the computed abstract state- Parameters:
call
- theOpenCall
under evaluationentryState
- the state when the call is executedparams
- the symbolic expressions representing the computed values of the parameters of the call- Returns:
- the
AnalysisState
representing the abstract result of the execution of this call - Throws:
SemanticException
- if something goes wrong during the computation
-
-