Class OrderPreservingAssigningStrategy

    • 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: ParameterAssigningStrategy
        Prepares the entryState for the targets of the given Call, assuming that the state when the call is executed (after the evaluation of the parameters) is callState, and each parameter to the call is represented by an element of parameters. 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:
        prepare in interface ParameterAssigningStrategy
        Type Parameters:
        A - the type of AbstractState
        Parameters:
        call - the call to be prepared
        callState - the analysis state where the call is to be executed
        interprocedural - the interprocedural analysis of the program to analyze
        expressions - the cache where analysis states of intermediate expressions must be stored
        formals - the expressions representing the formal parameters of the call
        parameters - 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