Class BaseLattice<L extends BaseLattice<L>>

    • Constructor Summary

      Constructors 
      Constructor Description
      BaseLattice()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract boolean equals​(java.lang.Object obj)  
      abstract int hashCode()  
      boolean lessOrEqual​(L other)
      Yields true if and only if this lattice element is in relation with (usually represented through ≤) the given one.
      protected abstract boolean lessOrEqualAux​(L other)
      Yields true if and only if this lattice element is in relation with (usually represented through ≤) the given one, assuming that base cases have already been handled.
      L lub​(L other)
      Performs the least upper bound operation between this lattice element and the given one.
      protected abstract L lubAux​(L other)
      Performs the least upper bound operation between this lattice element and the given one, assuming that base cases have already been handled.
      abstract java.lang.String toString()  
      L widening​(L other)
      Performs the widening operation between this lattice element and the given one.
      protected abstract L wideningAux​(L other)
      Performs the widening operation between this lattice element and the given one, assuming that base cases have already been handled.
      • Methods inherited from class java.lang.Object

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

      • BaseLattice

        public BaseLattice()
    • Method Detail

      • lub

        public final L lub​(L other)
                    throws SemanticException
        Description copied from interface: Lattice
        Performs the least upper bound operation between this lattice element and the given one. This operation is commutative.
        Specified by:
        lub in interface Lattice<L extends BaseLattice<L>>
        Parameters:
        other - the other lattice element
        Returns:
        the least upper bound
        Throws:
        SemanticException - if an error occurs during the computation
      • lubAux

        protected abstract L lubAux​(L other)
                             throws SemanticException
        Performs the least upper bound operation between this lattice element and the given one, assuming that base cases have already been handled. In particular, it is guaranteed that:
        • other is not null
        • other is neither top nor bottom
        • this is neither top nor bottom
        • this and other are not the same object (according both to == and to Object.equals(Object))
        Parameters:
        other - the other lattice element
        Returns:
        the least upper bound between this and other
        Throws:
        SemanticException - if an error occurs during the computation
      • widening

        public final L widening​(L other)
                         throws SemanticException
        Description copied from interface: Lattice
        Performs the widening operation between this lattice element and the given one. This operation is not commutative.
        Specified by:
        widening in interface Lattice<L extends BaseLattice<L>>
        Parameters:
        other - the other lattice element
        Returns:
        the widening between this and other
        Throws:
        SemanticException - if an error occurs during the computation
      • wideningAux

        protected abstract L wideningAux​(L other)
                                  throws SemanticException
        Performs the widening operation between this lattice element and the given one, assuming that base cases have already been handled. In particular, it is guaranteed that:
        • other is not null
        • other is neither top nor bottom
        • this is neither top nor bottom
        • this and other are not the same object (according both to == and to Object.equals(Object))
        Parameters:
        other - the other lattice element
        Returns:
        the widening between this and other
        Throws:
        SemanticException - if an error occurs during the computation
      • lessOrEqual

        public final boolean lessOrEqual​(L other)
                                  throws SemanticException
        Description copied from interface: Lattice
        Yields true if and only if this lattice element is in relation with (usually represented through ≤) the given one. This operation is not commutative.
        Specified by:
        lessOrEqual in interface Lattice<L extends BaseLattice<L>>
        Parameters:
        other - the other lattice element
        Returns:
        true if and only if that condition holds
        Throws:
        SemanticException - if an error occurs during the computation
      • lessOrEqualAux

        protected abstract boolean lessOrEqualAux​(L other)
                                           throws SemanticException
        Yields true if and only if this lattice element is in relation with (usually represented through ≤) the given one, assuming that base cases have already been handled. In particular, it is guaranteed that:
        • other is not null
        • other is neither top nor bottom
        • this is neither top nor bottom
        • this and other are not the same object (according both to == and to Object.equals(Object))
        Parameters:
        other - the other lattice element
        Returns:
        true if and only if that condition holds
        Throws:
        SemanticException - if an error occurs during the computation
      • equals

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

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

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