Class CFGCall

    • Constructor Detail

      • CFGCall

        public CFGCall​(CFG cfg,
                       CodeLocation location,
                       java.lang.String qualifiedName,
                       CFG target,
                       Expression... parameters)
        Builds the CFG 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
        qualifiedName - the qualified name of the static target of this call
        target - the CFG that is targeted by this CFG call
        parameters - the parameters of this call
      • CFGCall

        public CFGCall​(CFG cfg,
                       CodeLocation location,
                       java.lang.String qualifiedName,
                       java.util.Collection<CFG> targets,
                       Expression... parameters)
        Builds the CFG call, happening at the given location in the program.
        Parameters:
        cfg - the cfg that this expression belongs to
        location - the location where this expression is defined within the source file. If unknown, use null
        qualifiedName - the qualified name of the static target of this call
        targets - the CFGs that are targeted by this CFG call
        parameters - the parameters of this call
    • Method Detail

      • getTargets

        public java.util.Collection<CFG> getTargets()
        Yields the CFGs that are targeted by this CFG call.
        Returns:
        the target CFG
      • getQualifiedName

        public java.lang.String getQualifiedName()
        Yields the qualified name of the static target of this call.
        Returns:
        the qualified name
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Call
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class Call
      • toString

        public java.lang.String toString()
        Specified by:
        toString in class Statement
      • getMetaVariable

        public final Identifier getMetaVariable()
        Description copied from interface: MetaVariableCreator
        Yields the meta variable that is introduced during the evaluation of the semantics of this object to store information about the value produced by this object. Since the meta variable simulates a value pushed on the stack, it should be forgotten after it is consumed.
        Specified by:
        getMetaVariable in interface MetaVariableCreator
        Returns:
        the meta variable introduced by this object
      • callSemantics

        public <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