Interface BaseLattice<L extends BaseLattice<L>>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      default L glb​(L other)
      Performs the greatest lower upper bound operation between this lattice element and the given one.
      default L glbAux​(L other)
      Performs the greatest lower bound operation between this lattice element and the given one, assuming that base cases have already been handled.
      int hashCode()  
      default boolean lessOrEqual​(L other)
      Yields true if and only if this lattice element is in relation with (usually represented through ≤) the given one.
      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.
      default L lub​(L other)
      Performs the least upper bound operation between this lattice element and the given one.
      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.
      default L narrowing​(L other)
      Performs the narrowing operation between this lattice element and the given one.
      default L narrowingAux​(L other)
      Performs the narrowing operation between this lattice element and the given one, assuming that base cases have already been handled.
      java.lang.String toString()  
      default L widening​(L other)
      Performs the widening operation between this lattice element and the given one.
      default L wideningAux​(L other)
      Performs the widening operation between this lattice element and the given one, assuming that base cases have already been handled.
    • Method Detail

      • lessOrEqual

        default 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
      • lub

        default 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
      • glb

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

        default 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. The default implementation of this method delegates to Lattice.lub(Lattice), and is thus safe for finite lattices and ACC ones.
        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
      • narrowing

        default L narrowing​(L other)
                     throws SemanticException
        Description copied from interface: Lattice
        Performs the narrowing operation between this lattice element and the given one. This operation is not commutative. The default implementation of this method delegates to Lattice.glb(Lattice), and is thus safe for finite lattices and DCC ones.
        Specified by:
        narrowing in interface Lattice<L extends BaseLattice<L>>
        Parameters:
        other - the other lattice element
        Returns:
        the narrowing between this and other
        Throws:
        SemanticException - if an error occurs during the computation
      • lubAux

        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
      • glbAux

        default L glbAux​(L other)
                  throws SemanticException
        Performs the greatest lower 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 greatest lower bound between this and other
        Throws:
        SemanticException - if an error occurs during the computation
      • wideningAux

        default 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))
        The default implementation of this method delegates to lubAux(BaseLattice), and is thus safe for finite lattices and ACC ones.
        Parameters:
        other - the other lattice element
        Returns:
        the widening between this and other
        Throws:
        SemanticException - if an error occurs during the computation
      • narrowingAux

        default L narrowingAux​(L other)
                        throws SemanticException
        Performs the narrowing 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))
        The default implementation of this method delegates to glbAux(BaseLattice), and is thus safe for finite lattices and DCC ones.
        Parameters:
        other - the other lattice element
        Returns:
        the narrowing between this and other
        Throws:
        SemanticException - if an error occurs during the computation
      • lessOrEqualAux

        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

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

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

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