Interface NonRelationalHeapDomain<T extends NonRelationalHeapDomain<T>>

    • Method Detail

      • rewrite

        ExpressionSet<ValueExpression> rewrite​(SymbolicExpression expression,
                                               HeapEnvironment<T> environment,
                                               ProgramPoint pp)
                                        throws SemanticException
        Rewrites a SymbolicExpression, getting rid of the parts that access heap structures, substituting them with synthetic HeapLocations representing the accessed locations. The expression(s) returned by this method should not contain HeapExpressions.

        Note that a single expression might be rewritten to more than one expression, depending on the individual reasoning of the domain.

        If no rewriting is necessary, the input expression can be returned instead.
        Parameters:
        expression - the expression to rewrite
        environment - the environment containing information about the program variables
        pp - the program point that where this expression is being rewritten
        Returns:
        the rewritten expressions, or the original one
        Throws:
        SemanticException - if something goes wrong during the rewriting
      • rewriteAll

        default ExpressionSet<ValueExpression> rewriteAll​(ExpressionSet<SymbolicExpression> expressions,
                                                          HeapEnvironment<T> environment,
                                                          ProgramPoint pp)
                                                   throws SemanticException
        Rewrites all SymbolicExpressions, getting rid of the parts that access heap structures, substituting them with synthetic HeapLocations representing the accessed locations. The expressions returned by this method should not contain HeapExpressions.

        If no rewriting is necessary, the returned ExpressionSet will contain the input expressions.

        The default implementation of this method simply iterates over the input expressions, invoking rewrite(SymbolicExpression, HeapEnvironment, ProgramPoint) on all of them.

        The collection returned by this method usually contains one expression, but instances created through lattice operations (e.g., lub) might contain more.
        Parameters:
        expressions - the expressions to rewrite
        environment - the environment containing information about the program variables
        pp - the program point that where this expressions are being rewritten
        Returns:
        the rewritten expressions, or the original ones
        Throws:
        SemanticException - if something goes wrong during the rewriting