Interface BaseHeapDomain<H extends BaseHeapDomain<H>>

    • Method Detail

      • mk

        H mk​(H reference)
        Creates a new instance of this domain containing the same abstract information of reference. The returned object is effectively a new instance, meaning that all substitutions should be cleared. If this domain does not apply substitutions, it is fine to return this.
        Parameters:
        reference - the domain whose abstract information needs to be copied
        Returns:
        a new instance of this domain
      • mk

        H mk​(H reference,
             java.util.List<HeapSemanticOperation.HeapReplacement> replacements)
        Creates a new instance of this domain containing the same abstract information of reference. The returned object is effectively a new instance, but with the given substitution. If this domain does not apply substitutions, it is fine to return this.
        Parameters:
        reference - the domain whose abstract information needs to be copied
        replacements - the heap replacements of this instance
        Returns:
        the new instance
      • pushScope

        default H pushScope​(ScopeToken scope)
                     throws SemanticException
        Description copied from interface: ScopedObject
        Pushes a new scope, identified by the give token, in this object. This causes all variables not associated with a scope (and thus visible) to be mapped to the given scope and hidden away, until the scope is popped with ScopedObject.popScope(ScopeToken).
        Specified by:
        pushScope in interface ScopedObject<H extends BaseHeapDomain<H>>
        Parameters:
        scope - the token identifying the scope to push
        Returns:
        a copy of this object where the local unscoped variables have been hidden
        Throws:
        SemanticException - if an error occurs during the computation
      • popScope

        default H popScope​(ScopeToken scope)
                    throws SemanticException
        Description copied from interface: ScopedObject
        Pops the scope identified by the given token from this object. This causes all the visible variables (i.e. that are not mapped to a scope) to be removed, while the local variables that were associated to the given scope token (and thus hidden) will become visible again.
        Specified by:
        popScope in interface ScopedObject<H extends BaseHeapDomain<H>>
        Parameters:
        scope - the token of the scope to be restored
        Returns:
        a copy of this object where the local variables have been removed, while the variables mapped to the given scope are visible again
        Throws:
        SemanticException - if an error occurs during the computation
      • semanticsOf

        H semanticsOf​(HeapExpression expression,
                      ProgramPoint pp,
                      SemanticOracle oracle)
               throws SemanticException
        Yields a new instance of this domain, built by evaluating the semantics of the given heap expression.
        Parameters:
        expression - the expression to evaluate
        pp - the program point that where this expression is being evaluated
        oracle - the oracle for inter-domain communication
        Returns:
        a new instance of this domain
        Throws:
        SemanticException - if an error occurs during the computation