Class Call

    • Constructor Detail

      • Call

        protected Call​(CFG cfg,
                       CodeLocation location,
                       Call.CallType type,
                       java.lang.String qualifier,
                       java.lang.String targetName,
                       EvaluationOrder order,
                       Type staticType,
                       Expression... parameters)
        Builds a call happening at the given source location.
        Parameters:
        cfg - the cfg that this expression belongs to
        location - the location where the expression is defined within the program
        type - the call type of this call
        qualifier - the optional qualifier of the call (can be null or empty - see getFullTargetName() for more info)
        targetName - the name of the target of this call
        order - the evaluation order of the sub-expressions
        staticType - the static type of this call
        parameters - the parameters of this call
    • Method Detail

      • getSource

        public final UnresolvedCall getSource()
        Yields the call that this call originated from, if any. A call r originates from a call u if:
        Returns:
        the call that this one originated from
      • getFullTargetName

        public java.lang.String getFullTargetName()
        Yields the full name of the target of the call. The full name of the target of a call follows the following structure: qualifier::targetName, where qualifier is optional and, when it is not present (i.e. null or empty), the :: are omitted. This cfg returns is an alias of NaryExpression.getConstructName().
        Returns:
        the full name of the target of the call
      • getTargetName

        public java.lang.String getTargetName()
        Yields the name of the target of the call. The full name of the target of a call follows the following structure: qualifier::targetName, where qualifier is optional and, when it is not present (i.e. null or empty), the :: are omitted.
        Returns:
        the name of the target of the call
      • getQualifier

        public java.lang.String getQualifier()
        Yields the optional qualifier of the target of the call. The full name of the target of a call follows the following structure: qualifier::targetName, where qualifier is optional and, when it is not present (i.e. null or empty), the :: are omitted.
        Returns:
        the qualifier of the target of the call
      • getCallType

        public Call.CallType getCallType()
        Yields the call type of this call.
        Returns:
        the call type
      • setSource

        public void setSource​(UnresolvedCall source)
        Sets the call that this call originated from. A call r originates from a call u if:
        Parameters:
        source - the call that this one originated from
      • equals

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

        protected abstract int compareCallAux​(Call o)
        Auxiliary method for Statement.compareTo(Statement) that can safely assume that the two calls happen at the same CodeLocation, are instances of the same class, have the same parameters according to their implementation of Statement.compareTo(Statement), and have all fields defined in the Call class equal according to their Comparable.compareTo(Object). This method is thus responsible for only comparing the implementation-specific fields.
        Parameters:
        o - the other call
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object
      • parameterTypes

        public <A extends AbstractState<A>> java.util.Set<Type>[] parameterTypes​(StatementStore<A> expressions)
                                                                          throws SemanticException
        Yields an array containing the runtime types of the parameters of this call, retrieved by accessing the given StatementStore.
        Type Parameters:
        A - the type of AbstractState
        Parameters:
        expressions - the store containing the computed states for the parameters
        Returns:
        the array of parameter types
        Throws:
        SemanticException - if an exception happens while retrieving the types