Class TernaryNativeCall

    • Constructor Detail

      • TernaryNativeCall

        protected TernaryNativeCall​(CFG cfg,
                                    CodeLocation location,
                                    java.lang.String constructName,
                                    Expression left,
                                    Expression middle,
                                    Expression right)
        Builds the untyped native call, happening at the given location in the program. The static type of this call is Untyped.
        Parameters:
        cfg - the cfg that this expression belongs to
        location - the location where the expression is defined within the source file. If unknown, use null
        constructName - the name of the construct invoked by this native call
        left - the first parameter of this call
        middle - the second parameter of this call
        right - the second parameter of this call
      • TernaryNativeCall

        protected TernaryNativeCall​(CFG cfg,
                                    CodeLocation location,
                                    java.lang.String constructName,
                                    Type staticType,
                                    Expression left,
                                    Expression middle,
                                    Expression right)
        Builds the native call, happening at the given location in the program.
        Parameters:
        cfg - the cfg that this expression belongs to
        location - the location where the expression is defined within the source file. If unknown, use null
        constructName - the name of the construct invoked by this native call
        staticType - the static type of this call
        left - the first parameter of this call
        middle - the second parameter of this call
        right - the second parameter of this call
    • Method Detail

      • callSemantics

        public final <A extends AbstractState<A,​H,​V>,​H extends HeapDomain<H>,​V extends ValueDomain<V>> AnalysisState<A,​H,​V> callSemantics​(AnalysisState<A,​H,​V> entryState,
                                                                                                                                                                              InterproceduralAnalysis<A,​H,​V> interprocedural,
                                                                                                                                                                              AnalysisState<A,​H,​V>[] computedStates,
                                                                                                                                                                              ExpressionSet<SymbolicExpression>[] params)
                                                                                                                                                                       throws SemanticException
        Description copied from class: Call
        Computes the semantics of the call, after the semantics of all parameters have been computed. Meta variables from the parameters will be forgotten after this call returns.
        Specified by:
        callSemantics in class Call
        Type Parameters:
        A - the type of AbstractState
        H - the type of the HeapDomain
        V - the type of the ValueDomain
        Parameters:
        entryState - the entry state of this call
        interprocedural - the interprocedural analysis of the program to analyze
        computedStates - the array of states chaining the parameters' semantics evaluation starting from entryState, namely computedState[i] corresponds to the state obtained by the evaluation of params[i] in the state computedState[i-1] (params[0] is evaluated in entryState)
        params - the symbolic expressions representing the computed values of the parameters of this call
        Returns:
        the AnalysisState representing the abstract result of the execution of this call
        Throws:
        SemanticException - if something goes wrong during the computation
      • ternarySemantics

        protected abstract <A extends AbstractState<A,​H,​V>,​H extends HeapDomain<H>,​V extends ValueDomain<V>> AnalysisState<A,​H,​V> ternarySemantics​(AnalysisState<A,​H,​V> entryState,
                                                                                                                                                                                       InterproceduralAnalysis<A,​H,​V> interprocedural,
                                                                                                                                                                                       AnalysisState<A,​H,​V> leftState,
                                                                                                                                                                                       SymbolicExpression leftExp,
                                                                                                                                                                                       AnalysisState<A,​H,​V> middleState,
                                                                                                                                                                                       SymbolicExpression middleExp,
                                                                                                                                                                                       AnalysisState<A,​H,​V> rightState,
                                                                                                                                                                                       SymbolicExpression rightExp)
                                                                                                                                                                                throws SemanticException
        Computes the semantics of the call, after the semantics of the parameters have been computed. Meta variables from the parameters will be forgotten after this call returns.
        Type Parameters:
        A - the type of AbstractState
        H - the type of the HeapDomain
        V - the type of the ValueDomain
        Parameters:
        entryState - the entry state of this binary call
        interprocedural - the interprocedural analysis of the program to analyze
        leftState - the state obtained by evaluating left in entryState
        leftExp - the symbolic expression representing the computed value of the first parameter of this call
        middleState - the state obtained by evaluating middle in leftState
        middleExp - the symbolic expression representing the computed value of the second parameter of this call
        rightState - the state obtained by evaluating right in middleState
        rightExp - the symbolic expression representing the computed value of the third parameter of this call
        Returns:
        the AnalysisState representing the abstract result of the execution of this call
        Throws:
        SemanticException - if something goes wrong during the computation