Class ExpressionSet

    • Constructor Detail

      • ExpressionSet

        public ExpressionSet()
        Builds the empty set lattice element.
      • ExpressionSet

        public ExpressionSet​(SymbolicExpression exp)
        Builds a singleton set lattice element.
        Parameters:
        exp - the expression
      • ExpressionSet

        public ExpressionSet​(java.util.Set<SymbolicExpression> set)
        Builds a set lattice element.
        Parameters:
        set - the set of expression
    • Method Detail

      • top

        public ExpressionSet top()
        Description copied from interface: Lattice
        Yields the top element of this lattice. The returned element should be unique across different calls to this method, since Lattice.isTop() uses reference equality by default. If the value returned by this method is not a singleton, override Lattice.isTop() accordingly to provide a coherent test.
        Specified by:
        top in interface Lattice<ExpressionSet>
        Returns:
        the top element
      • bottom

        public ExpressionSet bottom()
        Description copied from interface: Lattice
        Yields the bottom element of this lattice. The returned element should be unique across different calls to this method, since Lattice.isBottom() uses reference equality by default. If the value returned by this method is not a singleton, override Lattice.isBottom() accordingly to provide a coherent test.
        Specified by:
        bottom in interface Lattice<ExpressionSet>
        Returns:
        the bottom element
      • mk

        public ExpressionSet mk​(java.util.Set<SymbolicExpression> set)
        Description copied from class: SetLattice
        Utility for creating a concrete instance of SetLattice given a set. This decouples the instance of set used during computation of the elements to put in the lattice from the actual type of set underlying the lattice.
        Specified by:
        mk in class SetLattice<ExpressionSet,​SymbolicExpression>
        Parameters:
        set - the set containing the elements that must be included in the lattice instance
        Returns:
        a new concrete instance of SetLattice containing the elements of the given set
      • lubAux

        public ExpressionSet lubAux​(ExpressionSet other)
                             throws SemanticException
        Description copied from interface: BaseLattice
        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))
        Specified by:
        lubAux in interface BaseLattice<ExpressionSet>
        Overrides:
        lubAux in class SetLattice<ExpressionSet,​SymbolicExpression>
        Parameters:
        other - the other lattice element
        Returns:
        the least upper bound between this and other
        Throws:
        SemanticException - if an error occurs during the computation
      • popScope

        public ExpressionSet popScope​(ScopeToken token)
                               throws SemanticException
        Description copied from interface: ScopedObject
        Pops the scope identified by the given token from this object. This causes all the visible variables (i.e. that are not mapped to a scope) to be removed, while the local variables that were associated to the given scope token (and thus hidden) will become visible again.
        Specified by:
        popScope in interface ScopedObject<ExpressionSet>
        Parameters:
        token - the token of the scope to be restored
        Returns:
        a copy of this object where the local variables have been removed, while the variables mapped to the given scope are visible again
        Throws:
        SemanticException - if an error occurs during the computation