Class HeapSemanticOperation.HeapReplacement

  • Enclosing interface:
    HeapSemanticOperation

    public static class HeapSemanticOperation.HeapReplacement
    extends java.lang.Object
    A replacement between Identifiers caused by a change in the heap abstraction. A replacement express a relation between two sets of identifiers (returned by getSources() and getTargets()). The semantics of a replacement is to assign to every identifier in getTargets() the upper bound of the value of each identifier in getSources(), and then forget about all the sources identifiers that are not also the targets.
    • Constructor Summary

      Constructors 
      Constructor Description
      HeapReplacement()
      Builds the replacement.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addSource​(Identifier id)
      Adds an Identifier to the set of identifiers that are the sources of this replacement.
      void addTarget​(Identifier id)
      Adds an Identifier to the set of identifiers that are the targets of this replacement.
      boolean equals​(java.lang.Object obj)  
      java.util.Collection<Identifier> getIdsToForget()
      Yields the collection of identifiers that must be removed after the application of this replacement, that is, the identifiers that are in getSources() but not in getTargets().
      java.util.Set<Identifier> getSources()
      Yields the set of identifiers that this replacement originates from, that is, the ones whose value will be assigned to the targets.
      java.util.Set<Identifier> getTargets()
      Yields the set of identifiers that are targeted by this replacement, that is, the ones that will be assigned.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • addSource

        public void addSource​(Identifier id)
        Adds an Identifier to the set of identifiers that are the sources of this replacement.
        Parameters:
        id - the identifier to add
      • addTarget

        public void addTarget​(Identifier id)
        Adds an Identifier to the set of identifiers that are the targets of this replacement.
        Parameters:
        id - the identifier to add
      • getSources

        public java.util.Set<Identifier> getSources()
        Yields the set of identifiers that this replacement originates from, that is, the ones whose value will be assigned to the targets.
        Returns:
        the sources of this replacement
      • getTargets

        public java.util.Set<Identifier> getTargets()
        Yields the set of identifiers that are targeted by this replacement, that is, the ones that will be assigned.
        Returns:
        the targets of this replacement
      • getIdsToForget

        public java.util.Collection<Identifier> getIdsToForget()
        Yields the collection of identifiers that must be removed after the application of this replacement, that is, the identifiers that are in getSources() but not in getTargets().
        Returns:
        the identifiers to forget after this replacement
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object