Interface NonRelationalElement<T extends NonRelationalElement<T,​E,​F>,​E extends SymbolicExpression,​F extends FunctionalLattice<F,​Identifier,​T>>

    • Method Detail

      • satisfies

        Satisfiability satisfies​(E expression,
                                 F environment,
                                 ProgramPoint pp,
                                 SemanticOracle oracle)
                          throws SemanticException
        Checks whether expression is satisfied in environment, assuming that the values of program variables are the ones stored in environment and returning an instance of Satisfiability.
        Parameters:
        expression - the expression whose satisfiability is to be evaluated
        environment - the environment containing the values of program variables for the satisfiability
        pp - the program point that where this operation is being evaluated
        oracle - the oracle for inter-domain communication
        Returns:
        Satisfiability.SATISFIED if the expression is satisfied by the environment, Satisfiability.NOT_SATISFIED if it is not satisfied, or Satisfiability.UNKNOWN if it is either impossible to determine if it satisfied, or if it is satisfied by some values and not by some others (this is equivalent to a TOP boolean value)
        Throws:
        SemanticException - if something goes wrong during the computation
      • assume

        F assume​(F environment,
                 E expression,
                 ProgramPoint src,
                 ProgramPoint dest,
                 SemanticOracle oracle)
          throws SemanticException
        Yields the environment environment on which the expression expression is assumed to hold by this domain. The returned environment must be an updated version of the given one, where the relevant abstractions have been (optionally) updated. Returning the given environment as-is is always a sound implementation.
        Parameters:
        environment - the environment
        expression - the expression to be assumed
        src - the program point that where this operation is being evaluated, corresponding to the one that generated the given expression
        dest - the program point where the execution will move after the expression has been assumed
        oracle - the oracle for inter-domain communication
        Returns:
        the environment environment where expression is assumed to hold
        Throws:
        SemanticException - if an error occurs during the computation
      • fixedVariable

        default T fixedVariable​(Identifier id,
                                ProgramPoint pp,
                                SemanticOracle oracle)
                         throws SemanticException
        Yields a fixed abstraction of the given variable. The abstraction does not depend on the abstract values that get assigned to the variable, but is instead fixed among all possible execution paths. If this method does not return the bottom element (as the default implementation does), then Environment.assign(Identifier, SymbolicExpression, ProgramPoint, SemanticOracle) will store that abstract element instead of the one computed starting from the expression.
        Parameters:
        id - The identifier representing the variable being assigned
        pp - the program point that where this operation is being evaluated
        oracle - the oracle for inter-domain communication
        Returns:
        the fixed abstraction of the variable
        Throws:
        SemanticException - if an error occurs during the computation
      • unknownVariable

        default T unknownVariable​(Identifier id)
        Yields the default abstraction returned whenever a functional lattice using this element as values is queried for the state of a variable not currently part of its mapping. Abstraction for such a variable might have been lost, for instance, due to a call to Lattice.top() on the function itself. The default implementation of this method returns Lattice.top().
        Parameters:
        id - the variable that is missing from the mapping
        Returns:
        a default abstraction for the variable