Class UnaryNativeCall

    • Constructor Detail

      • UnaryNativeCall

        protected UnaryNativeCall​(CFG cfg,
                                  CodeLocation location,
                                  java.lang.String constructName,
                                  Expression parameter)
        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
        parameter - the parameter of this call
      • UnaryNativeCall

        protected UnaryNativeCall​(CFG cfg,
                                  CodeLocation location,
                                  java.lang.String constructName,
                                  Type staticType,
                                  Expression parameter)
        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
        parameter - the 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
      • unarySemantics

        protected abstract <A extends AbstractState<A,​H,​V>,​H extends HeapDomain<H>,​V extends ValueDomain<V>> AnalysisState<A,​H,​V> unarySemantics​(AnalysisState<A,​H,​V> entryState,
                                                                                                                                                                                     InterproceduralAnalysis<A,​H,​V> interprocedural,
                                                                                                                                                                                     AnalysisState<A,​H,​V> exprState,
                                                                                                                                                                                     SymbolicExpression expr)
                                                                                                                                                                              throws SemanticException
        Computes the semantics of the call, after the semantics of the parameter has been computed. Meta variables from the parameter 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 unary call
        interprocedural - the interprocedural analysis of the program to analyze
        exprState - the state obtained by evaluating expr in entryState
        expr - the symbolic expressions representing the computed value of the 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