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 the call's meta variable 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A extends AbstractState<A>>
AnalysisState<A>apply(OpenCall call, AnalysisState<A> entryState, ExpressionSet[] 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>> AnalysisState<A> apply(OpenCall call, AnalysisState<A> entryState, ExpressionSet[] 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 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
-
-