Interface Lattice<L extends Lattice<L>>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      L bottom()
      Yields the bottom element of this lattice.
      default boolean isBottom()
      Yields true if and only if this object represents the bottom of the lattice.
      default boolean isTop()
      Yields true if and only if this object represents the top of the lattice.
      boolean lessOrEqual​(L other)
      Yields true if and only if this lattice element is in relation with (usually represented through ≤) the given one.
      L lub​(L other)
      Performs the least upper bound operation between this lattice element and the given one.
      L top()
      Yields the top element of this lattice.
      L widening​(L other)
      Performs the widening operation between this lattice element and the given one.
    • Method Detail

      • lub

        L lub​(L other)
        throws SemanticException
        Performs the least upper bound operation between this lattice element and the given one. This operation is commutative.
        Parameters:
        other - the other lattice element
        Returns:
        the least upper bound
        Throws:
        SemanticException - if an error occurs during the computation
      • widening

        L widening​(L other)
            throws SemanticException
        Performs the widening operation between this lattice element and the given one. This operation is not commutative.
        Parameters:
        other - the other lattice element
        Returns:
        the widening between this and other
        Throws:
        SemanticException - if an error occurs during the computation
      • lessOrEqual

        boolean lessOrEqual​(L other)
                     throws SemanticException
        Yields true if and only if this lattice element is in relation with (usually represented through ≤) the given one. This operation is not commutative.
        Parameters:
        other - the other lattice element
        Returns:
        true if and only if that condition holds
        Throws:
        SemanticException - if an error occurs during the computation
      • top

        L top()
        Yields the top element of this lattice. The returned element should be unique across different calls to this method, since isTop() uses reference equality by default. If the value returned by this method is not a singleton, override isTop() accordingly to provide a coherent test.
        Returns:
        the top element
      • bottom

        L bottom()
        Yields the bottom element of this lattice. The returned element should be unique across different calls to this method, since isBottom() uses reference equality by default. If the value returned by this method is not a singleton, override isBottom() accordingly to provide a coherent test.
        Returns:
        the bottom element
      • isTop

        default boolean isTop()
        Yields true if and only if this object represents the top of the lattice. The default implementation of this method uses reference equality between this and the value returned by top(), thus assuming that the top element is a singleton. If this is not the case, override this method accordingly to provide a coherent test.
        Returns:
        true if this is the top of the lattice
      • isBottom

        default boolean isBottom()
        Yields true if and only if this object represents the bottom of the lattice. The default implementation of this method uses reference equality between this and the value returned by bottom(), thus assuming that the bottom element is a singleton. If this is not the case, override this method accordingly to provide a coherent test.
        Returns:
        true if this is the bottom of the lattice