Interface Lattice<L extends Lattice<L>>

    • Field Detail

      • TOP_STRING

        static final java.lang.String TOP_STRING
        A string constant that can be used to represent top values.
        See Also:
        Constant Field Values
      • BOTTOM_STRING

        static final java.lang.String BOTTOM_STRING
        A string constant that can be used to represent bottom values.
        See Also:
        Constant Field Values
    • Method Detail

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

        default L glb​(L other)
               throws SemanticException
        Performs the greatest lower upper bound operation between this lattice element and the given one. This operation is commutative.
        Parameters:
        other - the other lattice element
        Returns:
        the greatest lower bound
        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
      • widening

        default L widening​(L other)
                    throws SemanticException
        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 lub(Lattice), 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
      • narrowing

        default L narrowing​(L other)
                     throws SemanticException
        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 glb(Lattice), 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