Class OrderPreservingAssigningStrategy
- java.lang.Object
-
- it.unive.lisa.program.language.parameterassignment.OrderPreservingAssigningStrategy
-
- All Implemented Interfaces:
ParameterAssigningStrategy
public class OrderPreservingAssigningStrategy extends java.lang.Object implements ParameterAssigningStrategy
A strategy that passes the parameters in the same order as they are specified.
-
-
Field Summary
Fields Modifier and Type Field Description static OrderPreservingAssigningStrategyINSTANCEThe singleton instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A extends AbstractState<A>>
org.apache.commons.lang3.tuple.Pair<AnalysisState<A>,ExpressionSet[]>prepare(Call call, AnalysisState<A> callState, InterproceduralAnalysis<A> interprocedural, StatementStore<A> expressions, Parameter[] formals, ExpressionSet[] parameters)Prepares the entryState for the targets of the givenCall, assuming that the state when the call is executed (after the evaluation of the parameters) iscallState, and each parameter to the call is represented by an element ofparameters.
-
-
-
Field Detail
-
INSTANCE
public static final OrderPreservingAssigningStrategy INSTANCE
The singleton instance of this class.
-
-
Method Detail
-
prepare
public <A extends AbstractState<A>> org.apache.commons.lang3.tuple.Pair<AnalysisState<A>,ExpressionSet[]> prepare(Call call, AnalysisState<A> callState, InterproceduralAnalysis<A> interprocedural, StatementStore<A> expressions, Parameter[] formals, ExpressionSet[] parameters) throws SemanticException
Description copied from interface:ParameterAssigningStrategyPrepares the entryState for the targets of the givenCall, assuming that the state when the call is executed (after the evaluation of the parameters) iscallState, and each parameter to the call is represented by an element ofparameters. Here, no restrictions on the order of the parameters is made: they can be passed as-is, preserving their evaluation order (Java-like), or they may be passed by-name (Python-like).- Specified by:
preparein interfaceParameterAssigningStrategy- Type Parameters:
A- the type ofAbstractState- Parameters:
call- the call to be preparedcallState- the analysis state where the call is to be executedinterprocedural- the interprocedural analysis of the program to analyzeexpressions- the cache where analysis states of intermediate expressions must be storedformals- the expressions representing the formal parameters of the callparameters- the expressions representing the actual parameters of the call- Returns:
- the prepared state, ready to be used as entry-state for the targets, and the expressions to use as parameters of the call
- Throws:
SemanticException- if something goes wrong while preparing the entry-state
-
-